Package org.lwjgl.assimp
Class AINodeAnim
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.assimp.AINodeAnim
-
- All Implemented Interfaces:
java.lang.AutoCloseable,org.lwjgl.system.NativeResource,org.lwjgl.system.Pointer
public class AINodeAnim extends org.lwjgl.system.Struct implements org.lwjgl.system.NativeResourceDescribes the animation of a single node. The name 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! )
Member documentation
mNodeName– The name of the node affected by this animation. The node must exist and it must be unique.mNumPositionKeys– The number of position keysmPositionKeys– The position keys of this animation channel. Positions are specified as 3D vector. The array ismNumPositionKeysin size. If there are position keys, there will also be at least one scaling and one rotation key.mNumRotationKeys– The number of rotation keysmRotationKeys– The rotation keys of this animation channel. Rotations are given as quaternions, which are 4D vectors. The array ismNumRotationKeysin size. If there are rotation keys, there will also be at least one scaling and one position key.mNumScalingKeys– The number of scaling keysmScalingKeys– The scaling keys of this animation channel. Scalings are specified as 3D vector. The array ismNumScalingKeysin size. If there are scaling keys, there will also be at least one position and one rotation key.mPreState– Defines how the animation behaves before the first key is encountered. The default value is aiAnimBehaviour_DEFAULT (the original transformation matrix of the affected node is used). One of:AnimBehaviour_DEFAULTAnimBehaviour_CONSTANTAnimBehaviour_LINEARAnimBehaviour_REPEATmPostState– Defines how the animation behaves after the last key was processed. The default value is aiAnimBehaviour_DEFAULT (the original transformation matrix of the affected node is taken). One of:AnimBehaviour_DEFAULTAnimBehaviour_CONSTANTAnimBehaviour_LINEARAnimBehaviour_REPEAT
Layout
struct aiNodeAnim {struct aiStringmNodeName; unsigned int mNumPositionKeys;struct aiVectorKey* mPositionKeys; unsigned int mNumRotationKeys;struct aiQuatKey* mRotationKeys; unsigned int mNumScalingKeys;struct aiVectorKey* mScalingKeys; aiAnimBehaviour mPreState; aiAnimBehaviour mPostState; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classAINodeAnim.BufferAn array ofAINodeAnimstructs.
-
Field Summary
Fields Modifier and Type Field Description static intALIGNOFThe struct alignment in bytes.static intMNODENAME
MNUMPOSITIONKEYS
MNUMROTATIONKEYS
MNUMSCALINGKEYS
MPOSITIONKEYS
MPOSTSTATE
MPRESTATE
MROTATIONKEYS
MSCALINGKEYSThe struct member offsets.static intSIZEOFThe struct size in bytes.
-
Constructor Summary
Constructors Constructor Description AINodeAnim(java.nio.ByteBuffer container)Creates aAINodeAniminstance at the current position of the specifiedByteBuffercontainer.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static AINodeAnimcalloc()Returns a newAINodeAniminstance allocated withmemCalloc.static AINodeAnim.Buffercalloc(int capacity)Returns a newAINodeAnim.Bufferinstance allocated withmemCalloc.static AINodeAnimcallocStack()Returns a newAINodeAniminstance allocated on the thread-localMemoryStackand initializes all its bits to zero.static AINodeAnim.BuffercallocStack(int capacity)Returns a newAINodeAnim.Bufferinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.static AINodeAnim.BuffercallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newAINodeAnim.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static AINodeAnimcallocStack(org.lwjgl.system.MemoryStack stack)Returns a newAINodeAniminstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static AINodeAnimcreate()Returns a newAINodeAniminstance allocated withBufferUtils.static AINodeAnim.Buffercreate(int capacity)Returns a newAINodeAnim.Bufferinstance allocated withBufferUtils.static AINodeAnimcreate(long address)Returns a newAINodeAniminstance for the specified memory address.static AINodeAnim.Buffercreate(long address, int capacity)Create aAINodeAnim.Bufferinstance at the specified memory.static AINodeAnimcreateSafe(long address)static AINodeAnim.BuffercreateSafe(long address, int capacity)static AINodeAnimmalloc()Returns a newAINodeAniminstance allocated withmemAlloc.static AINodeAnim.Buffermalloc(int capacity)Returns a newAINodeAnim.Bufferinstance allocated withmemAlloc.static AINodeAnimmallocStack()Returns a newAINodeAniminstance allocated on the thread-localMemoryStack.static AINodeAnim.BuffermallocStack(int capacity)Returns a newAINodeAnim.Bufferinstance allocated on the thread-localMemoryStack.static AINodeAnim.BuffermallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newAINodeAnim.Bufferinstance allocated on the specifiedMemoryStack.static AINodeAnimmallocStack(org.lwjgl.system.MemoryStack stack)Returns a newAINodeAniminstance allocated on the specifiedMemoryStack.AIStringmNodeName()Returns aAIStringview of themNodeNamefield.AINodeAnimmNodeName(java.util.function.Consumer<AIString> consumer)Passes themNodeNamefield to the specifiedConsumer.AINodeAnimmNodeName(AIString value)Copies the specifiedAIStringto themNodeNamefield.intmNumPositionKeys()Returns the value of themNumPositionKeysfield.intmNumRotationKeys()Returns the value of themNumRotationKeysfield.intmNumScalingKeys()Returns the value of themNumScalingKeysfield.AIVectorKey.BuffermPositionKeys()Returns aAIVectorKey.Bufferview of the struct array pointed to by themPositionKeysfield.AINodeAnimmPositionKeys(AIVectorKey.Buffer value)Sets the address of the specifiedAIVectorKey.Bufferto themPositionKeysfield.intmPostState()Returns the value of themPostStatefield.AINodeAnimmPostState(int value)Sets the specified value to themPostStatefield.intmPreState()Returns the value of themPreStatefield.AINodeAnimmPreState(int value)Sets the specified value to themPreStatefield.AIQuatKey.BuffermRotationKeys()Returns aAIQuatKey.Bufferview of the struct array pointed to by themRotationKeysfield.AINodeAnimmRotationKeys(AIQuatKey.Buffer value)Sets the address of the specifiedAIQuatKey.Bufferto themRotationKeysfield.AIVectorKey.BuffermScalingKeys()Returns aAIVectorKey.Bufferview of the struct array pointed to by themScalingKeysfield.AINodeAnimmScalingKeys(AIVectorKey.Buffer value)Sets the address of the specifiedAIVectorKey.Bufferto themScalingKeysfield.static AIStringnmNodeName(long struct)Unsafe version ofmNodeName().static voidnmNodeName(long struct, AIString value)Unsafe version ofmNodeName.static intnmNumPositionKeys(long struct)Unsafe version ofmNumPositionKeys().static voidnmNumPositionKeys(long struct, int value)Sets the specified value to themNumPositionKeysfield of the specifiedstruct.static intnmNumRotationKeys(long struct)Unsafe version ofmNumRotationKeys().static voidnmNumRotationKeys(long struct, int value)Sets the specified value to themNumRotationKeysfield of the specifiedstruct.static intnmNumScalingKeys(long struct)Unsafe version ofmNumScalingKeys().static voidnmNumScalingKeys(long struct, int value)Sets the specified value to themNumScalingKeysfield of the specifiedstruct.static AIVectorKey.BuffernmPositionKeys(long struct)Unsafe version ofmPositionKeys().static voidnmPositionKeys(long struct, AIVectorKey.Buffer value)Unsafe version ofmPositionKeys.static intnmPostState(long struct)Unsafe version ofmPostState().static voidnmPostState(long struct, int value)Unsafe version ofmPostState.static intnmPreState(long struct)Unsafe version ofmPreState().static voidnmPreState(long struct, int value)Unsafe version ofmPreState.static AIQuatKey.BuffernmRotationKeys(long struct)Unsafe version ofmRotationKeys().static voidnmRotationKeys(long struct, AIQuatKey.Buffer value)Unsafe version ofmRotationKeys.static AIVectorKey.BuffernmScalingKeys(long struct)Unsafe version ofmScalingKeys().static voidnmScalingKeys(long struct, AIVectorKey.Buffer value)Unsafe version ofmScalingKeys.AINodeAnimset(AINodeAnim src)Copies the specified struct data to this struct.AINodeAnimset(AIString mNodeName, AIVectorKey.Buffer mPositionKeys, AIQuatKey.Buffer mRotationKeys, AIVectorKey.Buffer mScalingKeys, int mPreState, int mPostState)Initializes this struct with the specified values.intsizeof()static voidvalidate(long struct)Validates pointer members that should not beNULL.static voidvalidate(long array, int count)Callsvalidate(long)for each struct contained in the specified struct array.
-
-
-
Constructor Detail
-
AINodeAnim
public AINodeAnim(java.nio.ByteBuffer container)
Creates aAINodeAniminstance at the current position of the specifiedByteBuffercontainer. Changes to the buffer's content will be visible to the struct instance and vice versa.The created instance holds a strong reference to the container object.
-
-
Method Detail
-
sizeof
public int sizeof()
- Specified by:
sizeofin classorg.lwjgl.system.Struct
-
mNumPositionKeys
public int mNumPositionKeys()
Returns the value of themNumPositionKeysfield.
-
mPositionKeys
@Nullable public AIVectorKey.Buffer mPositionKeys()
Returns aAIVectorKey.Bufferview of the struct array pointed to by themPositionKeysfield.
-
mNumRotationKeys
public int mNumRotationKeys()
Returns the value of themNumRotationKeysfield.
-
mRotationKeys
@Nullable public AIQuatKey.Buffer mRotationKeys()
Returns aAIQuatKey.Bufferview of the struct array pointed to by themRotationKeysfield.
-
mNumScalingKeys
public int mNumScalingKeys()
Returns the value of themNumScalingKeysfield.
-
mScalingKeys
@Nullable public AIVectorKey.Buffer mScalingKeys()
Returns aAIVectorKey.Bufferview of the struct array pointed to by themScalingKeysfield.
-
mPreState
public int mPreState()
Returns the value of themPreStatefield.
-
mPostState
public int mPostState()
Returns the value of themPostStatefield.
-
mNodeName
public AINodeAnim mNodeName(AIString value)
Copies the specifiedAIStringto themNodeNamefield.
-
mNodeName
public AINodeAnim mNodeName(java.util.function.Consumer<AIString> consumer)
Passes themNodeNamefield to the specifiedConsumer.
-
mPositionKeys
public AINodeAnim mPositionKeys(@Nullable AIVectorKey.Buffer value)
Sets the address of the specifiedAIVectorKey.Bufferto themPositionKeysfield.
-
mRotationKeys
public AINodeAnim mRotationKeys(@Nullable AIQuatKey.Buffer value)
Sets the address of the specifiedAIQuatKey.Bufferto themRotationKeysfield.
-
mScalingKeys
public AINodeAnim mScalingKeys(@Nullable AIVectorKey.Buffer value)
Sets the address of the specifiedAIVectorKey.Bufferto themScalingKeysfield.
-
mPreState
public AINodeAnim mPreState(int value)
Sets the specified value to themPreStatefield.
-
mPostState
public AINodeAnim mPostState(int value)
Sets the specified value to themPostStatefield.
-
set
public AINodeAnim set(AIString mNodeName, @Nullable AIVectorKey.Buffer mPositionKeys, @Nullable AIQuatKey.Buffer mRotationKeys, @Nullable AIVectorKey.Buffer mScalingKeys, int mPreState, int mPostState)
Initializes this struct with the specified values.
-
set
public AINodeAnim set(AINodeAnim src)
Copies the specified struct data to this struct.- Parameters:
src- the source struct- Returns:
- this struct
-
malloc
public static AINodeAnim malloc()
Returns a newAINodeAniminstance allocated withmemAlloc. The instance must be explicitly freed.
-
calloc
public static AINodeAnim calloc()
Returns a newAINodeAniminstance allocated withmemCalloc. The instance must be explicitly freed.
-
create
public static AINodeAnim create()
Returns a newAINodeAniminstance allocated withBufferUtils.
-
create
public static AINodeAnim create(long address)
Returns a newAINodeAniminstance for the specified memory address.
-
createSafe
@Nullable public static AINodeAnim createSafe(long address)
-
malloc
public static AINodeAnim.Buffer malloc(int capacity)
Returns a newAINodeAnim.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
public static AINodeAnim.Buffer calloc(int capacity)
Returns a newAINodeAnim.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
public static AINodeAnim.Buffer create(int capacity)
Returns a newAINodeAnim.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
public static AINodeAnim.Buffer create(long address, int capacity)
Create aAINodeAnim.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
@Nullable public static AINodeAnim.Buffer createSafe(long address, int capacity)
-
mallocStack
public static AINodeAnim mallocStack()
Returns a newAINodeAniminstance allocated on the thread-localMemoryStack.
-
callocStack
public static AINodeAnim callocStack()
Returns a newAINodeAniminstance allocated on the thread-localMemoryStackand initializes all its bits to zero.
-
mallocStack
public static AINodeAnim mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newAINodeAniminstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
callocStack
public static AINodeAnim callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newAINodeAniminstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
mallocStack
public static AINodeAnim.Buffer mallocStack(int capacity)
Returns a newAINodeAnim.Bufferinstance allocated on the thread-localMemoryStack.- Parameters:
capacity- the buffer capacity
-
callocStack
public static AINodeAnim.Buffer callocStack(int capacity)
Returns a newAINodeAnim.Bufferinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.- Parameters:
capacity- the buffer capacity
-
mallocStack
public static AINodeAnim.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newAINodeAnim.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
callocStack
public static AINodeAnim.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newAINodeAnim.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
nmNodeName
public static AIString nmNodeName(long struct)
Unsafe version ofmNodeName().
-
nmNumPositionKeys
public static int nmNumPositionKeys(long struct)
Unsafe version ofmNumPositionKeys().
-
nmPositionKeys
@Nullable public static AIVectorKey.Buffer nmPositionKeys(long struct)
Unsafe version ofmPositionKeys().
-
nmNumRotationKeys
public static int nmNumRotationKeys(long struct)
Unsafe version ofmNumRotationKeys().
-
nmRotationKeys
@Nullable public static AIQuatKey.Buffer nmRotationKeys(long struct)
Unsafe version ofmRotationKeys().
-
nmNumScalingKeys
public static int nmNumScalingKeys(long struct)
Unsafe version ofmNumScalingKeys().
-
nmScalingKeys
@Nullable public static AIVectorKey.Buffer nmScalingKeys(long struct)
Unsafe version ofmScalingKeys().
-
nmPreState
public static int nmPreState(long struct)
Unsafe version ofmPreState().
-
nmPostState
public static int nmPostState(long struct)
Unsafe version ofmPostState().
-
nmNumPositionKeys
public static void nmNumPositionKeys(long struct, int value)Sets the specified value to themNumPositionKeysfield of the specifiedstruct.
-
nmPositionKeys
public static void nmPositionKeys(long struct, @Nullable AIVectorKey.Buffer value)Unsafe version ofmPositionKeys.
-
nmNumRotationKeys
public static void nmNumRotationKeys(long struct, int value)Sets the specified value to themNumRotationKeysfield of the specifiedstruct.
-
nmRotationKeys
public static void nmRotationKeys(long struct, @Nullable AIQuatKey.Buffer value)Unsafe version ofmRotationKeys.
-
nmNumScalingKeys
public static void nmNumScalingKeys(long struct, int value)Sets the specified value to themNumScalingKeysfield of the specifiedstruct.
-
nmScalingKeys
public static void nmScalingKeys(long struct, @Nullable AIVectorKey.Buffer value)Unsafe version ofmScalingKeys.
-
nmPreState
public static void nmPreState(long struct, int value)Unsafe version ofmPreState.
-
nmPostState
public static void nmPostState(long struct, int value)Unsafe version ofmPostState.
-
validate
public static void validate(long struct)
Validates pointer members that should not beNULL.- Parameters:
struct- the struct to validate
-
validate
public static void validate(long array, int count)Callsvalidate(long)for each struct contained in the specified struct array.- Parameters:
array- the struct array to validatecount- the number of structs inarray
-
-