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, and a matrix relating the mesh position to the position of the bone at the time of binding.
Layout
struct aiBone {
struct aiString
mName()
; unsigned intmNumWeights()
;struct aiNode
*mArmature()
;struct aiNode
*mNode()
;struct aiVertexWeight
*mWeights()
;struct aiMatrix4x4
mOffsetMatrix()
; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
AIBone.Buffer
An array ofAIBone
structs.
-
Field Summary
Fields Modifier and Type Field Description static int
ALIGNOF
The struct alignment in bytes.static int
MARMATURE
MNAME
MNODE
MNUMWEIGHTS
MOFFSETMATRIX
MWEIGHTSThe struct member offsets.static int
SIZEOF
The struct size in bytes.
-
Constructor Summary
Constructors Constructor Description AIBone(java.nio.ByteBuffer container)
Creates aAIBone
instance at the current position of the specifiedByteBuffer
container.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method 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.Buffer
calloc(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
calloc(org.lwjgl.system.MemoryStack stack)
Returns a newAIBone
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static AIBone
callocStack()
Deprecated.static AIBone.Buffer
callocStack(int capacity)
Deprecated.static AIBone.Buffer
callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Deprecated.static AIBone
callocStack(org.lwjgl.system.MemoryStack stack)
Deprecated.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.Buffer
malloc(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newAIBone.Buffer
instance allocated on the specifiedMemoryStack
.static AIBone
malloc(org.lwjgl.system.MemoryStack stack)
Returns a newAIBone
instance allocated on the specifiedMemoryStack
.static AIBone
mallocStack()
Deprecated.static AIBone.Buffer
mallocStack(int capacity)
Deprecated.static AIBone.Buffer
mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Deprecated.static AIBone
mallocStack(org.lwjgl.system.MemoryStack stack)
Deprecated.AINode
mArmature()
the bone armature node - used for skeleton conversion you must enableProcess_PopulateArmatureData
to populate thisAIBone
mArmature(AINode value)
Sets the address of the specifiedAINode
to themArmature()
field.AIString
mName()
the name of the bone.AIBone
mName(java.util.function.Consumer<AIString> consumer)
Passes themName()
field to the specifiedConsumer
.AIBone
mName(AIString value)
AINode
mNode()
the bone node in the scene - used for skeleton conversion you must enableProcess_PopulateArmatureData
to populate thisAIBone
mNode(AINode value)
int
mNumWeights()
the number of vertices affected by this bone.AIMatrix4x4
mOffsetMatrix()
matrix that transforms from bone space to mesh space in bind pose.AIBone
mOffsetMatrix(java.util.function.Consumer<AIMatrix4x4> consumer)
Passes themOffsetMatrix()
field to the specifiedConsumer
.AIBone
mOffsetMatrix(AIMatrix4x4 value)
Copies the specifiedAIMatrix4x4
to themOffsetMatrix()
field.AIVertexWeight.Buffer
mWeights()
the influence weights of this bone, by vertex indexAIBone
mWeights(AIVertexWeight.Buffer value)
Sets the address of the specifiedAIVertexWeight.Buffer
to themWeights()
field.static AINode
nmArmature(long struct)
Unsafe version ofmArmature()
.static void
nmArmature(long struct, AINode value)
Unsafe version ofmArmature
.static AIString
nmName(long struct)
Unsafe version ofmName()
.static void
nmName(long struct, AIString value)
Unsafe version ofmName
.static AINode
nmNode(long struct)
Unsafe version ofmNode()
.static void
nmNode(long struct, AINode value)
Unsafe version ofmNode
.static int
nmNumWeights(long struct)
Unsafe version ofmNumWeights()
.static void
nmNumWeights(long struct, int value)
Sets the specified value to themNumWeights
field of the specifiedstruct
.static AIMatrix4x4
nmOffsetMatrix(long struct)
Unsafe version ofmOffsetMatrix()
.static void
nmOffsetMatrix(long struct, AIMatrix4x4 value)
Unsafe version ofmOffsetMatrix
.static AIVertexWeight.Buffer
nmWeights(long struct)
Unsafe version ofmWeights()
.static void
nmWeights(long struct, AIVertexWeight.Buffer value)
Unsafe version ofmWeights
.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 beNULL
.
-
-
-
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
-
mName
public AIString mName()
the name of the bone.
-
mNumWeights
public int mNumWeights()
the number of vertices affected by this bone. The maximum value for this member isAssimp.AI_MAX_BONE_WEIGHTS
.
-
mArmature
public AINode mArmature()
the bone armature node - used for skeleton conversion you must enableProcess_PopulateArmatureData
to populate this
-
mNode
public AINode mNode()
the bone node in the scene - used for skeleton conversion you must enableProcess_PopulateArmatureData
to populate this
-
mWeights
public AIVertexWeight.Buffer mWeights()
the influence weights of this bone, by vertex index
-
mOffsetMatrix
public AIMatrix4x4 mOffsetMatrix()
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.
-
mName
public AIBone mName(java.util.function.Consumer<AIString> consumer)
Passes themName()
field to the specifiedConsumer
.
-
mArmature
public AIBone mArmature(AINode value)
Sets the address of the specifiedAINode
to themArmature()
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.
-
mOffsetMatrix
public AIBone mOffsetMatrix(java.util.function.Consumer<AIMatrix4x4> consumer)
Passes themOffsetMatrix()
field to the specifiedConsumer
.
-
set
public AIBone set(AIString mName, AINode mArmature, AINode mNode, 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()
Returns a newAIBone
instance allocated withBufferUtils
.
-
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
@Deprecated public static AIBone mallocStack()
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)
instead.
-
callocStack
@Deprecated public static AIBone callocStack()
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)
instead.
-
mallocStack
@Deprecated public static AIBone mallocStack(org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)
instead.
-
callocStack
@Deprecated public static AIBone callocStack(org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)
instead.
-
mallocStack
@Deprecated public static AIBone.Buffer mallocStack(int capacity)
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)
instead.
-
callocStack
@Deprecated public static AIBone.Buffer callocStack(int capacity)
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)
instead.
-
mallocStack
@Deprecated public static AIBone.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 AIBone.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)
instead.
-
malloc
public static AIBone malloc(org.lwjgl.system.MemoryStack stack)
Returns a newAIBone
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
calloc
public static AIBone calloc(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
-
malloc
public static AIBone.Buffer malloc(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
-
calloc
public static AIBone.Buffer calloc(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
-
nmNumWeights
public static int nmNumWeights(long struct)
Unsafe version ofmNumWeights()
.
-
nmArmature
public static AINode nmArmature(long struct)
Unsafe version ofmArmature()
.
-
nmWeights
public static AIVertexWeight.Buffer nmWeights(long struct)
Unsafe version ofmWeights()
.
-
nmOffsetMatrix
public static AIMatrix4x4 nmOffsetMatrix(long struct)
Unsafe version ofmOffsetMatrix()
.
-
nmNumWeights
public static void nmNumWeights(long struct, int value)
Sets the specified value to themNumWeights
field of the specifiedstruct
.
-
nmWeights
public static void nmWeights(long struct, AIVertexWeight.Buffer value)
Unsafe version ofmWeights
.
-
nmOffsetMatrix
public static void nmOffsetMatrix(long struct, AIMatrix4x4 value)
Unsafe version ofmOffsetMatrix
.
-
validate
public static void validate(long struct)
Validates pointer members that should not beNULL
.- Parameters:
struct
- the struct to validate
-
-