Assimp
v3.1.1 (June 2014)
|
Describes the animation of a single node. More...
Public Member Functions | |
String | getNodeName () |
Returns the name of the scene graph node affected by this animation. More... | |
int | getNumPosKeys () |
Returns the number of position keys. More... | |
int | getNumRotKeys () |
Returns the number of rotation keys. More... | |
int | getNumScaleKeys () |
Returns the number of scaling keys. More... | |
ByteBuffer | getPosKeyBuffer () |
Returns the buffer with position keys of this animation channel. More... | |
double | getPosKeyTime (int keyIndex) |
Returns the time component of the specified position key. More... | |
float | getPosKeyX (int keyIndex) |
Returns the position x component of the specified position key. More... | |
float | getPosKeyY (int keyIndex) |
Returns the position y component of the specified position key. More... | |
float | getPosKeyZ (int keyIndex) |
Returns the position z component of the specified position key. More... | |
AiAnimBehavior | getPostState () |
Defines how the animation behaves after the last key was processed. More... | |
AiAnimBehavior | getPreState () |
Defines how the animation behaves before the first key is encountered. More... | |
ByteBuffer | getRotKeyBuffer () |
Returns the buffer with rotation keys of this animation channel. More... | |
double | getRotKeyTime (int keyIndex) |
Returns the time component of the specified rotation key. More... | |
float | getRotKeyW (int keyIndex) |
Returns the rotation w component of the specified rotation key. More... | |
float | getRotKeyX (int keyIndex) |
Returns the rotation x component of the specified rotation key. More... | |
float | getRotKeyY (int keyIndex) |
Returns the rotation y component of the specified rotation key. More... | |
float | getRotKeyZ (int keyIndex) |
Returns the rotation z component of the specified rotation key. More... | |
ByteBuffer | getScaleKeyBuffer () |
Returns the buffer with scaling keys of this animation channel. More... | |
double | getScaleKeyTime (int keyIndex) |
Returns the time component of the specified scaling key. More... | |
float | getScaleKeyX (int keyIndex) |
Returns the scaling x component of the specified scaling key. More... | |
float | getScaleKeyY (int keyIndex) |
Returns the scaling y component of the specified scaling key. More... | |
float | getScaleKeyZ (int keyIndex) |
Returns the scaling z component of the specified scaling key. More... | |
Describes the animation of a single node.
The node name (getNodeName() specifies the bone/node which is affected by this animation channel. The keyframes are given in three separate series of values, one each for position, rotation and scaling. The transformation matrix computed from these values replaces the node's original transformation matrix at a specific time.
This means all keys are absolute and not relative to the bone default pose. The order in which the transformations are applied is - as usual - scaling, rotation, translation.
Note: All keys are returned in their correct, chronological order. Duplicate keys don't pass the validation step. Most likely there will be no negative time values, but they are not forbidden also (so implementations need to cope with them!)
Like AiMesh, the animation related classes offer a Buffer API, a Direct API and a wrapped API. Please consult the documentation of AiMesh for a description and comparison of these APIs.
|
inline |
Returns the name of the scene graph node affected by this animation.
The node must exist and it must be unique.
|
inline |
Returns the number of position keys.
|
inline |
Returns the number of rotation keys.
|
inline |
Returns the number of scaling keys.
|
inline |
Returns the buffer with position keys of this animation channel.
Position keys consist of a time value (double) and a position (3D vector of floats), resulting in a total of 20 bytes per entry. The buffer contains getNumPosKeys() of these entries.
If there are position keys, there will also be at least one scaling and one rotation key.
|
inline |
Returns the time component of the specified position key.
keyIndex | the index of the position key |
|
inline |
Returns the position x component of the specified position key.
keyIndex | the index of the position key |
|
inline |
Returns the position y component of the specified position key.
keyIndex | the index of the position key |
|
inline |
Returns the position z component of the specified position key.
keyIndex | the index of the position key |
|
inline |
Defines how the animation behaves after the last key was processed.
The default value is AiAnimBehavior#DEFAULT (the original transformation matrix of the affected node is taken).
|
inline |
Defines how the animation behaves before the first key is encountered.
The default value is AiAnimBehavior#DEFAULT (the original transformation matrix of the affected node is used).
|
inline |
Returns the buffer with rotation keys of this animation channel.
Rotation keys consist of a time value (double) and a quaternion (4D vector of floats), resulting in a total of 24 bytes per entry. The buffer contains getNumRotKeys() of these entries.
If there are rotation keys, there will also be at least one scaling and one position key.
|
inline |
Returns the time component of the specified rotation key.
keyIndex | the index of the position key |
|
inline |
Returns the rotation w component of the specified rotation key.
keyIndex | the index of the position key |
|
inline |
Returns the rotation x component of the specified rotation key.
keyIndex | the index of the position key |
|
inline |
Returns the rotation y component of the specified rotation key.
keyIndex | the index of the position key |
|
inline |
Returns the rotation z component of the specified rotation key.
keyIndex | the index of the position key |
|
inline |
Returns the buffer with scaling keys of this animation channel.
Scaling keys consist of a time value (double) and a 3D vector of floats, resulting in a total of 20 bytes per entry. The buffer contains getNumScaleKeys() of these entries.
If there are scaling keys, there will also be at least one position and one rotation key.
|
inline |
Returns the time component of the specified scaling key.
keyIndex | the index of the position key |
|
inline |
Returns the scaling x component of the specified scaling key.
keyIndex | the index of the position key |
|
inline |
Returns the scaling y component of the specified scaling key.
keyIndex | the index of the position key |
|
inline |
Returns the scaling z component of the specified scaling key.
keyIndex | the index of the position key |