Package org.lwjgl.assimp
Class AIAnimation
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.assimp.AIAnimation
-
- All Implemented Interfaces:
java.lang.AutoCloseable,org.lwjgl.system.NativeResource,org.lwjgl.system.Pointer
public class AIAnimation extends org.lwjgl.system.Struct implements org.lwjgl.system.NativeResourceAn animation consists of keyframe data for a number of nodes. For each node affected by the animation a separate series of data is given.Layout
struct aiAnimation {struct aiStringmName(); doublemDuration(); doublemTicksPerSecond(); unsigned intmNumChannels();struct aiNodeAnim**mChannels(); unsigned intmNumMeshChannels();struct aiMeshAnim**mMeshChannels(); unsigned intmNumMorphMeshChannels();struct aiMeshMorphAnim**mMorphMeshChannels(); }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classAIAnimation.BufferAn array ofAIAnimationstructs.
-
Field Summary
Fields Modifier and Type Field Description static intALIGNOFThe struct alignment in bytes.static intMCHANNELS
MDURATION
MMESHCHANNELS
MMORPHMESHCHANNELS
MNAME
MNUMCHANNELS
MNUMMESHCHANNELS
MNUMMORPHMESHCHANNELS
MTICKSPERSECONDThe struct member offsets.static intSIZEOFThe struct size in bytes.
-
Constructor Summary
Constructors Constructor Description AIAnimation(java.nio.ByteBuffer container)Creates aAIAnimationinstance at the current position of the specifiedByteBuffercontainer.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static AIAnimationcalloc()Returns a newAIAnimationinstance allocated withmemCalloc.static AIAnimation.Buffercalloc(int capacity)Returns a newAIAnimation.Bufferinstance allocated withmemCalloc.static AIAnimation.Buffercalloc(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newAIAnimation.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static AIAnimationcalloc(org.lwjgl.system.MemoryStack stack)Returns a newAIAnimationinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static AIAnimationcallocStack()Deprecated.static AIAnimation.BuffercallocStack(int capacity)Deprecated.static AIAnimation.BuffercallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Deprecated.static AIAnimationcallocStack(org.lwjgl.system.MemoryStack stack)Deprecated.static AIAnimationcreate()Returns a newAIAnimationinstance allocated withBufferUtils.static AIAnimation.Buffercreate(int capacity)Returns a newAIAnimation.Bufferinstance allocated withBufferUtils.static AIAnimationcreate(long address)Returns a newAIAnimationinstance for the specified memory address.static AIAnimation.Buffercreate(long address, int capacity)Create aAIAnimation.Bufferinstance at the specified memory.static AIAnimationcreateSafe(long address)static AIAnimation.BuffercreateSafe(long address, int capacity)static AIAnimationmalloc()Returns a newAIAnimationinstance allocated withmemAlloc.static AIAnimation.Buffermalloc(int capacity)Returns a newAIAnimation.Bufferinstance allocated withmemAlloc.static AIAnimation.Buffermalloc(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newAIAnimation.Bufferinstance allocated on the specifiedMemoryStack.static AIAnimationmalloc(org.lwjgl.system.MemoryStack stack)Returns a newAIAnimationinstance allocated on the specifiedMemoryStack.static AIAnimationmallocStack()Deprecated.static AIAnimation.BuffermallocStack(int capacity)Deprecated.static AIAnimation.BuffermallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Deprecated.static AIAnimationmallocStack(org.lwjgl.system.MemoryStack stack)Deprecated.org.lwjgl.PointerBuffermChannels()The node animation channels.AIAnimationmChannels(org.lwjgl.PointerBuffer value)Sets the address of the specifiedPointerBufferto themChannels()field.doublemDuration()Duration of the animation in ticks.AIAnimationmDuration(double value)Sets the specified value to themDuration()field.org.lwjgl.PointerBuffermMeshChannels()The mesh animation channels.AIAnimationmMeshChannels(org.lwjgl.PointerBuffer value)Sets the address of the specifiedPointerBufferto themMeshChannels()field.org.lwjgl.PointerBuffermMorphMeshChannels()the morph mesh animation channels.AIAnimationmMorphMeshChannels(org.lwjgl.PointerBuffer value)Sets the address of the specifiedPointerBufferto themMorphMeshChannels()field.AIStringmName()The name of the animation.AIAnimationmName(java.util.function.Consumer<AIString> consumer)Passes themName()field to the specifiedConsumer.AIAnimationmName(AIString value)intmNumChannels()The number of bone animation channels.intmNumMeshChannels()The number of mesh animation channels.intmNumMorphMeshChannels()the number of mesh animation channels.doublemTicksPerSecond()Ticks per second.AIAnimationmTicksPerSecond(double value)Sets the specified value to themTicksPerSecond()field.static org.lwjgl.PointerBuffernmChannels(long struct)Unsafe version ofmChannels.static voidnmChannels(long struct, org.lwjgl.PointerBuffer value)Unsafe version ofmChannels.static doublenmDuration(long struct)Unsafe version ofmDuration().static voidnmDuration(long struct, double value)Unsafe version ofmDuration.static org.lwjgl.PointerBuffernmMeshChannels(long struct)Unsafe version ofmMeshChannels.static voidnmMeshChannels(long struct, org.lwjgl.PointerBuffer value)Unsafe version ofmMeshChannels.static org.lwjgl.PointerBuffernmMorphMeshChannels(long struct)Unsafe version ofmMorphMeshChannels.static voidnmMorphMeshChannels(long struct, org.lwjgl.PointerBuffer value)Unsafe version ofmMorphMeshChannels.static AIStringnmName(long struct)Unsafe version ofmName().static voidnmName(long struct, AIString value)Unsafe version ofmName.static intnmNumChannels(long struct)Unsafe version ofmNumChannels().static voidnmNumChannels(long struct, int value)Sets the specified value to themNumChannelsfield of the specifiedstruct.static intnmNumMeshChannels(long struct)Unsafe version ofmNumMeshChannels().static voidnmNumMeshChannels(long struct, int value)Sets the specified value to themNumMeshChannelsfield of the specifiedstruct.static intnmNumMorphMeshChannels(long struct)Unsafe version ofmNumMorphMeshChannels().static voidnmNumMorphMeshChannels(long struct, int value)Sets the specified value to themNumMorphMeshChannelsfield of the specifiedstruct.static doublenmTicksPerSecond(long struct)Unsafe version ofmTicksPerSecond().static voidnmTicksPerSecond(long struct, double value)Unsafe version ofmTicksPerSecond.AIAnimationset(AIAnimation src)Copies the specified struct data to this struct.AIAnimationset(AIString mName, double mDuration, double mTicksPerSecond, org.lwjgl.PointerBuffer mChannels, org.lwjgl.PointerBuffer mMeshChannels, org.lwjgl.PointerBuffer mMorphMeshChannels)Initializes this struct with the specified values.intsizeof()static voidvalidate(long struct)Validates pointer members that should not beNULL.
-
-
-
Constructor Detail
-
AIAnimation
public AIAnimation(java.nio.ByteBuffer container)
Creates aAIAnimationinstance 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
-
mName
public AIString mName()
The name of the animation. If the modeling package this data was exported from does support only a single animation channel, this name is usually empty (length is zero).
-
mDuration
public double mDuration()
Duration of the animation in ticks.
-
mTicksPerSecond
public double mTicksPerSecond()
Ticks per second. 0 if not specified in the imported file
-
mNumChannels
public int mNumChannels()
The number of bone animation channels. Each channel affects a single node.
-
mChannels
@Nullable public org.lwjgl.PointerBuffer mChannels()
The node animation channels. Each channel affects a single node. The array ismNumChannelsin size.
-
mNumMeshChannels
public int mNumMeshChannels()
The number of mesh animation channels. Each channel affects a single mesh and defines vertex-based animation.
-
mMeshChannels
@Nullable public org.lwjgl.PointerBuffer mMeshChannels()
The mesh animation channels. Each channel affects a single mesh. The array ismNumMeshChannelsin size.
-
mNumMorphMeshChannels
public int mNumMorphMeshChannels()
the number of mesh animation channels. Each channel affects a single mesh and defines morphing animation.
-
mMorphMeshChannels
@Nullable public org.lwjgl.PointerBuffer mMorphMeshChannels()
the morph mesh animation channels. Each channel affects a single mesh. The array ismNumMorphMeshChannelsin size.
-
mName
public AIAnimation mName(AIString value)
-
mName
public AIAnimation mName(java.util.function.Consumer<AIString> consumer)
Passes themName()field to the specifiedConsumer.
-
mDuration
public AIAnimation mDuration(double value)
Sets the specified value to themDuration()field.
-
mTicksPerSecond
public AIAnimation mTicksPerSecond(double value)
Sets the specified value to themTicksPerSecond()field.
-
mChannels
public AIAnimation mChannels(@Nullable org.lwjgl.PointerBuffer value)
Sets the address of the specifiedPointerBufferto themChannels()field.
-
mMeshChannels
public AIAnimation mMeshChannels(@Nullable org.lwjgl.PointerBuffer value)
Sets the address of the specifiedPointerBufferto themMeshChannels()field.
-
mMorphMeshChannels
public AIAnimation mMorphMeshChannels(@Nullable org.lwjgl.PointerBuffer value)
Sets the address of the specifiedPointerBufferto themMorphMeshChannels()field.
-
set
public AIAnimation set(AIString mName, double mDuration, double mTicksPerSecond, @Nullable org.lwjgl.PointerBuffer mChannels, @Nullable org.lwjgl.PointerBuffer mMeshChannels, @Nullable org.lwjgl.PointerBuffer mMorphMeshChannels)
Initializes this struct with the specified values.
-
set
public AIAnimation set(AIAnimation src)
Copies the specified struct data to this struct.- Parameters:
src- the source struct- Returns:
- this struct
-
malloc
public static AIAnimation malloc()
Returns a newAIAnimationinstance allocated withmemAlloc. The instance must be explicitly freed.
-
calloc
public static AIAnimation calloc()
Returns a newAIAnimationinstance allocated withmemCalloc. The instance must be explicitly freed.
-
create
public static AIAnimation create()
Returns a newAIAnimationinstance allocated withBufferUtils.
-
create
public static AIAnimation create(long address)
Returns a newAIAnimationinstance for the specified memory address.
-
createSafe
@Nullable public static AIAnimation createSafe(long address)
-
malloc
public static AIAnimation.Buffer malloc(int capacity)
Returns a newAIAnimation.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
public static AIAnimation.Buffer calloc(int capacity)
Returns a newAIAnimation.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
public static AIAnimation.Buffer create(int capacity)
Returns a newAIAnimation.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
public static AIAnimation.Buffer create(long address, int capacity)
Create aAIAnimation.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
@Nullable public static AIAnimation.Buffer createSafe(long address, int capacity)
-
mallocStack
@Deprecated public static AIAnimation mallocStack()
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)instead.
-
callocStack
@Deprecated public static AIAnimation callocStack()
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)instead.
-
mallocStack
@Deprecated public static AIAnimation mallocStack(org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)instead.
-
callocStack
@Deprecated public static AIAnimation callocStack(org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)instead.
-
mallocStack
@Deprecated public static AIAnimation.Buffer mallocStack(int capacity)
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)instead.
-
callocStack
@Deprecated public static AIAnimation.Buffer callocStack(int capacity)
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)instead.
-
mallocStack
@Deprecated public static AIAnimation.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 AIAnimation.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)instead.
-
malloc
public static AIAnimation malloc(org.lwjgl.system.MemoryStack stack)
Returns a newAIAnimationinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
public static AIAnimation calloc(org.lwjgl.system.MemoryStack stack)
Returns a newAIAnimationinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
malloc
public static AIAnimation.Buffer malloc(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newAIAnimation.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
calloc
public static AIAnimation.Buffer calloc(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newAIAnimation.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
nmDuration
public static double nmDuration(long struct)
Unsafe version ofmDuration().
-
nmTicksPerSecond
public static double nmTicksPerSecond(long struct)
Unsafe version ofmTicksPerSecond().
-
nmNumChannels
public static int nmNumChannels(long struct)
Unsafe version ofmNumChannels().
-
nmChannels
@Nullable public static org.lwjgl.PointerBuffer nmChannels(long struct)
Unsafe version ofmChannels.
-
nmNumMeshChannels
public static int nmNumMeshChannels(long struct)
Unsafe version ofmNumMeshChannels().
-
nmMeshChannels
@Nullable public static org.lwjgl.PointerBuffer nmMeshChannels(long struct)
Unsafe version ofmMeshChannels.
-
nmNumMorphMeshChannels
public static int nmNumMorphMeshChannels(long struct)
Unsafe version ofmNumMorphMeshChannels().
-
nmMorphMeshChannels
@Nullable public static org.lwjgl.PointerBuffer nmMorphMeshChannels(long struct)
Unsafe version ofmMorphMeshChannels.
-
nmDuration
public static void nmDuration(long struct, double value)Unsafe version ofmDuration.
-
nmTicksPerSecond
public static void nmTicksPerSecond(long struct, double value)Unsafe version ofmTicksPerSecond.
-
nmNumChannels
public static void nmNumChannels(long struct, int value)Sets the specified value to themNumChannelsfield of the specifiedstruct.
-
nmChannels
public static void nmChannels(long struct, @Nullable org.lwjgl.PointerBuffer value)Unsafe version ofmChannels.
-
nmNumMeshChannels
public static void nmNumMeshChannels(long struct, int value)Sets the specified value to themNumMeshChannelsfield of the specifiedstruct.
-
nmMeshChannels
public static void nmMeshChannels(long struct, @Nullable org.lwjgl.PointerBuffer value)Unsafe version ofmMeshChannels.
-
nmNumMorphMeshChannels
public static void nmNumMorphMeshChannels(long struct, int value)Sets the specified value to themNumMorphMeshChannelsfield of the specifiedstruct.
-
nmMorphMeshChannels
public static void nmMorphMeshChannels(long struct, @Nullable org.lwjgl.PointerBuffer value)Unsafe version ofmMorphMeshChannels.
-
validate
public static void validate(long struct)
Validates pointer members that should not beNULL.- Parameters:
struct- the struct to validate
-
-