|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.threed.jpct.Animation
public final class Animation
Animation provides a keyframe animation implementation. An animation sequence can be defined and added to an object. Several interpolation methods for keyframe interpolation are supported. Remember that other kinds of animation like rotations and translations (moving objects around) usually isn't done using keyframe animation but by rotating and translating the objects directly. Both types of animation can be combined.
Field Summary | |
---|---|
static int |
KEYFRAMESONLY
Use no interpolation between keyframes. |
static int |
LINEAR
Use linear interpolation between keyframes. |
static int |
USE_CLAMPING
Use clamping when the interpolation reaches the end of a sub-sequence. |
static int |
USE_WRAPPING
Use wrapping when the interpolation reaches the end of a sub-sequence. |
Constructor Summary | |
---|---|
Animation(int keyframeCount)
Creates a new animation sequence that consist of keyframeCount keyframes. |
Method Summary | |
---|---|
void |
addKeyFrame(Mesh keyFrame)
Add a keyframe to a animation sequence. |
int |
createSubSequence(java.lang.String name)
Creates a new sub-sequence. |
Mesh[] |
getKeyFrames()
Returns the key frames of an animation as an array of Mesh. |
java.lang.String |
getName(int seq)
Returns the name of a sequence. |
int |
getSequence(java.lang.String name)
Returns a sequence index for a given name. |
int[] |
getSequenceBorders(int seq)
Gets the position of the start and the end frame of a sequence. |
int |
getSequenceCount()
Returns the number of sequences used. |
void |
remove(int seq)
Removes data of a sequence from an animation. |
void |
setCaching(boolean usesCache)
If enabled, animations will be processed faster, you'll get a higher frame rate. |
void |
setClampingMode(int mode)
Sets the clamping mode for animations. |
void |
setInterpolationMethod(int method)
Sets the method that should be used to interpolate vertices between keyframes. |
void |
strip()
Removes triangle information from this animation's meshes. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int LINEAR
public static final int KEYFRAMESONLY
public static final int USE_WRAPPING
public static final int USE_CLAMPING
Constructor Detail |
---|
public Animation(int keyframeCount)
keyframeCount
- the number of keyframes for this animationMethod Detail |
---|
public void setCaching(boolean usesCache)
usesCache
- should we?public void strip()
public void remove(int seq)
seq
- the sequencepublic java.lang.String getName(int seq)
seq
- a sequence
public int[] getSequenceBorders(int seq)
seq
- the sequence
public int getSequence(java.lang.String name)
name
- the sequence's name
public Mesh[] getKeyFrames()
public int createSubSequence(java.lang.String name)
name
- the name of this sequence
public int getSequenceCount()
public void setClampingMode(int mode)
mode
- the clamping modeUSE_WRAPPING
,
USE_CLAMPING
public void addKeyFrame(Mesh keyFrame)
keyFrame
- the mesh of this keyframeObject3D.calcBoundingBox()
,
Object3D.getMesh()
,
Object3D.calcNormals()
,
Mesh.cloneMesh(boolean)
public void setInterpolationMethod(int method)
method
- the methodLINEAR
,
KEYFRAMESONLY
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |