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.Member documentation
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– Duration of the animation in ticks.mTicksPerSecond– Ticks per second. 0 if not specified in the imported filemNumChannels– The number of bone animation channels. Each channel affects a single node.mChannels– The node animation channels. Each channel affects a single node. The array ismNumChannelsin size.mNumMeshChannels– The number of mesh animation channels. Each channel affects a single mesh and defines vertex-based animation.mMeshChannels– The mesh animation channels. Each channel affects a single mesh. The array ismNumMeshChannelsin size.mNumMorphMeshChannels– the number of mesh animation channels. Each channel affects a single mesh and defines morphing animation.mMorphMeshChannels– the morph mesh animation channels. Each channel affects a single mesh. The array ismNumMorphMeshChannelsin size.
Layout
struct aiAnimation {struct aiStringmName; double mDuration; double mTicksPerSecond; unsigned int mNumChannels;struct aiNodeAnim** mChannels; unsigned int mNumMeshChannels;struct aiMeshAnim** mMeshChannels; unsigned int mNumMorphMeshChannels;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 Modifier and Type Method Description static AIAnimationcalloc()Returns a newAIAnimationinstance allocated withmemCalloc.static AIAnimation.Buffercalloc(int capacity)Returns a newAIAnimation.Bufferinstance allocated withmemCalloc.static AIAnimationcallocStack()Returns a newAIAnimationinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.static AIAnimation.BuffercallocStack(int capacity)Returns a newAIAnimation.Bufferinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.static AIAnimation.BuffercallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newAIAnimation.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static AIAnimationcallocStack(org.lwjgl.system.MemoryStack stack)Returns a newAIAnimationinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.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 AIAnimationmallocStack()Returns a newAIAnimationinstance allocated on the thread-localMemoryStack.static AIAnimation.BuffermallocStack(int capacity)Returns a newAIAnimation.Bufferinstance allocated on the thread-localMemoryStack.static AIAnimation.BuffermallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newAIAnimation.Bufferinstance allocated on the specifiedMemoryStack.static AIAnimationmallocStack(org.lwjgl.system.MemoryStack stack)Returns a newAIAnimationinstance allocated on the specifiedMemoryStack.org.lwjgl.PointerBuffermChannels()Returns aPointerBufferview of the data pointed to by themChannelsfield.AIAnimationmChannels(org.lwjgl.PointerBuffer value)Sets the address of the specifiedPointerBufferto themChannelsfield.doublemDuration()Returns the value of themDurationfield.AIAnimationmDuration(double value)Sets the specified value to themDurationfield.org.lwjgl.PointerBuffermMeshChannels()Returns aPointerBufferview of the data pointed to by themMeshChannelsfield.AIAnimationmMeshChannels(org.lwjgl.PointerBuffer value)Sets the address of the specifiedPointerBufferto themMeshChannelsfield.org.lwjgl.PointerBuffermMorphMeshChannels()Returns aPointerBufferview of the data pointed to by themMorphMeshChannelsfield.AIAnimationmMorphMeshChannels(org.lwjgl.PointerBuffer value)Sets the address of the specifiedPointerBufferto themMorphMeshChannelsfield.AIStringmName()Returns aAIStringview of themNamefield.AIAnimationmName(java.util.function.Consumer<AIString> consumer)Passes themNamefield to the specifiedConsumer.AIAnimationmName(AIString value)Copies the specifiedAIStringto themNamefield.intmNumChannels()Returns the value of themNumChannelsfield.intmNumMeshChannels()Returns the value of themNumMeshChannelsfield.intmNumMorphMeshChannels()Returns the value of themNumMorphMeshChannelsfield.doublemTicksPerSecond()Returns the value of themTicksPerSecondfield.AIAnimationmTicksPerSecond(double value)Sets the specified value to themTicksPerSecondfield.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.static voidvalidate(long array, int count)Callsvalidate(long)for each struct contained in the specified struct array.
-
-
-
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
-
mDuration
public double mDuration()
Returns the value of themDurationfield.
-
mTicksPerSecond
public double mTicksPerSecond()
Returns the value of themTicksPerSecondfield.
-
mNumChannels
public int mNumChannels()
Returns the value of themNumChannelsfield.
-
mChannels
@Nullable public org.lwjgl.PointerBuffer mChannels()
Returns aPointerBufferview of the data pointed to by themChannelsfield.
-
mNumMeshChannels
public int mNumMeshChannels()
Returns the value of themNumMeshChannelsfield.
-
mMeshChannels
@Nullable public org.lwjgl.PointerBuffer mMeshChannels()
Returns aPointerBufferview of the data pointed to by themMeshChannelsfield.
-
mNumMorphMeshChannels
public int mNumMorphMeshChannels()
Returns the value of themNumMorphMeshChannelsfield.
-
mMorphMeshChannels
@Nullable public org.lwjgl.PointerBuffer mMorphMeshChannels()
Returns aPointerBufferview of the data pointed to by themMorphMeshChannelsfield.
-
mName
public AIAnimation mName(AIString value)
Copies the specifiedAIStringto themNamefield.
-
mName
public AIAnimation mName(java.util.function.Consumer<AIString> consumer)
Passes themNamefield to the specifiedConsumer.
-
mDuration
public AIAnimation mDuration(double value)
Sets the specified value to themDurationfield.
-
mTicksPerSecond
public AIAnimation mTicksPerSecond(double value)
Sets the specified value to themTicksPerSecondfield.
-
mChannels
public AIAnimation mChannels(@Nullable org.lwjgl.PointerBuffer value)
Sets the address of the specifiedPointerBufferto themChannelsfield.
-
mMeshChannels
public AIAnimation mMeshChannels(@Nullable org.lwjgl.PointerBuffer value)
Sets the address of the specifiedPointerBufferto themMeshChannelsfield.
-
mMorphMeshChannels
public AIAnimation mMorphMeshChannels(@Nullable org.lwjgl.PointerBuffer value)
Sets the address of the specifiedPointerBufferto themMorphMeshChannelsfield.
-
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
public static AIAnimation mallocStack()
Returns a newAIAnimationinstance allocated on the thread-localMemoryStack.
-
callocStack
public static AIAnimation callocStack()
Returns a newAIAnimationinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.
-
mallocStack
public static AIAnimation mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newAIAnimationinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
callocStack
public static AIAnimation callocStack(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
-
mallocStack
public static AIAnimation.Buffer mallocStack(int capacity)
Returns a newAIAnimation.Bufferinstance allocated on the thread-localMemoryStack.- Parameters:
capacity- the buffer capacity
-
callocStack
public static AIAnimation.Buffer callocStack(int capacity)
Returns a newAIAnimation.Bufferinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.- Parameters:
capacity- the buffer capacity
-
mallocStack
public static AIAnimation.Buffer mallocStack(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
-
callocStack
public static AIAnimation.Buffer callocStack(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
-
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
-
-