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.NativeResource
An 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 ismNumChannels
in 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 ismNumMeshChannels
in size.
Layout
struct aiAnimation {
struct aiString
mName; double mDuration; double mTicksPerSecond; unsigned int mNumChannels;struct aiNodeAnim
** mChannels; unsigned int mNumMeshChannels;struct aiMeshAnim
** mMeshChannels; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class and Description static class
AIAnimation.Buffer
An array ofAIAnimation
structs.
-
Field Summary
Fields Modifier and Type Field and Description static int
SIZEOF
The struct size in bytes.
-
Constructor Summary
Constructors Constructor and Description AIAnimation(java.nio.ByteBuffer container)
Creates aAIAnimation
instance at the current position of the specifiedByteBuffer
container.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method and Description static AIAnimation
calloc()
Returns a newAIAnimation
instance allocated withmemCalloc
.static AIAnimation.Buffer
calloc(int capacity)
Returns a newAIAnimation.Buffer
instance allocated withmemCalloc
.static AIAnimation
callocStack()
Returns a newAIAnimation
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static AIAnimation.Buffer
callocStack(int capacity)
Returns a newAIAnimation.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static AIAnimation.Buffer
callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newAIAnimation.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static AIAnimation
callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newAIAnimation
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static AIAnimation
create()
Returns a newAIAnimation
instance allocated withBufferUtils
.static AIAnimation.Buffer
create(int capacity)
Returns a newAIAnimation.Buffer
instance allocated withBufferUtils
.static AIAnimation
create(long address)
Returns a newAIAnimation
instance for the specified memory address.static AIAnimation.Buffer
create(long address, int capacity)
Create aAIAnimation.Buffer
instance at the specified memory.static AIAnimation
createSafe(long address)
static AIAnimation.Buffer
createSafe(long address, int capacity)
static AIAnimation
malloc()
Returns a newAIAnimation
instance allocated withmemAlloc
.static AIAnimation.Buffer
malloc(int capacity)
Returns a newAIAnimation.Buffer
instance allocated withmemAlloc
.static AIAnimation
mallocStack()
Returns a newAIAnimation
instance allocated on the thread-localMemoryStack
.static AIAnimation.Buffer
mallocStack(int capacity)
Returns a newAIAnimation.Buffer
instance allocated on the thread-localMemoryStack
.static AIAnimation.Buffer
mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newAIAnimation.Buffer
instance allocated on the specifiedMemoryStack
.static AIAnimation
mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newAIAnimation
instance allocated on the specifiedMemoryStack
.org.lwjgl.PointerBuffer
mChannels()
Returns aPointerBuffer
view of the data pointed to by themChannels
field.AIAnimation
mChannels(org.lwjgl.PointerBuffer value)
Sets the address of the specifiedPointerBuffer
to themChannels
field.double
mDuration()
Returns the value of themDuration
field.AIAnimation
mDuration(double value)
Sets the specified value to themDuration
field.org.lwjgl.PointerBuffer
mMeshChannels()
Returns aPointerBuffer
view of the data pointed to by themMeshChannels
field.AIAnimation
mMeshChannels(org.lwjgl.PointerBuffer value)
Sets the address of the specifiedPointerBuffer
to themMeshChannels
field.AIString
mName()
Returns aAIString
view of themName
field.AIAnimation
mName(AIString value)
Copies the specifiedAIString
to themName
field.int
mNumChannels()
Returns the value of themNumChannels
field.int
mNumMeshChannels()
Returns the value of themNumMeshChannels
field.double
mTicksPerSecond()
Returns the value of themTicksPerSecond
field.AIAnimation
mTicksPerSecond(double value)
Sets the specified value to themTicksPerSecond
field.AIAnimation
set(AIAnimation src)
Copies the specified struct data to this struct.AIAnimation
set(AIString mName, double mDuration, double mTicksPerSecond, org.lwjgl.PointerBuffer mChannels, org.lwjgl.PointerBuffer mMeshChannels)
Initializes this struct with the specified values.int
sizeof()
static void
validate(long struct)
Validates pointer members that should not beNULL
.static void
validate(long array, int count)
CallsAIAnimation.validate(long)
for each struct contained in the specified struct array.
-
-
-
Constructor Detail
-
AIAnimation
public AIAnimation(java.nio.ByteBuffer container)
Creates aAIAnimation
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
-
mDuration
public double mDuration()
Returns the value of themDuration
field.
-
mTicksPerSecond
public double mTicksPerSecond()
Returns the value of themTicksPerSecond
field.
-
mNumChannels
public int mNumChannels()
Returns the value of themNumChannels
field.
-
mChannels
public org.lwjgl.PointerBuffer mChannels()
Returns aPointerBuffer
view of the data pointed to by themChannels
field.
-
mNumMeshChannels
public int mNumMeshChannels()
Returns the value of themNumMeshChannels
field.
-
mMeshChannels
public org.lwjgl.PointerBuffer mMeshChannels()
Returns aPointerBuffer
view of the data pointed to by themMeshChannels
field.
-
mName
public AIAnimation mName(AIString value)
Copies the specifiedAIString
to themName
field.
-
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(org.lwjgl.PointerBuffer value)
Sets the address of the specifiedPointerBuffer
to themChannels
field.
-
mMeshChannels
public AIAnimation mMeshChannels(org.lwjgl.PointerBuffer value)
Sets the address of the specifiedPointerBuffer
to themMeshChannels
field.
-
set
public AIAnimation set(AIString mName, double mDuration, double mTicksPerSecond, org.lwjgl.PointerBuffer mChannels, org.lwjgl.PointerBuffer mMeshChannels)
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 newAIAnimation
instance allocated withmemAlloc
. The instance must be explicitly freed.
-
calloc
public static AIAnimation calloc()
Returns a newAIAnimation
instance allocated withmemCalloc
. The instance must be explicitly freed.
-
create
public static AIAnimation create()
Returns a newAIAnimation
instance allocated withBufferUtils
.
-
create
public static AIAnimation create(long address)
Returns a newAIAnimation
instance for the specified memory address.
-
createSafe
@Nullable public static AIAnimation createSafe(long address)
-
malloc
public static AIAnimation.Buffer malloc(int capacity)
Returns a newAIAnimation.Buffer
instance allocated withmemAlloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
calloc
public static AIAnimation.Buffer calloc(int capacity)
Returns a newAIAnimation.Buffer
instance allocated withmemCalloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
create
public static AIAnimation.Buffer create(int capacity)
Returns a newAIAnimation.Buffer
instance allocated withBufferUtils
.- Parameters:
capacity
- the buffer capacity
-
create
public static AIAnimation.Buffer create(long address, int capacity)
Create aAIAnimation.Buffer
instance 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 newAIAnimation
instance allocated on the thread-localMemoryStack
.
-
callocStack
public static AIAnimation callocStack()
Returns a newAIAnimation
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.
-
mallocStack
public static AIAnimation mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newAIAnimation
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
callocStack
public static AIAnimation callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newAIAnimation
instance allocated on the specifiedMemoryStack
and 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.Buffer
instance allocated on the thread-localMemoryStack
.- Parameters:
capacity
- the buffer capacity
-
callocStack
public static AIAnimation.Buffer callocStack(int capacity)
Returns a newAIAnimation.Buffer
instance allocated on the thread-localMemoryStack
and 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.Buffer
instance 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.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
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)
CallsAIAnimation.validate(long)
for each struct contained in the specified struct array.- Parameters:
array
- the struct array to validatecount
- the number of structs inarray
-
-