Package org.lwjgl.assimp
Class AIBone
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.assimp.AIBone
-
- All Implemented Interfaces:
- java.lang.AutoCloseable, org.lwjgl.system.NativeResource, org.lwjgl.system.Pointer
public class AIBone extends org.lwjgl.system.Struct implements org.lwjgl.system.NativeResource
A single bone of a mesh.A bone has a name by which it can be found in the frame hierarchy and by which it can be addressed by animations. In addition it has a number of influences on vertices.
Member documentation
mName
– The name of the bone.mNumWeights
– The number of vertices affected by this bone. The maximum value for this member isAssimp.AI_MAX_BONE_WEIGHTS
.mWeights
– The vertices affected by this bonemOffsetMatrix
– Matrix that transforms from mesh space to bone space in bind pose
Layout
struct aiBone {
struct aiString
mName; unsigned int mNumWeights;struct aiVertexWeight
* mWeights;struct aiMatrix4x4
mOffsetMatrix; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class and Description static class
AIBone.Buffer
An array ofAIBone
structs.
-
Field Summary
Fields Modifier and Type Field and Description static int
SIZEOF
The struct size in bytes.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method and Description static AIBone
calloc()
Returns a newAIBone
instance allocated withmemCalloc
.static AIBone.Buffer
calloc(int capacity)
Returns a newAIBone.Buffer
instance allocated withmemCalloc
.static AIBone
callocStack()
Returns a newAIBone
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static AIBone.Buffer
callocStack(int capacity)
Returns a newAIBone.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static AIBone.Buffer
callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newAIBone.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static AIBone
callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newAIBone
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static AIBone
create()
Returns a newAIBone
instance allocated withBufferUtils
.static AIBone.Buffer
create(int capacity)
Returns a newAIBone.Buffer
instance allocated withBufferUtils
.static AIBone
create(long address)
Returns a newAIBone
instance for the specified memory address.static AIBone.Buffer
create(long address, int capacity)
Create aAIBone.Buffer
instance at the specified memory.static AIBone
createSafe(long address)
static AIBone.Buffer
createSafe(long address, int capacity)
static AIBone
malloc()
Returns a newAIBone
instance allocated withmemAlloc
.static AIBone.Buffer
malloc(int capacity)
Returns a newAIBone.Buffer
instance allocated withmemAlloc
.static AIBone
mallocStack()
Returns a newAIBone
instance allocated on the thread-localMemoryStack
.static AIBone.Buffer
mallocStack(int capacity)
Returns a newAIBone.Buffer
instance allocated on the thread-localMemoryStack
.static AIBone.Buffer
mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newAIBone.Buffer
instance allocated on the specifiedMemoryStack
.static AIBone
mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newAIBone
instance allocated on the specifiedMemoryStack
.AIString
mName()
Returns aAIString
view of themName
field.AIBone
mName(AIString value)
Copies the specifiedAIString
to themName
field.int
mNumWeights()
Returns the value of themNumWeights
field.AIMatrix4x4
mOffsetMatrix()
Returns aAIMatrix4x4
view of themOffsetMatrix
field.AIBone
mOffsetMatrix(AIMatrix4x4 value)
Copies the specifiedAIMatrix4x4
to themOffsetMatrix
field.AIVertexWeight.Buffer
mWeights()
Returns aAIVertexWeight.Buffer
view of the struct array pointed to by themWeights
field.AIBone
mWeights(AIVertexWeight.Buffer value)
Sets the address of the specifiedAIVertexWeight.Buffer
to themWeights
field.AIBone
set(AIBone src)
Copies the specified struct data to this struct.AIBone
set(AIString mName, AIVertexWeight.Buffer mWeights, AIMatrix4x4 mOffsetMatrix)
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)
CallsAIBone.validate(long)
for each struct contained in the specified struct array.
-
-
-
Constructor Detail
-
AIBone
public AIBone(java.nio.ByteBuffer container)
Creates aAIBone
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
-
mNumWeights
public int mNumWeights()
Returns the value of themNumWeights
field.
-
mWeights
public AIVertexWeight.Buffer mWeights()
Returns aAIVertexWeight.Buffer
view of the struct array pointed to by themWeights
field.
-
mOffsetMatrix
public AIMatrix4x4 mOffsetMatrix()
Returns aAIMatrix4x4
view of themOffsetMatrix
field.
-
mWeights
public AIBone mWeights(AIVertexWeight.Buffer value)
Sets the address of the specifiedAIVertexWeight.Buffer
to themWeights
field.
-
mOffsetMatrix
public AIBone mOffsetMatrix(AIMatrix4x4 value)
Copies the specifiedAIMatrix4x4
to themOffsetMatrix
field.
-
set
public AIBone set(AIString mName, AIVertexWeight.Buffer mWeights, AIMatrix4x4 mOffsetMatrix)
Initializes this struct with the specified values.
-
set
public AIBone set(AIBone src)
Copies the specified struct data to this struct.- Parameters:
src
- the source struct- Returns:
- this struct
-
malloc
public static AIBone malloc()
Returns a newAIBone
instance allocated withmemAlloc
. The instance must be explicitly freed.
-
calloc
public static AIBone calloc()
Returns a newAIBone
instance allocated withmemCalloc
. The instance must be explicitly freed.
-
create
public static AIBone create(long address)
Returns a newAIBone
instance for the specified memory address.
-
createSafe
@Nullable public static AIBone createSafe(long address)
-
malloc
public static AIBone.Buffer malloc(int capacity)
Returns a newAIBone.Buffer
instance allocated withmemAlloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
calloc
public static AIBone.Buffer calloc(int capacity)
Returns a newAIBone.Buffer
instance allocated withmemCalloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
create
public static AIBone.Buffer create(int capacity)
Returns a newAIBone.Buffer
instance allocated withBufferUtils
.- Parameters:
capacity
- the buffer capacity
-
create
public static AIBone.Buffer create(long address, int capacity)
Create aAIBone.Buffer
instance at the specified memory.- Parameters:
address
- the memory addresscapacity
- the buffer capacity
-
createSafe
@Nullable public static AIBone.Buffer createSafe(long address, int capacity)
-
mallocStack
public static AIBone mallocStack()
Returns a newAIBone
instance allocated on the thread-localMemoryStack
.
-
callocStack
public static AIBone callocStack()
Returns a newAIBone
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.
-
mallocStack
public static AIBone mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newAIBone
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
callocStack
public static AIBone callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newAIBone
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocate
-
mallocStack
public static AIBone.Buffer mallocStack(int capacity)
Returns a newAIBone.Buffer
instance allocated on the thread-localMemoryStack
.- Parameters:
capacity
- the buffer capacity
-
callocStack
public static AIBone.Buffer callocStack(int capacity)
Returns a newAIBone.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.- Parameters:
capacity
- the buffer capacity
-
mallocStack
public static AIBone.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newAIBone.Buffer
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
callocStack
public static AIBone.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newAIBone.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)
CallsAIBone.validate(long)
for each struct contained in the specified struct array.- Parameters:
array
- the struct array to validatecount
- the number of structs inarray
-
-