public class AIAnimMesh
extends org.lwjgl.system.Struct
implements org.lwjgl.system.NativeResource
AnimMesh is an attachment to an AIMesh stores per-vertex animations for a particular frame.
You may think of an aiAnimMesh as a `patch` for the host mesh, which replaces only certain vertex data streams at a particular time. Each mesh
stores n attached attached meshes (AIMesh::mAnimMeshes). The actual relationship between the time line and anim meshes is established by
aiMeshAnim, which references singular mesh attachments by their ID and binds them to a time offset.
mName – the AnimMesh namemVertices –
Replacement for AIMesh::mVertices. If this array is non-NULL, it *must* contain mNumVertices entries. The corresponding array in the
host mesh must be non-NULL as well - animation meshes may neither add or nor remove vertex components (if a replacement array is NULL and the
corresponding source array is not, the source data is taken instead).mNormals – Replacement for AIMesh::mNormals.mTangents – Replacement for AIMesh::mTangents.mBitangents – Replacement for AIMesh::mBitangents.mColors[Assimp.AI_MAX_NUMBER_OF_COLOR_SETS] – Replacement for AIMesh::mColorsmTextureCoords[Assimp.AI_MAX_NUMBER_OF_TEXTURECOORDS] – Replacement for AIMesh::mTextureCoordsmNumVertices –
The number of vertices in the aiAnimMesh, and thus the length of all the member arrays. This has always the same value as the
mNumVertices property in the corresponding AIMesh. It is duplicated here merely to make the length of the member arrays accessible even if
the aiMesh is not known, e.g. from language bindings.mWeight – Weight of the AnimMesh.
struct aiAnimMesh {
struct aiString mName;
struct aiVector3D * mVertices;
struct aiVector3D * mNormals;
struct aiVector3D * mTangents;
struct aiVector3D * mBitangents;
struct aiColor4D * mColors[Assimp.AI_MAX_NUMBER_OF_COLOR_SETS];
struct aiVector3D * mTextureCoords[Assimp.AI_MAX_NUMBER_OF_TEXTURECOORDS];
unsigned int mNumVertices;
float mWeight;
}| Modifier and Type | Class and Description |
|---|---|
static class |
AIAnimMesh.Buffer
An array of
AIAnimMesh structs. |
| Modifier and Type | Field and Description |
|---|---|
static int |
ALIGNOF
The struct alignment in bytes.
|
static int |
MBITANGENTS
The struct member offsets.
|
static int |
MCOLORS
The struct member offsets.
|
static int |
MNAME
The struct member offsets.
|
static int |
MNORMALS
The struct member offsets.
|
static int |
MNUMVERTICES
The struct member offsets.
|
static int |
MTANGENTS
The struct member offsets.
|
static int |
MTEXTURECOORDS
The struct member offsets.
|
static int |
MVERTICES
The struct member offsets.
|
static int |
MWEIGHT
The struct member offsets.
|
static int |
SIZEOF
The struct size in bytes.
|
| Constructor and Description |
|---|
AIAnimMesh(java.nio.ByteBuffer container)
Creates a
AIAnimMesh instance at the current position of the specified ByteBuffer container. |
| Modifier and Type | Method and Description |
|---|---|
static AIAnimMesh |
calloc()
Returns a new
AIAnimMesh instance allocated with memCalloc. |
static AIAnimMesh.Buffer |
calloc(int capacity)
Returns a new
AIAnimMesh.Buffer instance allocated with memCalloc. |
static AIAnimMesh |
callocStack()
Returns a new
AIAnimMesh instance allocated on the thread-local MemoryStack and initializes all its bits to zero. |
static AIAnimMesh.Buffer |
callocStack(int capacity)
Returns a new
AIAnimMesh.Buffer instance allocated on the thread-local MemoryStack and initializes all its bits to zero. |
static AIAnimMesh.Buffer |
callocStack(int capacity,
org.lwjgl.system.MemoryStack stack)
Returns a new
AIAnimMesh.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero. |
static AIAnimMesh |
callocStack(org.lwjgl.system.MemoryStack stack)
Returns a new
AIAnimMesh instance allocated on the specified MemoryStack and initializes all its bits to zero. |
static AIAnimMesh |
create()
Returns a new
AIAnimMesh instance allocated with BufferUtils. |
static AIAnimMesh.Buffer |
create(int capacity)
Returns a new
AIAnimMesh.Buffer instance allocated with BufferUtils. |
static AIAnimMesh |
create(long address)
Returns a new
AIAnimMesh instance for the specified memory address. |
static AIAnimMesh.Buffer |
create(long address,
int capacity)
Create a
AIAnimMesh.Buffer instance at the specified memory. |
static AIAnimMesh |
createSafe(long address)
|
static AIAnimMesh.Buffer |
createSafe(long address,
int capacity)
|
static AIAnimMesh |
malloc()
Returns a new
AIAnimMesh instance allocated with memAlloc. |
static AIAnimMesh.Buffer |
malloc(int capacity)
Returns a new
AIAnimMesh.Buffer instance allocated with memAlloc. |
static AIAnimMesh |
mallocStack()
Returns a new
AIAnimMesh instance allocated on the thread-local MemoryStack. |
static AIAnimMesh.Buffer |
mallocStack(int capacity)
Returns a new
AIAnimMesh.Buffer instance allocated on the thread-local MemoryStack. |
static AIAnimMesh.Buffer |
mallocStack(int capacity,
org.lwjgl.system.MemoryStack stack)
Returns a new
AIAnimMesh.Buffer instance allocated on the specified MemoryStack. |
static AIAnimMesh |
mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a new
AIAnimMesh instance allocated on the specified MemoryStack. |
AIVector3D.Buffer |
mBitangents()
Returns a
AIVector3D.Buffer view of the struct array pointed to by the mBitangents field. |
AIAnimMesh |
mBitangents(AIVector3D.Buffer value)
Sets the address of the specified
AIVector3D.Buffer to the mBitangents field. |
org.lwjgl.PointerBuffer |
mColors()
Returns a
PointerBuffer view of the mColors field. |
AIColor4D.Buffer |
mColors(int index)
Returns a
AIColor4D view of the pointer at the specified index of the mColors field. |
AIAnimMesh |
mColors(int index,
AIColor4D.Buffer value)
Copies the address of the specified
AIColor4D at the specified index of the mColors field. |
AIAnimMesh |
mColors(int index,
java.util.function.Consumer<AIColor4D.Buffer> consumer)
Passes the element at
index of the mColors field to the specified Consumer. |
AIAnimMesh |
mColors(org.lwjgl.PointerBuffer value)
Copies the specified
PointerBuffer to the mColors field. |
AIString |
mName()
Returns a
AIString view of the mName field. |
AIAnimMesh |
mName(AIString value)
Copies the specified
AIString to the mName field. |
AIAnimMesh |
mName(java.util.function.Consumer<AIString> consumer)
Passes the
mName field to the specified Consumer. |
AIVector3D.Buffer |
mNormals()
Returns a
AIVector3D.Buffer view of the struct array pointed to by the mNormals field. |
AIAnimMesh |
mNormals(AIVector3D.Buffer value)
Sets the address of the specified
AIVector3D.Buffer to the mNormals field. |
int |
mNumVertices()
Returns the value of the
mNumVertices field. |
AIAnimMesh |
mNumVertices(int value)
Sets the specified value to the
mNumVertices field. |
AIVector3D.Buffer |
mTangents()
Returns a
AIVector3D.Buffer view of the struct array pointed to by the mTangents field. |
AIAnimMesh |
mTangents(AIVector3D.Buffer value)
Sets the address of the specified
AIVector3D.Buffer to the mTangents field. |
org.lwjgl.PointerBuffer |
mTextureCoords()
Returns a
PointerBuffer view of the mTextureCoords field. |
AIVector3D.Buffer |
mTextureCoords(int index)
Returns a
AIVector3D view of the pointer at the specified index of the mTextureCoords field. |
AIAnimMesh |
mTextureCoords(int index,
AIVector3D.Buffer value)
Copies the address of the specified
AIVector3D at the specified index of the mTextureCoords field. |
AIAnimMesh |
mTextureCoords(int index,
java.util.function.Consumer<AIVector3D.Buffer> consumer)
Passes the element at
index of the mTextureCoords field to the specified Consumer. |
AIAnimMesh |
mTextureCoords(org.lwjgl.PointerBuffer value)
Copies the specified
PointerBuffer to the mTextureCoords field. |
AIVector3D.Buffer |
mVertices()
Returns a
AIVector3D.Buffer view of the struct array pointed to by the mVertices field. |
AIAnimMesh |
mVertices(AIVector3D.Buffer value)
Sets the address of the specified
AIVector3D.Buffer to the mVertices field. |
float |
mWeight()
Returns the value of the
mWeight field. |
AIAnimMesh |
mWeight(float value)
Sets the specified value to the
mWeight field. |
static AIVector3D.Buffer |
nmBitangents(long struct)
Unsafe version of
mBitangents(). |
static void |
nmBitangents(long struct,
AIVector3D.Buffer value)
Unsafe version of
mBitangents. |
static org.lwjgl.PointerBuffer |
nmColors(long struct)
Unsafe version of
mColors(). |
static AIColor4D.Buffer |
nmColors(long struct,
int index)
Unsafe version of
mColors. |
static void |
nmColors(long struct,
int index,
AIColor4D.Buffer value)
Unsafe version of
mColors. |
static void |
nmColors(long struct,
org.lwjgl.PointerBuffer value)
Unsafe version of
mColors. |
static AIString |
nmName(long struct)
Unsafe version of
mName(). |
static void |
nmName(long struct,
AIString value)
Unsafe version of
mName. |
static AIVector3D.Buffer |
nmNormals(long struct)
Unsafe version of
mNormals(). |
static void |
nmNormals(long struct,
AIVector3D.Buffer value)
Unsafe version of
mNormals. |
static int |
nmNumVertices(long struct)
Unsafe version of
mNumVertices(). |
static void |
nmNumVertices(long struct,
int value)
Sets the specified value to the
mNumVertices field of the specified struct. |
static AIVector3D.Buffer |
nmTangents(long struct)
Unsafe version of
mTangents(). |
static void |
nmTangents(long struct,
AIVector3D.Buffer value)
Unsafe version of
mTangents. |
static org.lwjgl.PointerBuffer |
nmTextureCoords(long struct)
Unsafe version of
mTextureCoords(). |
static AIVector3D.Buffer |
nmTextureCoords(long struct,
int index)
Unsafe version of
mTextureCoords. |
static void |
nmTextureCoords(long struct,
int index,
AIVector3D.Buffer value)
Unsafe version of
mTextureCoords. |
static void |
nmTextureCoords(long struct,
org.lwjgl.PointerBuffer value)
Unsafe version of
mTextureCoords. |
static AIVector3D.Buffer |
nmVertices(long struct)
Unsafe version of
mVertices(). |
static void |
nmVertices(long struct,
AIVector3D.Buffer value)
Unsafe version of
mVertices. |
static float |
nmWeight(long struct)
Unsafe version of
mWeight(). |
static void |
nmWeight(long struct,
float value)
Unsafe version of
mWeight. |
AIAnimMesh |
set(AIAnimMesh src)
Copies the specified struct data to this struct.
|
AIAnimMesh |
set(AIString mName,
AIVector3D.Buffer mVertices,
AIVector3D.Buffer mNormals,
AIVector3D.Buffer mTangents,
AIVector3D.Buffer mBitangents,
org.lwjgl.PointerBuffer mColors,
org.lwjgl.PointerBuffer mTextureCoords,
int mNumVertices,
float mWeight)
Initializes this struct with the specified values.
|
int |
sizeof() |
public static final int SIZEOF
public static final int ALIGNOF
public static final int MNAME
public static final int MVERTICES
public static final int MNORMALS
public static final int MTANGENTS
public static final int MBITANGENTS
public static final int MCOLORS
public static final int MTEXTURECOORDS
public static final int MNUMVERTICES
public static final int MWEIGHT
public AIAnimMesh(java.nio.ByteBuffer container)
AIAnimMesh 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.Struct@Nullable public AIVector3D.Buffer mVertices()
AIVector3D.Buffer view of the struct array pointed to by the mVertices field.@Nullable public AIVector3D.Buffer mNormals()
AIVector3D.Buffer view of the struct array pointed to by the mNormals field.@Nullable public AIVector3D.Buffer mTangents()
AIVector3D.Buffer view of the struct array pointed to by the mTangents field.@Nullable public AIVector3D.Buffer mBitangents()
AIVector3D.Buffer view of the struct array pointed to by the mBitangents field.public org.lwjgl.PointerBuffer mColors()
PointerBuffer view of the mColors field.@Nullable public AIColor4D.Buffer mColors(int index)
AIColor4D view of the pointer at the specified index of the mColors field.public org.lwjgl.PointerBuffer mTextureCoords()
PointerBuffer view of the mTextureCoords field.@Nullable public AIVector3D.Buffer mTextureCoords(int index)
AIVector3D view of the pointer at the specified index of the mTextureCoords field.public int mNumVertices()
mNumVertices field.public float mWeight()
mWeight field.public AIAnimMesh mName(AIString value)
AIString to the mName field.public AIAnimMesh mName(java.util.function.Consumer<AIString> consumer)
mName field to the specified Consumer.public AIAnimMesh mVertices(@Nullable AIVector3D.Buffer value)
AIVector3D.Buffer to the mVertices field.public AIAnimMesh mNormals(@Nullable AIVector3D.Buffer value)
AIVector3D.Buffer to the mNormals field.public AIAnimMesh mTangents(@Nullable AIVector3D.Buffer value)
AIVector3D.Buffer to the mTangents field.public AIAnimMesh mBitangents(@Nullable AIVector3D.Buffer value)
AIVector3D.Buffer to the mBitangents field.public AIAnimMesh mColors(org.lwjgl.PointerBuffer value)
PointerBuffer to the mColors field.public AIAnimMesh mColors(int index, @Nullable AIColor4D.Buffer value)
AIColor4D at the specified index of the mColors field.public AIAnimMesh mColors(int index, java.util.function.Consumer<AIColor4D.Buffer> consumer)
index of the mColors field to the specified Consumer.public AIAnimMesh mTextureCoords(org.lwjgl.PointerBuffer value)
PointerBuffer to the mTextureCoords field.public AIAnimMesh mTextureCoords(int index, @Nullable AIVector3D.Buffer value)
AIVector3D at the specified index of the mTextureCoords field.public AIAnimMesh mTextureCoords(int index, java.util.function.Consumer<AIVector3D.Buffer> consumer)
index of the mTextureCoords field to the specified Consumer.public AIAnimMesh mNumVertices(int value)
mNumVertices field.public AIAnimMesh mWeight(float value)
mWeight field.public AIAnimMesh set(AIString mName, @Nullable AIVector3D.Buffer mVertices, @Nullable AIVector3D.Buffer mNormals, @Nullable AIVector3D.Buffer mTangents, @Nullable AIVector3D.Buffer mBitangents, org.lwjgl.PointerBuffer mColors, org.lwjgl.PointerBuffer mTextureCoords, int mNumVertices, float mWeight)
public AIAnimMesh set(AIAnimMesh src)
src - the source structpublic static AIAnimMesh malloc()
AIAnimMesh instance allocated with memAlloc. The instance must be explicitly freed.public static AIAnimMesh calloc()
AIAnimMesh instance allocated with memCalloc. The instance must be explicitly freed.public static AIAnimMesh create()
AIAnimMesh instance allocated with BufferUtils.public static AIAnimMesh create(long address)
AIAnimMesh instance for the specified memory address.@Nullable public static AIAnimMesh createSafe(long address)
public static AIAnimMesh.Buffer malloc(int capacity)
AIAnimMesh.Buffer instance allocated with memAlloc. The instance must be explicitly freed.capacity - the buffer capacitypublic static AIAnimMesh.Buffer calloc(int capacity)
AIAnimMesh.Buffer instance allocated with memCalloc. The instance must be explicitly freed.capacity - the buffer capacitypublic static AIAnimMesh.Buffer create(int capacity)
AIAnimMesh.Buffer instance allocated with BufferUtils.capacity - the buffer capacitypublic static AIAnimMesh.Buffer create(long address, int capacity)
AIAnimMesh.Buffer instance at the specified memory.address - the memory addresscapacity - the buffer capacity@Nullable public static AIAnimMesh.Buffer createSafe(long address, int capacity)
public static AIAnimMesh mallocStack()
AIAnimMesh instance allocated on the thread-local MemoryStack.public static AIAnimMesh callocStack()
AIAnimMesh instance allocated on the thread-local MemoryStack and initializes all its bits to zero.public static AIAnimMesh mallocStack(org.lwjgl.system.MemoryStack stack)
AIAnimMesh instance allocated on the specified MemoryStack.stack - the stack from which to allocatepublic static AIAnimMesh callocStack(org.lwjgl.system.MemoryStack stack)
AIAnimMesh instance allocated on the specified MemoryStack and initializes all its bits to zero.stack - the stack from which to allocatepublic static AIAnimMesh.Buffer mallocStack(int capacity)
AIAnimMesh.Buffer instance allocated on the thread-local MemoryStack.capacity - the buffer capacitypublic static AIAnimMesh.Buffer callocStack(int capacity)
AIAnimMesh.Buffer instance allocated on the thread-local MemoryStack and initializes all its bits to zero.capacity - the buffer capacitypublic static AIAnimMesh.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
AIAnimMesh.Buffer instance allocated on the specified MemoryStack.stack - the stack from which to allocatecapacity - the buffer capacitypublic static AIAnimMesh.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
AIAnimMesh.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.stack - the stack from which to allocatecapacity - the buffer capacity@Nullable public static AIVector3D.Buffer nmVertices(long struct)
mVertices().@Nullable public static AIVector3D.Buffer nmNormals(long struct)
mNormals().@Nullable public static AIVector3D.Buffer nmTangents(long struct)
mTangents().@Nullable public static AIVector3D.Buffer nmBitangents(long struct)
mBitangents().public static org.lwjgl.PointerBuffer nmColors(long struct)
mColors().@Nullable public static AIColor4D.Buffer nmColors(long struct, int index)
mColors.public static org.lwjgl.PointerBuffer nmTextureCoords(long struct)
mTextureCoords().@Nullable public static AIVector3D.Buffer nmTextureCoords(long struct, int index)
mTextureCoords.public static int nmNumVertices(long struct)
mNumVertices().public static float nmWeight(long struct)
mWeight().public static void nmVertices(long struct,
@Nullable
AIVector3D.Buffer value)
mVertices.public static void nmNormals(long struct,
@Nullable
AIVector3D.Buffer value)
mNormals.public static void nmTangents(long struct,
@Nullable
AIVector3D.Buffer value)
mTangents.public static void nmBitangents(long struct,
@Nullable
AIVector3D.Buffer value)
mBitangents.public static void nmColors(long struct,
org.lwjgl.PointerBuffer value)
mColors.public static void nmColors(long struct,
int index,
@Nullable
AIColor4D.Buffer value)
mColors.public static void nmTextureCoords(long struct,
org.lwjgl.PointerBuffer value)
mTextureCoords.public static void nmTextureCoords(long struct,
int index,
@Nullable
AIVector3D.Buffer value)
mTextureCoords.public static void nmNumVertices(long struct,
int value)
mNumVertices field of the specified struct.public static void nmWeight(long struct,
float value)
mWeight.Copyright LWJGL. All Rights Reserved. License terms.