Package org.lwjgl.assimp
Class AIBone
- All Implemented Interfaces:
AutoCloseable
,NativeResource
,Pointer
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 int mNumWeights()
;
struct aiNode
* mArmature()
;
struct aiNode
* mNode()
;
struct aiVertexWeight
* mWeights()
;
struct aiMatrix4x4
mOffsetMatrix()
;
}
-
Nested Class Summary
Nested classes/interfaces inherited from class org.lwjgl.system.Struct
Struct.StructValidation
Nested classes/interfaces inherited from interface org.lwjgl.system.Pointer
Pointer.Default
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
The struct alignment in bytes.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct size in bytes.Fields inherited from interface org.lwjgl.system.Pointer
BITS32, BITS64, CLONG_SHIFT, CLONG_SIZE, POINTER_SHIFT, POINTER_SIZE
-
Constructor Summary
ConstructorDescriptionAIBone
(ByteBuffer container) Creates aAIBone
instance at the current position of the specifiedByteBuffer
container. -
Method Summary
Modifier and TypeMethodDescriptionstatic 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, MemoryStack stack) Returns a newAIBone.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static AIBone
calloc
(MemoryStack stack) Returns a newAIBone
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static AIBone
Deprecated.static AIBone.Buffer
callocStack
(int capacity) Deprecated.static AIBone.Buffer
callocStack
(int capacity, MemoryStack stack) Deprecated.static AIBone
callocStack
(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, MemoryStack stack) Returns a newAIBone.Buffer
instance allocated on the specifiedMemoryStack
.static AIBone
malloc
(MemoryStack stack) Returns a newAIBone
instance allocated on the specifiedMemoryStack
.static AIBone
Deprecated.static AIBone.Buffer
mallocStack
(int capacity) Deprecated.static AIBone.Buffer
mallocStack
(int capacity, MemoryStack stack) Deprecated.static AIBone
mallocStack
(MemoryStack stack) Deprecated.the bone armature node - used for skeleton conversion you must enableProcess_PopulateArmatureData
to populate thisSets the address of the specifiedAINode
to themArmature()
field.mName()
the name of the bone.mNode()
the bone node in the scene - used for skeleton conversion you must enableProcess_PopulateArmatureData
to populate thisint
the number of vertices affected by this bone.matrix that transforms from mesh space to bone space in bind pose.mOffsetMatrix
(Consumer<AIMatrix4x4> consumer) Passes themOffsetMatrix()
field to the specifiedConsumer
.mOffsetMatrix
(AIMatrix4x4 value) Copies the specifiedAIMatrix4x4
to themOffsetMatrix()
field.mWeights()
the influence weights of this bone, by vertex indexmWeights
(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
Unsafe version ofmName
.static AINode
nmNode
(long struct) Unsafe version ofmNode()
.static void
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
.Copies the specified struct data to this struct.set
(AIString mName, AINode mArmature, AINode mNode, AIVertexWeight.Buffer mWeights, AIMatrix4x4 mOffsetMatrix) Initializes this struct with the specified values.int
sizeof()
Returnssizeof(struct)
.static void
validate
(long struct) Validates pointer members that should not beNULL
.Methods inherited from class org.lwjgl.system.Pointer.Default
address, equals, hashCode, toString
Methods inherited from interface org.lwjgl.system.NativeResource
close, free
-
Field Details
-
SIZEOF
public static final int SIZEOFThe struct size in bytes. -
ALIGNOF
public static final int ALIGNOFThe struct alignment in bytes. -
MNAME
public static final int MNAMEThe struct member offsets. -
MNUMWEIGHTS
public static final int MNUMWEIGHTSThe struct member offsets. -
MARMATURE
public static final int MARMATUREThe struct member offsets. -
MNODE
public static final int MNODEThe struct member offsets. -
MWEIGHTS
public static final int MWEIGHTSThe struct member offsets. -
MOFFSETMATRIX
public static final int MOFFSETMATRIXThe struct member offsets.
-
-
Constructor Details
-
AIBone
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 Details
-
sizeof
public int sizeof()Description copied from class:Struct
Returnssizeof(struct)
. -
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
the bone armature node - used for skeleton conversion you must enableProcess_PopulateArmatureData
to populate this -
mNode
the bone node in the scene - used for skeleton conversion you must enableProcess_PopulateArmatureData
to populate this -
mWeights
the influence weights of this bone, by vertex index -
mOffsetMatrix
matrix that transforms from mesh space to bone 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
-
mName
-
mArmature
Sets the address of the specifiedAINode
to themArmature()
field. -
mNode
-
mWeights
Sets the address of the specifiedAIVertexWeight.Buffer
to themWeights()
field. -
mOffsetMatrix
Copies the specifiedAIMatrix4x4
to themOffsetMatrix()
field. -
mOffsetMatrix
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
Copies the specified struct data to this struct.- Parameters:
src
- the source struct- Returns:
- this struct
-
malloc
Returns a newAIBone
instance allocated withmemAlloc
. The instance must be explicitly freed. -
calloc
Returns a newAIBone
instance allocated withmemCalloc
. The instance must be explicitly freed. -
create
Returns a newAIBone
instance allocated withBufferUtils
. -
create
Returns a newAIBone
instance for the specified memory address. -
createSafe
-
malloc
Returns a newAIBone.Buffer
instance allocated withmemAlloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
calloc
Returns a newAIBone.Buffer
instance allocated withmemCalloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
create
Returns a newAIBone.Buffer
instance allocated withBufferUtils
.- Parameters:
capacity
- the buffer capacity
-
create
Create aAIBone.Buffer
instance at the specified memory.- Parameters:
address
- the memory addresscapacity
- the buffer capacity
-
createSafe
-
mallocStack
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)
instead. -
callocStack
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)
instead. -
mallocStack
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)
instead. -
callocStack
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)
instead. -
mallocStack
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)
instead. -
callocStack
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)
instead. -
mallocStack
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)
instead. -
callocStack
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)
instead. -
malloc
Returns a newAIBone
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
calloc
Returns a newAIBone
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocate
-
malloc
Returns a newAIBone.Buffer
instance allocated on the specifiedMemoryStack
.- Parameters:
capacity
- the buffer capacitystack
- the stack from which to allocate
-
calloc
Returns a newAIBone.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
capacity
- the buffer capacitystack
- the stack from which to allocate
-
nmName
Unsafe version ofmName()
. -
nmNumWeights
public static int nmNumWeights(long struct) Unsafe version ofmNumWeights()
. -
nmArmature
Unsafe version ofmArmature()
. -
nmNode
Unsafe version ofmNode()
. -
nmWeights
Unsafe version ofmWeights()
. -
nmOffsetMatrix
Unsafe version ofmOffsetMatrix()
. -
nmName
Unsafe version ofmName
. -
nmNumWeights
public static void nmNumWeights(long struct, int value) Sets the specified value to themNumWeights
field of the specifiedstruct
. -
nmArmature
Unsafe version ofmArmature
. -
nmNode
Unsafe version ofmNode
. -
nmWeights
Unsafe version ofmWeights
. -
nmOffsetMatrix
Unsafe version ofmOffsetMatrix
. -
validate
public static void validate(long struct) Validates pointer members that should not beNULL
.- Parameters:
struct
- the struct to validate
-