Assimp  v4.1. (December 2018)
jassimp.AiNodeAnim Class Reference

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...
 

Detailed Description

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.

Member Function Documentation

◆ getNodeName()

String jassimp.AiNodeAnim.getNodeName ( )
inline

Returns the name of the scene graph node affected by this animation.

The node must exist and it must be unique.

Returns
the name of the affected node

◆ getNumPosKeys()

int jassimp.AiNodeAnim.getNumPosKeys ( )
inline

Returns the number of position keys.

Returns
the number of position keys

◆ getNumRotKeys()

int jassimp.AiNodeAnim.getNumRotKeys ( )
inline

Returns the number of rotation keys.

Returns
the number of rotation keys

◆ getNumScaleKeys()

int jassimp.AiNodeAnim.getNumScaleKeys ( )
inline

Returns the number of scaling keys.

Returns
the number of scaling keys

◆ getPosKeyBuffer()

ByteBuffer jassimp.AiNodeAnim.getPosKeyBuffer ( )
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.

Returns
a native order, direct ByteBuffer

◆ getPosKeyTime()

double jassimp.AiNodeAnim.getPosKeyTime ( int  keyIndex)
inline

Returns the time component of the specified position key.

Parameters
keyIndexthe index of the position key
Returns
the time component

◆ getPosKeyX()

float jassimp.AiNodeAnim.getPosKeyX ( int  keyIndex)
inline

Returns the position x component of the specified position key.

Parameters
keyIndexthe index of the position key
Returns
the x component

◆ getPosKeyY()

float jassimp.AiNodeAnim.getPosKeyY ( int  keyIndex)
inline

Returns the position y component of the specified position key.

Parameters
keyIndexthe index of the position key
Returns
the y component

◆ getPosKeyZ()

float jassimp.AiNodeAnim.getPosKeyZ ( int  keyIndex)
inline

Returns the position z component of the specified position key.

Parameters
keyIndexthe index of the position key
Returns
the z component

◆ getPostState()

AiAnimBehavior jassimp.AiNodeAnim.getPostState ( )
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).

Returns
the animation behavior before after the last key

◆ getPreState()

AiAnimBehavior jassimp.AiNodeAnim.getPreState ( )
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).

Returns
the animation behavior before the first key

◆ getRotKeyBuffer()

ByteBuffer jassimp.AiNodeAnim.getRotKeyBuffer ( )
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.

Returns
a native order, direct ByteBuffer

◆ getRotKeyTime()

double jassimp.AiNodeAnim.getRotKeyTime ( int  keyIndex)
inline

Returns the time component of the specified rotation key.

Parameters
keyIndexthe index of the position key
Returns
the time component

◆ getRotKeyW()

float jassimp.AiNodeAnim.getRotKeyW ( int  keyIndex)
inline

Returns the rotation w component of the specified rotation key.

Parameters
keyIndexthe index of the position key
Returns
the w component

◆ getRotKeyX()

float jassimp.AiNodeAnim.getRotKeyX ( int  keyIndex)
inline

Returns the rotation x component of the specified rotation key.

Parameters
keyIndexthe index of the position key
Returns
the x component

◆ getRotKeyY()

float jassimp.AiNodeAnim.getRotKeyY ( int  keyIndex)
inline

Returns the rotation y component of the specified rotation key.

Parameters
keyIndexthe index of the position key
Returns
the y component

◆ getRotKeyZ()

float jassimp.AiNodeAnim.getRotKeyZ ( int  keyIndex)
inline

Returns the rotation z component of the specified rotation key.

Parameters
keyIndexthe index of the position key
Returns
the z component

◆ getScaleKeyBuffer()

ByteBuffer jassimp.AiNodeAnim.getScaleKeyBuffer ( )
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.

Returns
a native order, direct ByteBuffer

◆ getScaleKeyTime()

double jassimp.AiNodeAnim.getScaleKeyTime ( int  keyIndex)
inline

Returns the time component of the specified scaling key.

Parameters
keyIndexthe index of the position key
Returns
the time component

◆ getScaleKeyX()

float jassimp.AiNodeAnim.getScaleKeyX ( int  keyIndex)
inline

Returns the scaling x component of the specified scaling key.

Parameters
keyIndexthe index of the position key
Returns
the x component

◆ getScaleKeyY()

float jassimp.AiNodeAnim.getScaleKeyY ( int  keyIndex)
inline

Returns the scaling y component of the specified scaling key.

Parameters
keyIndexthe index of the position key
Returns
the y component

◆ getScaleKeyZ()

float jassimp.AiNodeAnim.getScaleKeyZ ( int  keyIndex)
inline

Returns the scaling z component of the specified scaling key.

Parameters
keyIndexthe index of the position key
Returns
the z component

The documentation for this class was generated from the following file: