Skeleton-Animations can be represented via a skeleton struct, which describes a hierarchical tree assembled from skeleton bones. A bone is linked to a mesh. The bone knows its parent bone. If there is no parent bone the parent id is marked with -1.
The skeleton-bone stores a pointer to its used armature. If there is no armature this value if set to nullptr.
A skeleton bone stores its offset-matrix, which is the absolute transformation for the bone. The bone stores the locale transformation to its parent as well. You can compute the offset matrix by multiplying the hierarchy like:
Tree: s1 -> s2 -> s3
Offset-Matrix s3 = locale-s3 * locale-s2 * locale-s1
struct aiSkeletonBone {
int mParent;
struct aiNode * mArmature;
struct aiNode * mNode;
unsigned int mNumnWeights;
struct aiMesh * mMeshId;
struct aiVertexWeight * mWeights;
struct aiMatrix4x4 mOffsetMatrix;
struct aiMatrix4x4 mLocalMatrix;
}
| Modifier and Type | Class and Description |
|---|---|
| public static class | AISkeletonBone.
An array of |
| Modifier and Type | Field and Description |
|---|---|
| public static final int | ALIGNOF
The struct alignment in bytes. |
| public static final int | MARMATURE
The struct member offsets. |
| public static final int | MLOCALMATRIX
The struct member offsets. |
| public static final int | MMESHID
The struct member offsets. |
| public static final int | MNODE
The struct member offsets. |
| public static final int | MNUMNWEIGHTS
The struct member offsets. |
| public static final int | MOFFSETMATRIX
The struct member offsets. |
| public static final int | MPARENT
The struct member offsets. |
| public static final int | MWEIGHTS
The struct member offsets. |
| public static final int | SIZEOF
The struct size in bytes. |
| Access | Constructor and Description |
|---|---|
| protected | |
| public | AISkeletonBone(ByteBuffer container)
Creates a |
| Modifier and Type | Method and Description |
|---|---|
| public static AISkeletonBone | |
| public static AISkeletonBone. | calloc(int
the buffer capacity capacity)Returns a new |
| public static AISkeletonBone | calloc(MemoryStack
the stack from which to allocate stack)Returns a new |
| public static AISkeletonBone. | calloc(int
the buffer capacity capacity, MemoryStack the stack from which to allocate stack)Returns a new |
| protected AISkeletonBone | create(long
the struct memory address address, ByteBuffer an optional container buffer, to be referenced strongly by the struct instance. container)Implements abstract org. the constructor, but returns the exact type of the Struct subclass.
|
| public static AISkeletonBone | |
| public static AISkeletonBone | |
| public static AISkeletonBone. | create(int
the buffer capacity capacity)Returns a new |
| public static AISkeletonBone. | create(long
the memory address address, int the buffer capacity capacity)Create a |
| public static AISkeletonBone | |
| public static AISkeletonBone. | |
| public static AISkeletonBone | |
| public static AISkeletonBone. | malloc(int
the buffer capacity capacity)Returns a new |
| public static AISkeletonBone | malloc(MemoryStack
the stack from which to allocate stack)Returns a new |
| public static AISkeletonBone. | malloc(int
the buffer capacity capacity, MemoryStack the stack from which to allocate stack)Returns a new |
| public AINode | |
| public AISkeletonBone | |
| public AIMatrix4x4 | |
| public AISkeletonBone | |
| public AISkeletonBone | mLocalMatrix(Consumer<AIMatrix4x4> consumer)
Passes the |
| public AIMesh. | |
| public AISkeletonBone | |
| public AINode | |
| public AISkeletonBone | |
| public int | |
| public AISkeletonBone | |
| public AIMatrix4x4 | |
| public AISkeletonBone | |
| public AISkeletonBone | mOffsetMatrix(Consumer<AIMatrix4x4> consumer)
Passes the |
| public int | |
| public AISkeletonBone | |
| public AIVertexWeight. | |
| public AISkeletonBone | mWeights(AIVertexWeight.
Sets the address of the specified |
| public static AINode | |
| public static void | |
| public static AIMatrix4x4 | |
| public static void | |
| public static AIMesh. | |
| public static void | |
| public static AINode | |
| public static void | |
| public static int | |
| public static void | nmNumnWeights(long struct, int value)
Sets the specified value to the |
| public static AIMatrix4x4 | |
| public static void | |
| public static int | |
| public static void | |
| public static AIVertexWeight. | |
| public static void | |
| public AISkeletonBone | set(int mParent, AINode mArmature, AINode mNode, int mNumnWeights, AIMesh.
Initializes this struct with the specified values. |
| public AISkeletonBone | Returns: this structthe source struct src)Copies the specified struct data to this struct. |
| public int | |
| public static void |
| ALIGNOF | back to summary |
|---|---|
| public static final int ALIGNOF The struct alignment in bytes. | |
| MARMATURE | back to summary |
|---|---|
| public static final int MARMATURE The struct member offsets. | |
| MLOCALMATRIX | back to summary |
|---|---|
| public static final int MLOCALMATRIX The struct member offsets. | |
| MMESHID | back to summary |
|---|---|
| public static final int MMESHID The struct member offsets. | |
| MNODE | back to summary |
|---|---|
| public static final int MNODE The struct member offsets. | |
| MNUMNWEIGHTS | back to summary |
|---|---|
| public static final int MNUMNWEIGHTS The struct member offsets. | |
| MOFFSETMATRIX | back to summary |
|---|---|
| public static final int MOFFSETMATRIX The struct member offsets. | |
| MPARENT | back to summary |
|---|---|
| public static final int MPARENT The struct member offsets. | |
| MWEIGHTS | back to summary |
|---|---|
| public static final int MWEIGHTS The struct member offsets. | |
| SIZEOF | back to summary |
|---|---|
| public static final int SIZEOF The struct size in bytes. | |
| AISkeletonBone | back to summary |
|---|---|
| protected AISkeletonBone(long address, ByteBuffer container) | |
| AISkeletonBone | back to summary |
|---|---|
| public AISkeletonBone(ByteBuffer container) Creates a The created instance holds a strong reference to the container object. | |
| calloc | back to summary |
|---|---|
| public static AISkeletonBone calloc() Returns a new | |
| calloc | back to summary |
|---|---|
| public static AISkeletonBone. Returns a new
| |
| calloc | back to summary |
|---|---|
| public static AISkeletonBone calloc(MemoryStack stack) Returns a new
| |
| calloc | back to summary |
|---|---|
| public static AISkeletonBone. Returns a new
| |
| create | back to summary |
|---|---|
| protected AISkeletonBone create(long address, ByteBuffer container) Implements abstract org. Doc from org. Similar to Effectively, every
| |
| create | back to summary |
|---|---|
| public static AISkeletonBone create() Returns a new | |
| create | back to summary |
|---|---|
| public static AISkeletonBone create(long address) Returns a new | |
| create | back to summary |
|---|---|
| public static AISkeletonBone. Returns a new
| |
| create | back to summary |
|---|---|
| public static AISkeletonBone. Create a
| |
| createSafe | back to summary |
|---|---|
| public static AISkeletonBone createSafe(long address) Like
| |
| createSafe | back to summary |
|---|---|
| public static AISkeletonBone. Like
| |
| malloc | back to summary |
|---|---|
| public static AISkeletonBone malloc() Returns a new | |
| malloc | back to summary |
|---|---|
| public static AISkeletonBone. Returns a new
| |
| malloc | back to summary |
|---|---|
| public static AISkeletonBone malloc(MemoryStack stack) Returns a new
| |
| malloc | back to summary |
|---|---|
| public static AISkeletonBone. Returns a new
| |
| mArmature | back to summary |
|---|---|
| public AINode mArmature() The bone armature node - used for skeleton conversion. You must enable
| |
| mArmature | back to summary |
|---|---|
| public AISkeletonBone mArmature(AINode value) Sets the address of the specified | |
| mLocalMatrix | back to summary |
|---|---|
| public AIMatrix4x4 mLocalMatrix() matrix that transforms the local bone in bind pose
| |
| mLocalMatrix | back to summary |
|---|---|
| public AISkeletonBone mLocalMatrix(AIMatrix4x4 value) Copies the specified | |
| mLocalMatrix | back to summary |
|---|---|
| public AISkeletonBone mLocalMatrix(Consumer<AIMatrix4x4> consumer) Passes the | |
| mMeshId | back to summary |
|---|---|
| public AIMesh. the mesh index, which will get influenced by the weight
| |
| mMeshId | back to summary |
|---|---|
| public AISkeletonBone mMeshId(AIMesh. Sets the address of the specified | |
| mNode | back to summary |
|---|---|
| public AINode mNode() The bone node in the scene - used for skeleton conversion. You must enable
| |
| mNode | back to summary |
|---|---|
| public AISkeletonBone mNode(AINode value) Sets the address of the specified | |
| mNumnWeights | back to summary |
|---|---|
| public int mNumnWeights() the number of weights
| |
| mNumnWeights | back to summary |
|---|---|
| public AISkeletonBone mNumnWeights(int value) Sets the specified value to the | |
| mOffsetMatrix | back to summary |
|---|---|
| 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.
| |
| mOffsetMatrix | back to summary |
|---|---|
| public AISkeletonBone mOffsetMatrix(AIMatrix4x4 value) Copies the specified | |
| mOffsetMatrix | back to summary |
|---|---|
| public AISkeletonBone mOffsetMatrix(Consumer<AIMatrix4x4> consumer) Passes the | |
| mParent | back to summary |
|---|---|
| public int mParent() the parent bone index, is -1 one if this bone represents the root bone | |
| mParent | back to summary |
|---|---|
| public AISkeletonBone mParent(int value) Sets the specified value to the | |
| mWeights | back to summary |
|---|---|
| public AIVertexWeight. the influence weights of this bone, by vertex index
| |
| mWeights | back to summary |
|---|---|
| public AISkeletonBone mWeights(AIVertexWeight. Sets the address of the specified | |
| nmArmature | back to summary |
|---|---|
| public static AINode nmArmature(long struct) Unsafe version of
| |
| nmArmature | back to summary |
|---|---|
| public static void nmArmature(long struct, AINode value) Unsafe version of | |
| nmLocalMatrix | back to summary |
|---|---|
| public static AIMatrix4x4 nmLocalMatrix(long struct) Unsafe version of | |
| nmLocalMatrix | back to summary |
|---|---|
| public static void nmLocalMatrix(long struct, AIMatrix4x4 value) Unsafe version of | |
| nmMeshId | back to summary |
|---|---|
| public static AIMesh. Unsafe version of | |
| nmMeshId | back to summary |
|---|---|
| public static void nmMeshId(long struct, AIMesh. Unsafe version of | |
| nmNode | back to summary |
|---|---|
| public static AINode nmNode(long struct) Unsafe version of
| |
| nmNode | back to summary |
|---|---|
| public static void nmNode(long struct, AINode value) Unsafe version of | |
| nmNumnWeights | back to summary |
|---|---|
| public static int nmNumnWeights(long struct) Unsafe version of | |
| nmNumnWeights | back to summary |
|---|---|
| public static void nmNumnWeights(long struct, int value) Sets the specified value to the | |
| nmOffsetMatrix | back to summary |
|---|---|
| public static AIMatrix4x4 nmOffsetMatrix(long struct) Unsafe version of | |
| nmOffsetMatrix | back to summary |
|---|---|
| public static void nmOffsetMatrix(long struct, AIMatrix4x4 value) Unsafe version of | |
| nmParent | back to summary |
|---|---|
| public static int nmParent(long struct) Unsafe version of | |
| nmParent | back to summary |
|---|---|
| public static void nmParent(long struct, int value) Unsafe version of | |
| nmWeights | back to summary |
|---|---|
| public static AIVertexWeight. Unsafe version of | |
| nmWeights | back to summary |
|---|---|
| public static void nmWeights(long struct, AIVertexWeight. Unsafe version of | |
| set | back to summary |
|---|---|
| public AISkeletonBone set(int mParent, AINode mArmature, AINode mNode, int mNumnWeights, AIMesh. Initializes this struct with the specified values. | |
| set | back to summary |
|---|---|
| public AISkeletonBone set(AISkeletonBone src) Copies the specified struct data to this struct.
| |
| sizeof | back to summary |
|---|---|
| public int sizeof() Implements abstract org. Doc from org. Returns
| |
| validate | back to summary |
|---|---|
| public static void validate(long struct) Validates pointer members that should not be
| |
AISkeletonBone structs.
| Modifier and Type | Field and Description |
|---|---|
| private static final AISkeletonBone |
| Access | Constructor and Description |
|---|---|
| public | Buffer(ByteBuffer container)
Creates a new |
| public | |
| pack-priv |
| ELEMENT_FACTORY | back to summary |
|---|---|
| private static final AISkeletonBone ELEMENT_FACTORY | |
| Buffer | back to summary |
|---|---|
| public Buffer(ByteBuffer container) Creates a new Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values
will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided
by The created buffer instance holds a strong reference to the container object. | |
| Buffer | back to summary |
|---|---|
| public Buffer(long address, int cap) | |
| Buffer | back to summary |
|---|---|
| pack-priv Buffer(long address, ByteBuffer container, int mark, int pos, int lim, int cap) | |
| getElementFactory | back to summary |
|---|---|
| protected AISkeletonBone getElementFactory() Implements abstract org.
| |
| mArmature | back to summary |
|---|---|
public AINode mArmature()
| |
| mArmature | back to summary |
|---|---|
| public AISkeletonBone. Sets the address of the specified | |
| mLocalMatrix | back to summary |
|---|---|
public AIMatrix4x4 mLocalMatrix()
| |
| mLocalMatrix | back to summary |
|---|---|
| public AISkeletonBone. Copies the specified | |
| mLocalMatrix | back to summary |
|---|---|
| public AISkeletonBone. Passes the | |
| mMeshId | back to summary |
|---|---|
public AIMesh.
| |
| mMeshId | back to summary |
|---|---|
| public AISkeletonBone. Sets the address of the specified | |
| mNode | back to summary |
|---|---|
public AINode mNode()
| |
| mNode | back to summary |
|---|---|
| public AISkeletonBone. Sets the address of the specified | |
| mNumnWeights | back to summary |
|---|---|
public int mNumnWeights()
| |
| mNumnWeights | back to summary |
|---|---|
| public AISkeletonBone. Sets the specified value to the | |
| mOffsetMatrix | back to summary |
|---|---|
public AIMatrix4x4 mOffsetMatrix()
| |
| mOffsetMatrix | back to summary |
|---|---|
| public AISkeletonBone. Copies the specified | |
| mOffsetMatrix | back to summary |
|---|---|
| public AISkeletonBone. Passes the | |
| mParent | back to summary |
|---|---|
public int mParent()
| |
| mParent | back to summary |
|---|---|
| public AISkeletonBone. Sets the specified value to the | |
| mWeights | back to summary |
|---|---|
public AIVertexWeight.
| |
| mWeights | back to summary |
|---|---|
| public AISkeletonBone. Sets the address of the specified | |
| self | back to summary |
|---|---|
| protected AISkeletonBone. Implements abstract org.
| |