|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--md3.md3model.AnimationCfg
A class providing functionality to access the animation data found in the animation.cfg files that come with (some) animated models.
Field Summary | |
static int |
ALL
The animation is applicable to all submodels. |
static int |
BOTH
The animation is applicable to BOTH the LEGS and TORSO submodels of a composed model. |
java.lang.String |
footsteps
Type of footstep sounds associated with animations (e.g. |
Vec3 |
headOffset
Head offset, none by default. |
static int |
LEGS
The animation is only applicable to the LEGS submodel of a composed model. |
char |
sex
Sex of animated model: 'm' for male, 'f' for female, 'n' for none. |
static int |
TORSO
The animation is only applicable to the TORSO submodel of a composed model. |
Constructor Summary | |
protected |
AnimationCfg()
Create an empty animation data resource. |
protected |
AnimationCfg(java.io.InputStream in)
Constructor that loads animation.cfg data coming from the specified input stream into the internal data stuctures. |
protected |
AnimationCfg(java.lang.String file)
Constructor that loads an animation.cfg file into the internal data stuctures. |
Method Summary | |
java.util.Iterator |
animationNames()
Return an Iterator listing the names of all known animations. |
MD3Animation |
getAnimation(java.lang.String name)
Look up the animation data for the animation with the specified name. |
void |
putAnimation(MD3Animation anim)
Add the specified animation to the list of known animations. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Field Detail |
public static final int LEGS
The animation is only applicable to the LEGS submodel of a composed model. This submodel is normally the top level model, loaded from a file lower.md3.
public static final int TORSO
The animation is only applicable to the TORSO submodel of a composed model. The TORSO submodel is normally loaded from a file upper.md3.
public static final int BOTH
The animation is applicable to BOTH the LEGS and TORSO submodels of a composed model.
public static final int ALL
The animation is applicable to all submodels.
public char sex
Sex of animated model: 'm' for male, 'f' for female, 'n' for none.
public Vec3 headOffset
Head offset, none by default. This is the offset of the head model in the HUD in X,Y,Z coordinates.
public java.lang.String footsteps
Type of footstep sounds associated with animations (e.g. "mech"). Defaults to "unspecified".
Constructor Detail |
protected AnimationCfg()
Create an empty animation data resource. Use this when creating and managing your own animations.
protected AnimationCfg(java.lang.String file) throws java.io.IOException
Constructor that loads an animation.cfg file into the internal data stuctures. The read information can later be consulted using the animationNames() and getAnimation() methods.
file
- The file to open.protected AnimationCfg(java.io.InputStream in) throws java.io.IOException
Constructor that loads animation.cfg data coming from the specified input stream into the internal data stuctures. The read information can later be consulted using the animationNames() and getAnimation() methods.
in
- The stream to read data from.Method Detail |
public java.util.Iterator animationNames()
Return an Iterator listing the names of all known animations.
public MD3Animation getAnimation(java.lang.String name)
Look up the animation data for the animation with the specified name.
name
- Name of the animation.public void putAnimation(MD3Animation anim)
Add the specified animation to the list of known animations.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |