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.NativeResource
Describes 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! )
Layout
struct aiNodeAnim {
struct aiString
mNodeName()
; unsigned intmNumPositionKeys()
;struct aiVectorKey
*mPositionKeys()
; unsigned intmNumRotationKeys()
;struct aiQuatKey
*mRotationKeys()
; unsigned intmNumScalingKeys()
;struct aiVectorKey
*mScalingKeys()
; aiAnimBehaviourmPreState()
; aiAnimBehaviourmPostState()
; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
AINodeAnim.Buffer
An array ofAINodeAnim
structs.
-
Field Summary
Fields Modifier and Type Field Description static int
ALIGNOF
The struct alignment in bytes.static int
MNODENAME
MNUMPOSITIONKEYS
MNUMROTATIONKEYS
MNUMSCALINGKEYS
MPOSITIONKEYS
MPOSTSTATE
MPRESTATE
MROTATIONKEYS
MSCALINGKEYSThe struct member offsets.static int
SIZEOF
The struct size in bytes.
-
Constructor Summary
Constructors Constructor Description AINodeAnim(java.nio.ByteBuffer container)
Creates aAINodeAnim
instance at the current position of the specifiedByteBuffer
container.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static AINodeAnim
calloc()
Returns a newAINodeAnim
instance allocated withmemCalloc
.static AINodeAnim.Buffer
calloc(int capacity)
Returns a newAINodeAnim.Buffer
instance allocated withmemCalloc
.static AINodeAnim.Buffer
calloc(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newAINodeAnim.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static AINodeAnim
calloc(org.lwjgl.system.MemoryStack stack)
Returns a newAINodeAnim
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static AINodeAnim
callocStack()
Deprecated.static AINodeAnim.Buffer
callocStack(int capacity)
Deprecated.static AINodeAnim.Buffer
callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Deprecated.static AINodeAnim
callocStack(org.lwjgl.system.MemoryStack stack)
Deprecated.static AINodeAnim
create()
Returns a newAINodeAnim
instance allocated withBufferUtils
.static AINodeAnim.Buffer
create(int capacity)
Returns a newAINodeAnim.Buffer
instance allocated withBufferUtils
.static AINodeAnim
create(long address)
Returns a newAINodeAnim
instance for the specified memory address.static AINodeAnim.Buffer
create(long address, int capacity)
Create aAINodeAnim.Buffer
instance at the specified memory.static AINodeAnim
createSafe(long address)
static AINodeAnim.Buffer
createSafe(long address, int capacity)
static AINodeAnim
malloc()
Returns a newAINodeAnim
instance allocated withmemAlloc
.static AINodeAnim.Buffer
malloc(int capacity)
Returns a newAINodeAnim.Buffer
instance allocated withmemAlloc
.static AINodeAnim.Buffer
malloc(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newAINodeAnim.Buffer
instance allocated on the specifiedMemoryStack
.static AINodeAnim
malloc(org.lwjgl.system.MemoryStack stack)
Returns a newAINodeAnim
instance allocated on the specifiedMemoryStack
.static AINodeAnim
mallocStack()
Deprecated.static AINodeAnim.Buffer
mallocStack(int capacity)
Deprecated.static AINodeAnim.Buffer
mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Deprecated.static AINodeAnim
mallocStack(org.lwjgl.system.MemoryStack stack)
Deprecated.AIString
mNodeName()
The name of the node affected by this animation.AINodeAnim
mNodeName(java.util.function.Consumer<AIString> consumer)
Passes themNodeName()
field to the specifiedConsumer
.AINodeAnim
mNodeName(AIString value)
Copies the specifiedAIString
to themNodeName()
field.int
mNumPositionKeys()
The number of position keysint
mNumRotationKeys()
The number of rotation keysint
mNumScalingKeys()
The number of scaling keysAIVectorKey.Buffer
mPositionKeys()
The position keys of this animation channel.AINodeAnim
mPositionKeys(AIVectorKey.Buffer value)
Sets the address of the specifiedAIVectorKey.Buffer
to themPositionKeys()
field.int
mPostState()
Defines how the animation behaves after the last key was processed.AINodeAnim
mPostState(int value)
Sets the specified value to themPostState()
field.int
mPreState()
Defines how the animation behaves before the first key is encountered.AINodeAnim
mPreState(int value)
Sets the specified value to themPreState()
field.AIQuatKey.Buffer
mRotationKeys()
The rotation keys of this animation channel.AINodeAnim
mRotationKeys(AIQuatKey.Buffer value)
Sets the address of the specifiedAIQuatKey.Buffer
to themRotationKeys()
field.AIVectorKey.Buffer
mScalingKeys()
The scaling keys of this animation channel.AINodeAnim
mScalingKeys(AIVectorKey.Buffer value)
Sets the address of the specifiedAIVectorKey.Buffer
to themScalingKeys()
field.static AIString
nmNodeName(long struct)
Unsafe version ofmNodeName()
.static void
nmNodeName(long struct, AIString value)
Unsafe version ofmNodeName
.static int
nmNumPositionKeys(long struct)
Unsafe version ofmNumPositionKeys()
.static void
nmNumPositionKeys(long struct, int value)
Sets the specified value to themNumPositionKeys
field of the specifiedstruct
.static int
nmNumRotationKeys(long struct)
Unsafe version ofmNumRotationKeys()
.static void
nmNumRotationKeys(long struct, int value)
Sets the specified value to themNumRotationKeys
field of the specifiedstruct
.static int
nmNumScalingKeys(long struct)
Unsafe version ofmNumScalingKeys()
.static void
nmNumScalingKeys(long struct, int value)
Sets the specified value to themNumScalingKeys
field of the specifiedstruct
.static AIVectorKey.Buffer
nmPositionKeys(long struct)
Unsafe version ofmPositionKeys()
.static void
nmPositionKeys(long struct, AIVectorKey.Buffer value)
Unsafe version ofmPositionKeys
.static int
nmPostState(long struct)
Unsafe version ofmPostState()
.static void
nmPostState(long struct, int value)
Unsafe version ofmPostState
.static int
nmPreState(long struct)
Unsafe version ofmPreState()
.static void
nmPreState(long struct, int value)
Unsafe version ofmPreState
.static AIQuatKey.Buffer
nmRotationKeys(long struct)
Unsafe version ofmRotationKeys()
.static void
nmRotationKeys(long struct, AIQuatKey.Buffer value)
Unsafe version ofmRotationKeys
.static AIVectorKey.Buffer
nmScalingKeys(long struct)
Unsafe version ofmScalingKeys()
.static void
nmScalingKeys(long struct, AIVectorKey.Buffer value)
Unsafe version ofmScalingKeys
.AINodeAnim
set(AINodeAnim src)
Copies the specified struct data to this struct.AINodeAnim
set(AIString mNodeName, AIVectorKey.Buffer mPositionKeys, AIQuatKey.Buffer mRotationKeys, AIVectorKey.Buffer mScalingKeys, int mPreState, int mPostState)
Initializes this struct with the specified values.int
sizeof()
static void
validate(long struct)
Validates pointer members that should not beNULL
.
-
-
-
Constructor Detail
-
AINodeAnim
public AINodeAnim(java.nio.ByteBuffer container)
Creates aAINodeAnim
instance at the current position of the specifiedByteBuffer
container. 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:
sizeof
in classorg.lwjgl.system.Struct
-
mNodeName
public AIString mNodeName()
The name of the node affected by this animation. The node must exist and it must be unique.
-
mNumPositionKeys
public int mNumPositionKeys()
The number of position keys
-
mPositionKeys
@Nullable public AIVectorKey.Buffer mPositionKeys()
The position keys of this animation channel. Positions are specified as 3D vector. The array ismNumPositionKeys
in size. If there are position keys, there will also be at least one scaling and one rotation key.
-
mNumRotationKeys
public int mNumRotationKeys()
The number of rotation keys
-
mRotationKeys
@Nullable public AIQuatKey.Buffer mRotationKeys()
The rotation keys of this animation channel. Rotations are given as quaternions, which are 4D vectors. The array ismNumRotationKeys
in size. If there are rotation keys, there will also be at least one scaling and one position key.
-
mNumScalingKeys
public int mNumScalingKeys()
The number of scaling keys
-
mScalingKeys
@Nullable public AIVectorKey.Buffer mScalingKeys()
The scaling keys of this animation channel. Scalings are specified as 3D vector. The array ismNumScalingKeys
in size. If there are scaling keys, there will also be at least one position and one rotation key.
-
mPreState
public int 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_DEFAULT
AnimBehaviour_CONSTANT
AnimBehaviour_LINEAR
AnimBehaviour_REPEAT
-
mPostState
public int mPostState()
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_DEFAULT
AnimBehaviour_CONSTANT
AnimBehaviour_LINEAR
AnimBehaviour_REPEAT
-
mNodeName
public AINodeAnim mNodeName(AIString value)
Copies the specifiedAIString
to themNodeName()
field.
-
mNodeName
public AINodeAnim mNodeName(java.util.function.Consumer<AIString> consumer)
Passes themNodeName()
field to the specifiedConsumer
.
-
mPositionKeys
public AINodeAnim mPositionKeys(@Nullable AIVectorKey.Buffer value)
Sets the address of the specifiedAIVectorKey.Buffer
to themPositionKeys()
field.
-
mRotationKeys
public AINodeAnim mRotationKeys(@Nullable AIQuatKey.Buffer value)
Sets the address of the specifiedAIQuatKey.Buffer
to themRotationKeys()
field.
-
mScalingKeys
public AINodeAnim mScalingKeys(@Nullable AIVectorKey.Buffer value)
Sets the address of the specifiedAIVectorKey.Buffer
to themScalingKeys()
field.
-
mPreState
public AINodeAnim mPreState(int value)
Sets the specified value to themPreState()
field.
-
mPostState
public AINodeAnim mPostState(int value)
Sets the specified value to themPostState()
field.
-
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 newAINodeAnim
instance allocated withmemAlloc
. The instance must be explicitly freed.
-
calloc
public static AINodeAnim calloc()
Returns a newAINodeAnim
instance allocated withmemCalloc
. The instance must be explicitly freed.
-
create
public static AINodeAnim create()
Returns a newAINodeAnim
instance allocated withBufferUtils
.
-
create
public static AINodeAnim create(long address)
Returns a newAINodeAnim
instance for the specified memory address.
-
createSafe
@Nullable public static AINodeAnim createSafe(long address)
-
malloc
public static AINodeAnim.Buffer malloc(int capacity)
Returns a newAINodeAnim.Buffer
instance allocated withmemAlloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
calloc
public static AINodeAnim.Buffer calloc(int capacity)
Returns a newAINodeAnim.Buffer
instance allocated withmemCalloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
create
public static AINodeAnim.Buffer create(int capacity)
Returns a newAINodeAnim.Buffer
instance allocated withBufferUtils
.- Parameters:
capacity
- the buffer capacity
-
create
public static AINodeAnim.Buffer create(long address, int capacity)
Create aAINodeAnim.Buffer
instance at the specified memory.- Parameters:
address
- the memory addresscapacity
- the buffer capacity
-
createSafe
@Nullable public static AINodeAnim.Buffer createSafe(long address, int capacity)
-
mallocStack
@Deprecated public static AINodeAnim mallocStack()
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)
instead.
-
callocStack
@Deprecated public static AINodeAnim callocStack()
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)
instead.
-
mallocStack
@Deprecated public static AINodeAnim mallocStack(org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)
instead.
-
callocStack
@Deprecated public static AINodeAnim callocStack(org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)
instead.
-
mallocStack
@Deprecated public static AINodeAnim.Buffer mallocStack(int capacity)
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)
instead.
-
callocStack
@Deprecated public static AINodeAnim.Buffer callocStack(int capacity)
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)
instead.
-
mallocStack
@Deprecated public static AINodeAnim.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)
instead.
-
callocStack
@Deprecated public static AINodeAnim.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)
instead.
-
malloc
public static AINodeAnim malloc(org.lwjgl.system.MemoryStack stack)
Returns a newAINodeAnim
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
calloc
public static AINodeAnim calloc(org.lwjgl.system.MemoryStack stack)
Returns a newAINodeAnim
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocate
-
malloc
public static AINodeAnim.Buffer malloc(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newAINodeAnim.Buffer
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
calloc
public static AINodeAnim.Buffer calloc(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newAINodeAnim.Buffer
instance allocated on the specifiedMemoryStack
and 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 themNumPositionKeys
field 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 themNumRotationKeys
field 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 themNumScalingKeys
field 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
-
-