public class AIBone
extends org.lwjgl.system.Struct
implements org.lwjgl.system.NativeResource
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, and a matrix relating the mesh position to the position of the bone at the time of binding.
mName – the name of the bone.mNumWeights – the number of vertices affected by this bone. The maximum value for this member is Assimp.AI_MAX_BONE_WEIGHTS.mArmature – the bone armature node - used for skeleton conversion you must enable Process_PopulateArmatureData to populate thismNode – the bone node in the scene - used for skeleton conversion you must enable Process_PopulateArmatureData to populate thismWeights – the influence weights of this bone, by vertex indexmOffsetMatrix –
matrix that transforms from bone space to mesh space in bind pose.
This matrix describes the position of the mesh in the local space of this bone when the skeleton was bound. Thus it can be used directly to determine a desired vertex position, given the world-space transform of the bone when animated, and the position of the vertex in mesh space.
It is sometimes called an inverse-bind matrix, or inverse bind pose matrix.
struct aiBone {
struct aiString mName;
unsigned int mNumWeights;
struct aiNode * mArmature;
struct aiNode * mNode;
struct aiVertexWeight * mWeights;
struct aiMatrix4x4 mOffsetMatrix;
}| Modifier and Type | Class and Description |
|---|---|
static class |
AIBone.Buffer
An array of
AIBone structs. |
| Modifier and Type | Field and Description |
|---|---|
static int |
ALIGNOF
The struct alignment in bytes.
|
static int |
MARMATURE
The struct member offsets.
|
static int |
MNAME
The struct member offsets.
|
static int |
MNODE
The struct member offsets.
|
static int |
MNUMWEIGHTS
The struct member offsets.
|
static int |
MOFFSETMATRIX
The struct member offsets.
|
static int |
MWEIGHTS
The struct member offsets.
|
static int |
SIZEOF
The struct size in bytes.
|
| Constructor and Description |
|---|
AIBone(java.nio.ByteBuffer container)
Creates a
AIBone instance at the current position of the specified ByteBuffer container. |
| Modifier and Type | Method and Description |
|---|---|
static AIBone |
calloc()
Returns a new
AIBone instance allocated with memCalloc. |
static AIBone.Buffer |
calloc(int capacity)
Returns a new
AIBone.Buffer instance allocated with memCalloc. |
static AIBone |
callocStack()
Returns a new
AIBone instance allocated on the thread-local MemoryStack and initializes all its bits to zero. |
static AIBone.Buffer |
callocStack(int capacity)
Returns a new
AIBone.Buffer instance allocated on the thread-local MemoryStack and initializes all its bits to zero. |
static AIBone.Buffer |
callocStack(int capacity,
org.lwjgl.system.MemoryStack stack)
Returns a new
AIBone.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero. |
static AIBone |
callocStack(org.lwjgl.system.MemoryStack stack)
Returns a new
AIBone instance allocated on the specified MemoryStack and initializes all its bits to zero. |
static AIBone |
create()
Returns a new
AIBone instance allocated with BufferUtils. |
static AIBone.Buffer |
create(int capacity)
Returns a new
AIBone.Buffer instance allocated with BufferUtils. |
static AIBone |
create(long address)
Returns a new
AIBone instance for the specified memory address. |
static AIBone.Buffer |
create(long address,
int capacity)
Create a
AIBone.Buffer instance at the specified memory. |
static AIBone |
createSafe(long address)
|
static AIBone.Buffer |
createSafe(long address,
int capacity)
|
static AIBone |
malloc()
Returns a new
AIBone instance allocated with memAlloc. |
static AIBone.Buffer |
malloc(int capacity)
Returns a new
AIBone.Buffer instance allocated with memAlloc. |
static AIBone |
mallocStack()
Returns a new
AIBone instance allocated on the thread-local MemoryStack. |
static AIBone.Buffer |
mallocStack(int capacity)
Returns a new
AIBone.Buffer instance allocated on the thread-local MemoryStack. |
static AIBone.Buffer |
mallocStack(int capacity,
org.lwjgl.system.MemoryStack stack)
Returns a new
AIBone.Buffer instance allocated on the specified MemoryStack. |
static AIBone |
mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a new
AIBone instance allocated on the specified MemoryStack. |
AINode |
mArmature()
Returns a
AINode view of the struct pointed to by the mArmature field. |
AIBone |
mArmature(AINode value)
Sets the address of the specified
AINode to the mArmature field. |
AIString |
mName()
Returns a
AIString view of the mName field. |
AIBone |
mName(AIString value)
Copies the specified
AIString to the mName field. |
AIBone |
mName(java.util.function.Consumer<AIString> consumer)
Passes the
mName field to the specified Consumer. |
AINode |
mNode()
Returns a
AINode view of the struct pointed to by the mNode field. |
AIBone |
mNode(AINode value)
Sets the address of the specified
AINode to the mNode field. |
int |
mNumWeights()
Returns the value of the
mNumWeights field. |
AIMatrix4x4 |
mOffsetMatrix()
Returns a
AIMatrix4x4 view of the mOffsetMatrix field. |
AIBone |
mOffsetMatrix(AIMatrix4x4 value)
Copies the specified
AIMatrix4x4 to the mOffsetMatrix field. |
AIBone |
mOffsetMatrix(java.util.function.Consumer<AIMatrix4x4> consumer)
Passes the
mOffsetMatrix field to the specified Consumer. |
AIVertexWeight.Buffer |
mWeights()
Returns a
AIVertexWeight.Buffer view of the struct array pointed to by the mWeights field. |
AIBone |
mWeights(AIVertexWeight.Buffer value)
Sets the address of the specified
AIVertexWeight.Buffer to the mWeights field. |
static AINode |
nmArmature(long struct)
Unsafe version of
mArmature(). |
static void |
nmArmature(long struct,
AINode value)
Unsafe version of
mArmature. |
static AIString |
nmName(long struct)
Unsafe version of
mName(). |
static void |
nmName(long struct,
AIString value)
Unsafe version of
mName. |
static AINode |
nmNode(long struct)
Unsafe version of
mNode(). |
static void |
nmNode(long struct,
AINode value)
Unsafe version of
mNode. |
static int |
nmNumWeights(long struct)
Unsafe version of
mNumWeights(). |
static void |
nmNumWeights(long struct,
int value)
Sets the specified value to the
mNumWeights field of the specified struct. |
static AIMatrix4x4 |
nmOffsetMatrix(long struct)
Unsafe version of
mOffsetMatrix(). |
static void |
nmOffsetMatrix(long struct,
AIMatrix4x4 value)
Unsafe version of
mOffsetMatrix. |
static AIVertexWeight.Buffer |
nmWeights(long struct)
Unsafe version of
mWeights(). |
static void |
nmWeights(long struct,
AIVertexWeight.Buffer value)
Unsafe version of
mWeights. |
AIBone |
set(AIBone src)
Copies the specified struct data to this struct.
|
AIBone |
set(AIString mName,
AINode mArmature,
AINode mNode,
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 be
NULL. |
static void |
validate(long array,
int count)
Calls
validate(long) for each struct contained in the specified struct array. |
public static final int SIZEOF
public static final int ALIGNOF
public static final int MNAME
public static final int MNUMWEIGHTS
public static final int MARMATURE
public static final int MNODE
public static final int MWEIGHTS
public static final int MOFFSETMATRIX
public AIBone(java.nio.ByteBuffer container)
AIBone instance at the current position of the specified ByteBuffer 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.
public int sizeof()
sizeof in class org.lwjgl.system.Structpublic int mNumWeights()
mNumWeights field.public AINode mArmature()
AINode view of the struct pointed to by the mArmature field.public AIVertexWeight.Buffer mWeights()
AIVertexWeight.Buffer view of the struct array pointed to by the mWeights field.public AIMatrix4x4 mOffsetMatrix()
AIMatrix4x4 view of the mOffsetMatrix field.public AIBone mName(java.util.function.Consumer<AIString> consumer)
mName field to the specified Consumer.public AIBone mArmature(AINode value)
AINode to the mArmature field.public AIBone mNode(AINode value)
AINode to the mNode field.public AIBone mWeights(AIVertexWeight.Buffer value)
AIVertexWeight.Buffer to the mWeights field.public AIBone mOffsetMatrix(AIMatrix4x4 value)
AIMatrix4x4 to the mOffsetMatrix field.public AIBone mOffsetMatrix(java.util.function.Consumer<AIMatrix4x4> consumer)
mOffsetMatrix field to the specified Consumer.public AIBone set(AIString mName, AINode mArmature, AINode mNode, AIVertexWeight.Buffer mWeights, AIMatrix4x4 mOffsetMatrix)
public AIBone set(AIBone src)
src - the source structpublic static AIBone malloc()
AIBone instance allocated with memAlloc. The instance must be explicitly freed.public static AIBone calloc()
AIBone instance allocated with memCalloc. The instance must be explicitly freed.public static AIBone create()
AIBone instance allocated with BufferUtils.public static AIBone create(long address)
AIBone instance for the specified memory address.@Nullable public static AIBone createSafe(long address)
public static AIBone.Buffer malloc(int capacity)
AIBone.Buffer instance allocated with memAlloc. The instance must be explicitly freed.capacity - the buffer capacitypublic static AIBone.Buffer calloc(int capacity)
AIBone.Buffer instance allocated with memCalloc. The instance must be explicitly freed.capacity - the buffer capacitypublic static AIBone.Buffer create(int capacity)
AIBone.Buffer instance allocated with BufferUtils.capacity - the buffer capacitypublic static AIBone.Buffer create(long address, int capacity)
AIBone.Buffer instance at the specified memory.address - the memory addresscapacity - the buffer capacity@Nullable public static AIBone.Buffer createSafe(long address, int capacity)
public static AIBone mallocStack()
AIBone instance allocated on the thread-local MemoryStack.public static AIBone callocStack()
AIBone instance allocated on the thread-local MemoryStack and initializes all its bits to zero.public static AIBone mallocStack(org.lwjgl.system.MemoryStack stack)
AIBone instance allocated on the specified MemoryStack.stack - the stack from which to allocatepublic static AIBone callocStack(org.lwjgl.system.MemoryStack stack)
AIBone instance allocated on the specified MemoryStack and initializes all its bits to zero.stack - the stack from which to allocatepublic static AIBone.Buffer mallocStack(int capacity)
AIBone.Buffer instance allocated on the thread-local MemoryStack.capacity - the buffer capacitypublic static AIBone.Buffer callocStack(int capacity)
AIBone.Buffer instance allocated on the thread-local MemoryStack and initializes all its bits to zero.capacity - the buffer capacitypublic static AIBone.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
AIBone.Buffer instance allocated on the specified MemoryStack.stack - the stack from which to allocatecapacity - the buffer capacitypublic static AIBone.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
AIBone.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.stack - the stack from which to allocatecapacity - the buffer capacitypublic static int nmNumWeights(long struct)
mNumWeights().public static AINode nmArmature(long struct)
mArmature().public static AIVertexWeight.Buffer nmWeights(long struct)
mWeights().public static AIMatrix4x4 nmOffsetMatrix(long struct)
mOffsetMatrix().public static void nmNumWeights(long struct,
int value)
mNumWeights field of the specified struct.public static void nmWeights(long struct,
AIVertexWeight.Buffer value)
mWeights.public static void nmOffsetMatrix(long struct,
AIMatrix4x4 value)
mOffsetMatrix.public static void validate(long struct)
NULL.struct - the struct to validatepublic static void validate(long array,
int count)
validate(long) for each struct contained in the specified struct array.array - the struct array to validatecount - the number of structs in arrayCopyright LWJGL. All Rights Reserved. License terms.