Package de.coreengine.animation
Class Animation
- java.lang.Object
-
- de.coreengine.animation.Animation
-
public class Animation extends Object
Represents a animation that can be played by an animated model
-
-
Constructor Summary
Constructors Constructor Description Animation(String name, List<KeyFrameList<javax.vecmath.Vector3f>> positionKeys, List<KeyFrameList<javax.vecmath.Quat4f>> rotationKeys, List<KeyFrameList<javax.vecmath.Vector3f>> scaleKeys)
Creating animation and init values
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
fromBytes(byte[] data)
Constructing animation from bytes.
Format:
First Sector [MetaData]:
NameSize (int) | PositionKeyListCount (int) | RotationKeyListCount (int) | ScaleKeyListCount (int) | PositionKeyList0KeyCount (int) | PositionKeyList1KeyCount (int) | ...float
getLength()
String
getName()
byte[]
toBytes()
Converting the animation into a byte array.
Format:
First Sector [MetaData]:
NameSize (int) | PositionKeyListCount (int) | RotationKeyListCount (int) | ScaleKeyListCount (int) | PositionKeyList0KeyCount (int) | PositionKeyList1KeyCount (int) | ...
-
-
-
Constructor Detail
-
Animation
public Animation(String name, List<KeyFrameList<javax.vecmath.Vector3f>> positionKeys, List<KeyFrameList<javax.vecmath.Quat4f>> rotationKeys, List<KeyFrameList<javax.vecmath.Vector3f>> scaleKeys)
Creating animation and init values- Parameters:
name
- Name of the animationpositionKeys
- Keyframe lists of the joints positionsrotationKeys
- Keyframe lists of the joints rotationsscaleKeys
- Keyframe lists of the joints scales
-
-
Method Detail
-
toBytes
public byte[] toBytes()
Converting the animation into a byte array.
Format:
First Sector [MetaData]:
NameSize (int) | PositionKeyListCount (int) | RotationKeyListCount (int) | ScaleKeyListCount (int) | PositionKeyList0KeyCount (int) | PositionKeyList1KeyCount (int) | ... | RotationKeyList0KeyCount (int) | RotationKeyList1KeyCount (int) | ... | ScaleKeyList0KeyCount (int) | ScaleKeyList1KeyCount (int) | ...
Second Sector [PositionKeys]:
Name (String)
Third Sector [PositionKeys]:
PositionKeyList0Time0 (float) | PositionKeyList0Vec0 (float[]) | PositionKeyList0Time1 (float) | PositionKeyList0Vec1 (float[]) | ... | PositionKeyList1Time0 (float) | PositionKeyList1Vec0 (float[]) | PositionKeyList1Time1 (float) | PositionKeyList1Vec1 (float[]) | ...
Fourth Sector [RotationKeys]:
RotationKeyList0Time0 (float) | RotationKeyList0Vec0 (float[]) | RotationKeyList0Time1 (float) | RotationKeyList0Vec1 (float[]) | ... | RotationKeyList1Time0 (float) | RotationKeyList1Vec0 (float[]) | RotationKeyList1Time1 (float) | RotationKeyList1Vec1 (float[]) | ...
Fifth Sector [ScaleKeys]:
ScaleKeyList0Time0 (float) | ScaleKeyList0Vec0 (float[]) | ScaleKeyList0Time1 (float) | ScaleKeyList0Vec1 (float[]) | ... | ScaleKeyList1Time0 (float) | ScaleKeyList1Vec0 (float[]) | ScaleKeyList1Time1 (float) | ScaleKeyList1Vec1 (float[]) | ...- Returns:
- Converted byte array
-
fromBytes
public void fromBytes(byte[] data)
Constructing animation from bytes.
Format:
First Sector [MetaData]:
NameSize (int) | PositionKeyListCount (int) | RotationKeyListCount (int) | ScaleKeyListCount (int) | PositionKeyList0KeyCount (int) | PositionKeyList1KeyCount (int) | ... | RotationKeyList0KeyCount (int) | RotationKeyList1KeyCount (int) | ... | ScaleKeyList0KeyCount (int) | ScaleKeyList1KeyCount (int) | ...
Second Sector [PositionKeys]:
Name (String)
Third Sector [PositionKeys]:
PositionKeyList0Time0 (float) | PositionKeyList0Vec0 (float[]) | PositionKeyList0Time1 (float) | PositionKeyList0Vec1 (float[]) | ... | PositionKeyList1Time0 (float) | PositionKeyList1Vec0 (float[]) | PositionKeyList1Time1 (float) | PositionKeyList1Vec1 (float[]) | ...
Fourth Sector [RotationKeys]:
RotationKeyList0Time0 (float) | RotationKeyList0Vec0 (float[]) | RotationKeyList0Time1 (float) | RotationKeyList0Vec1 (float[]) | ... | RotationKeyList1Time0 (float) | RotationKeyList1Vec0 (float[]) | RotationKeyList1Time1 (float) | RotationKeyList1Vec1 (float[]) | ...
Fifth Sector [ScaleKeys]:
ScaleKeyList0Time0 (float) | ScaleKeyList0Vec0 (float[]) | ScaleKeyList0Time1 (float) | ScaleKeyList0Vec1 (float[]) | ... | ScaleKeyList1Time0 (float) | ScaleKeyList1Vec0 (float[]) | ScaleKeyList1Time1 (float) | ScaleKeyList1Vec1 (float[]) | ...- Parameters:
data
- Bytes to construct animation from
-
getLength
public float getLength()
- Returns:
- Length of the animation in millis
-
getName
public String getName()
- Returns:
- Name of the animation
-
-