Package org.lwjgl.assimp
Class AIAnimMesh
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.assimp.AIAnimMesh
-
- All Implemented Interfaces:
java.lang.AutoCloseable
,org.lwjgl.system.NativeResource
,org.lwjgl.system.Pointer
public class AIAnimMesh extends org.lwjgl.system.Struct implements org.lwjgl.system.NativeResource
AnAnimMesh
is an attachment to anAIMesh
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 byaiMeshAnim
, which references singular mesh attachments by their ID and binds them to a time offset.Member documentation
mName
– theAnimMesh
namemVertices
– Replacement forAIMesh
::mVertices
. If this array is non-NULL
, it *must* containmNumVertices
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 isNULL
and the corresponding source array is not, the source data is taken instead).mNormals
– Replacement forAIMesh
::mNormals
.mTangents
– Replacement forAIMesh
::mTangents
.mBitangents
– Replacement forAIMesh
::mBitangents
.mColors[Assimp.AI_MAX_NUMBER_OF_COLOR_SETS]
– Replacement forAIMesh
::mColors
mTextureCoords[Assimp.AI_MAX_NUMBER_OF_TEXTURECOORDS]
– Replacement forAIMesh
::mTextureCoords
mNumVertices
– The number of vertices in theaiAnimMesh
, and thus the length of all the member arrays. This has always the same value as themNumVertices
property in the correspondingAIMesh
. It is duplicated here merely to make the length of the member arrays accessible even if theaiMesh
is not known, e.g. from language bindings.mWeight
– Weight of theAnimMesh
.
Layout
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; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
AIAnimMesh.Buffer
An array ofAIAnimMesh
structs.
-
Field Summary
Fields Modifier and Type Field Description static int
ALIGNOF
The struct alignment in bytes.static int
MBITANGENTS
MCOLORS
MNAME
MNORMALS
MNUMVERTICES
MTANGENTS
MTEXTURECOORDS
MVERTICES
MWEIGHTThe struct member offsets.static int
SIZEOF
The struct size in bytes.
-
Constructor Summary
Constructors Constructor Description AIAnimMesh(java.nio.ByteBuffer container)
Creates aAIAnimMesh
instance at the current position of the specifiedByteBuffer
container.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static AIAnimMesh
calloc()
Returns a newAIAnimMesh
instance allocated withmemCalloc
.static AIAnimMesh.Buffer
calloc(int capacity)
Returns a newAIAnimMesh.Buffer
instance allocated withmemCalloc
.static AIAnimMesh
callocStack()
Returns a newAIAnimMesh
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static AIAnimMesh.Buffer
callocStack(int capacity)
Returns a newAIAnimMesh.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static AIAnimMesh.Buffer
callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newAIAnimMesh.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static AIAnimMesh
callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newAIAnimMesh
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static AIAnimMesh
create()
Returns a newAIAnimMesh
instance allocated withBufferUtils
.static AIAnimMesh.Buffer
create(int capacity)
Returns a newAIAnimMesh.Buffer
instance allocated withBufferUtils
.static AIAnimMesh
create(long address)
Returns a newAIAnimMesh
instance for the specified memory address.static AIAnimMesh.Buffer
create(long address, int capacity)
Create aAIAnimMesh.Buffer
instance at the specified memory.static AIAnimMesh
createSafe(long address)
static AIAnimMesh.Buffer
createSafe(long address, int capacity)
static AIAnimMesh
malloc()
Returns a newAIAnimMesh
instance allocated withmemAlloc
.static AIAnimMesh.Buffer
malloc(int capacity)
Returns a newAIAnimMesh.Buffer
instance allocated withmemAlloc
.static AIAnimMesh
mallocStack()
Returns a newAIAnimMesh
instance allocated on the thread-localMemoryStack
.static AIAnimMesh.Buffer
mallocStack(int capacity)
Returns a newAIAnimMesh.Buffer
instance allocated on the thread-localMemoryStack
.static AIAnimMesh.Buffer
mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newAIAnimMesh.Buffer
instance allocated on the specifiedMemoryStack
.static AIAnimMesh
mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newAIAnimMesh
instance allocated on the specifiedMemoryStack
.AIVector3D.Buffer
mBitangents()
Returns aAIVector3D.Buffer
view of the struct array pointed to by themBitangents
field.AIAnimMesh
mBitangents(AIVector3D.Buffer value)
Sets the address of the specifiedAIVector3D.Buffer
to themBitangents
field.org.lwjgl.PointerBuffer
mColors()
Returns aPointerBuffer
view of themColors
field.AIColor4D.Buffer
mColors(int index)
Returns aAIColor4D
view of the pointer at the specified index of themColors
field.AIAnimMesh
mColors(int index, java.util.function.Consumer<AIColor4D.Buffer> consumer)
Passes the element atindex
of themColors
field to the specifiedConsumer
.AIAnimMesh
mColors(int index, AIColor4D.Buffer value)
Copies the address of the specifiedAIColor4D
at the specified index of themColors
field.AIAnimMesh
mColors(org.lwjgl.PointerBuffer value)
Copies the specifiedPointerBuffer
to themColors
field.AIString
mName()
Returns aAIString
view of themName
field.AIAnimMesh
mName(java.util.function.Consumer<AIString> consumer)
Passes themName
field to the specifiedConsumer
.AIAnimMesh
mName(AIString value)
Copies the specifiedAIString
to themName
field.AIVector3D.Buffer
mNormals()
Returns aAIVector3D.Buffer
view of the struct array pointed to by themNormals
field.AIAnimMesh
mNormals(AIVector3D.Buffer value)
Sets the address of the specifiedAIVector3D.Buffer
to themNormals
field.int
mNumVertices()
Returns the value of themNumVertices
field.AIAnimMesh
mNumVertices(int value)
Sets the specified value to themNumVertices
field.AIVector3D.Buffer
mTangents()
Returns aAIVector3D.Buffer
view of the struct array pointed to by themTangents
field.AIAnimMesh
mTangents(AIVector3D.Buffer value)
Sets the address of the specifiedAIVector3D.Buffer
to themTangents
field.org.lwjgl.PointerBuffer
mTextureCoords()
Returns aPointerBuffer
view of themTextureCoords
field.AIVector3D.Buffer
mTextureCoords(int index)
Returns aAIVector3D
view of the pointer at the specified index of themTextureCoords
field.AIAnimMesh
mTextureCoords(int index, java.util.function.Consumer<AIVector3D.Buffer> consumer)
Passes the element atindex
of themTextureCoords
field to the specifiedConsumer
.AIAnimMesh
mTextureCoords(int index, AIVector3D.Buffer value)
Copies the address of the specifiedAIVector3D
at the specified index of themTextureCoords
field.AIAnimMesh
mTextureCoords(org.lwjgl.PointerBuffer value)
Copies the specifiedPointerBuffer
to themTextureCoords
field.AIVector3D.Buffer
mVertices()
Returns aAIVector3D.Buffer
view of the struct array pointed to by themVertices
field.AIAnimMesh
mVertices(AIVector3D.Buffer value)
Sets the address of the specifiedAIVector3D.Buffer
to themVertices
field.float
mWeight()
Returns the value of themWeight
field.AIAnimMesh
mWeight(float value)
Sets the specified value to themWeight
field.static AIVector3D.Buffer
nmBitangents(long struct)
Unsafe version ofmBitangents()
.static void
nmBitangents(long struct, AIVector3D.Buffer value)
Unsafe version ofmBitangents
.static org.lwjgl.PointerBuffer
nmColors(long struct)
Unsafe version ofmColors()
.static AIColor4D.Buffer
nmColors(long struct, int index)
Unsafe version ofmColors
.static void
nmColors(long struct, int index, AIColor4D.Buffer value)
Unsafe version ofmColors
.static void
nmColors(long struct, org.lwjgl.PointerBuffer value)
Unsafe version ofmColors
.static AIString
nmName(long struct)
Unsafe version ofmName()
.static void
nmName(long struct, AIString value)
Unsafe version ofmName
.static AIVector3D.Buffer
nmNormals(long struct)
Unsafe version ofmNormals()
.static void
nmNormals(long struct, AIVector3D.Buffer value)
Unsafe version ofmNormals
.static int
nmNumVertices(long struct)
Unsafe version ofmNumVertices()
.static void
nmNumVertices(long struct, int value)
Sets the specified value to themNumVertices
field of the specifiedstruct
.static AIVector3D.Buffer
nmTangents(long struct)
Unsafe version ofmTangents()
.static void
nmTangents(long struct, AIVector3D.Buffer value)
Unsafe version ofmTangents
.static org.lwjgl.PointerBuffer
nmTextureCoords(long struct)
Unsafe version ofmTextureCoords()
.static AIVector3D.Buffer
nmTextureCoords(long struct, int index)
Unsafe version ofmTextureCoords
.static void
nmTextureCoords(long struct, int index, AIVector3D.Buffer value)
Unsafe version ofmTextureCoords
.static void
nmTextureCoords(long struct, org.lwjgl.PointerBuffer value)
Unsafe version ofmTextureCoords
.static AIVector3D.Buffer
nmVertices(long struct)
Unsafe version ofmVertices()
.static void
nmVertices(long struct, AIVector3D.Buffer value)
Unsafe version ofmVertices
.static float
nmWeight(long struct)
Unsafe version ofmWeight()
.static void
nmWeight(long struct, float value)
Unsafe version ofmWeight
.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()
-
-
-
Constructor Detail
-
AIAnimMesh
public AIAnimMesh(java.nio.ByteBuffer container)
Creates aAIAnimMesh
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
-
mVertices
@Nullable public AIVector3D.Buffer mVertices()
Returns aAIVector3D.Buffer
view of the struct array pointed to by themVertices
field.
-
mNormals
@Nullable public AIVector3D.Buffer mNormals()
Returns aAIVector3D.Buffer
view of the struct array pointed to by themNormals
field.
-
mTangents
@Nullable public AIVector3D.Buffer mTangents()
Returns aAIVector3D.Buffer
view of the struct array pointed to by themTangents
field.
-
mBitangents
@Nullable public AIVector3D.Buffer mBitangents()
Returns aAIVector3D.Buffer
view of the struct array pointed to by themBitangents
field.
-
mColors
public org.lwjgl.PointerBuffer mColors()
Returns aPointerBuffer
view of themColors
field.
-
mColors
@Nullable public AIColor4D.Buffer mColors(int index)
Returns aAIColor4D
view of the pointer at the specified index of themColors
field.
-
mTextureCoords
public org.lwjgl.PointerBuffer mTextureCoords()
Returns aPointerBuffer
view of themTextureCoords
field.
-
mTextureCoords
@Nullable public AIVector3D.Buffer mTextureCoords(int index)
Returns aAIVector3D
view of the pointer at the specified index of themTextureCoords
field.
-
mNumVertices
public int mNumVertices()
Returns the value of themNumVertices
field.
-
mWeight
public float mWeight()
Returns the value of themWeight
field.
-
mName
public AIAnimMesh mName(AIString value)
Copies the specifiedAIString
to themName
field.
-
mName
public AIAnimMesh mName(java.util.function.Consumer<AIString> consumer)
Passes themName
field to the specifiedConsumer
.
-
mVertices
public AIAnimMesh mVertices(@Nullable AIVector3D.Buffer value)
Sets the address of the specifiedAIVector3D.Buffer
to themVertices
field.
-
mNormals
public AIAnimMesh mNormals(@Nullable AIVector3D.Buffer value)
Sets the address of the specifiedAIVector3D.Buffer
to themNormals
field.
-
mTangents
public AIAnimMesh mTangents(@Nullable AIVector3D.Buffer value)
Sets the address of the specifiedAIVector3D.Buffer
to themTangents
field.
-
mBitangents
public AIAnimMesh mBitangents(@Nullable AIVector3D.Buffer value)
Sets the address of the specifiedAIVector3D.Buffer
to themBitangents
field.
-
mColors
public AIAnimMesh mColors(org.lwjgl.PointerBuffer value)
Copies the specifiedPointerBuffer
to themColors
field.
-
mColors
public AIAnimMesh mColors(int index, @Nullable AIColor4D.Buffer value)
Copies the address of the specifiedAIColor4D
at the specified index of themColors
field.
-
mColors
public AIAnimMesh mColors(int index, java.util.function.Consumer<AIColor4D.Buffer> consumer)
Passes the element atindex
of themColors
field to the specifiedConsumer
.
-
mTextureCoords
public AIAnimMesh mTextureCoords(org.lwjgl.PointerBuffer value)
Copies the specifiedPointerBuffer
to themTextureCoords
field.
-
mTextureCoords
public AIAnimMesh mTextureCoords(int index, @Nullable AIVector3D.Buffer value)
Copies the address of the specifiedAIVector3D
at the specified index of themTextureCoords
field.
-
mTextureCoords
public AIAnimMesh mTextureCoords(int index, java.util.function.Consumer<AIVector3D.Buffer> consumer)
Passes the element atindex
of themTextureCoords
field to the specifiedConsumer
.
-
mNumVertices
public AIAnimMesh mNumVertices(int value)
Sets the specified value to themNumVertices
field.
-
mWeight
public AIAnimMesh mWeight(float value)
Sets the specified value to themWeight
field.
-
set
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)
Initializes this struct with the specified values.
-
set
public AIAnimMesh set(AIAnimMesh src)
Copies the specified struct data to this struct.- Parameters:
src
- the source struct- Returns:
- this struct
-
malloc
public static AIAnimMesh malloc()
Returns a newAIAnimMesh
instance allocated withmemAlloc
. The instance must be explicitly freed.
-
calloc
public static AIAnimMesh calloc()
Returns a newAIAnimMesh
instance allocated withmemCalloc
. The instance must be explicitly freed.
-
create
public static AIAnimMesh create()
Returns a newAIAnimMesh
instance allocated withBufferUtils
.
-
create
public static AIAnimMesh create(long address)
Returns a newAIAnimMesh
instance for the specified memory address.
-
createSafe
@Nullable public static AIAnimMesh createSafe(long address)
-
malloc
public static AIAnimMesh.Buffer malloc(int capacity)
Returns a newAIAnimMesh.Buffer
instance allocated withmemAlloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
calloc
public static AIAnimMesh.Buffer calloc(int capacity)
Returns a newAIAnimMesh.Buffer
instance allocated withmemCalloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
create
public static AIAnimMesh.Buffer create(int capacity)
Returns a newAIAnimMesh.Buffer
instance allocated withBufferUtils
.- Parameters:
capacity
- the buffer capacity
-
create
public static AIAnimMesh.Buffer create(long address, int capacity)
Create aAIAnimMesh.Buffer
instance at the specified memory.- Parameters:
address
- the memory addresscapacity
- the buffer capacity
-
createSafe
@Nullable public static AIAnimMesh.Buffer createSafe(long address, int capacity)
-
mallocStack
public static AIAnimMesh mallocStack()
Returns a newAIAnimMesh
instance allocated on the thread-localMemoryStack
.
-
callocStack
public static AIAnimMesh callocStack()
Returns a newAIAnimMesh
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.
-
mallocStack
public static AIAnimMesh mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newAIAnimMesh
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
callocStack
public static AIAnimMesh callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newAIAnimMesh
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocate
-
mallocStack
public static AIAnimMesh.Buffer mallocStack(int capacity)
Returns a newAIAnimMesh.Buffer
instance allocated on the thread-localMemoryStack
.- Parameters:
capacity
- the buffer capacity
-
callocStack
public static AIAnimMesh.Buffer callocStack(int capacity)
Returns a newAIAnimMesh.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.- Parameters:
capacity
- the buffer capacity
-
mallocStack
public static AIAnimMesh.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newAIAnimMesh.Buffer
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
callocStack
public static AIAnimMesh.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newAIAnimMesh.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
nmVertices
@Nullable public static AIVector3D.Buffer nmVertices(long struct)
Unsafe version ofmVertices()
.
-
nmNormals
@Nullable public static AIVector3D.Buffer nmNormals(long struct)
Unsafe version ofmNormals()
.
-
nmTangents
@Nullable public static AIVector3D.Buffer nmTangents(long struct)
Unsafe version ofmTangents()
.
-
nmBitangents
@Nullable public static AIVector3D.Buffer nmBitangents(long struct)
Unsafe version ofmBitangents()
.
-
nmColors
public static org.lwjgl.PointerBuffer nmColors(long struct)
Unsafe version ofmColors()
.
-
nmColors
@Nullable public static AIColor4D.Buffer nmColors(long struct, int index)
Unsafe version ofmColors
.
-
nmTextureCoords
public static org.lwjgl.PointerBuffer nmTextureCoords(long struct)
Unsafe version ofmTextureCoords()
.
-
nmTextureCoords
@Nullable public static AIVector3D.Buffer nmTextureCoords(long struct, int index)
Unsafe version ofmTextureCoords
.
-
nmNumVertices
public static int nmNumVertices(long struct)
Unsafe version ofmNumVertices()
.
-
nmWeight
public static float nmWeight(long struct)
Unsafe version ofmWeight()
.
-
nmVertices
public static void nmVertices(long struct, @Nullable AIVector3D.Buffer value)
Unsafe version ofmVertices
.
-
nmNormals
public static void nmNormals(long struct, @Nullable AIVector3D.Buffer value)
Unsafe version ofmNormals
.
-
nmTangents
public static void nmTangents(long struct, @Nullable AIVector3D.Buffer value)
Unsafe version ofmTangents
.
-
nmBitangents
public static void nmBitangents(long struct, @Nullable AIVector3D.Buffer value)
Unsafe version ofmBitangents
.
-
nmColors
public static void nmColors(long struct, org.lwjgl.PointerBuffer value)
Unsafe version ofmColors
.
-
nmColors
public static void nmColors(long struct, int index, @Nullable AIColor4D.Buffer value)
Unsafe version ofmColors
.
-
nmTextureCoords
public static void nmTextureCoords(long struct, org.lwjgl.PointerBuffer value)
Unsafe version ofmTextureCoords
.
-
nmTextureCoords
public static void nmTextureCoords(long struct, int index, @Nullable AIVector3D.Buffer value)
Unsafe version ofmTextureCoords
.
-
nmNumVertices
public static void nmNumVertices(long struct, int value)
Sets the specified value to themNumVertices
field of the specifiedstruct
.
-
nmWeight
public static void nmWeight(long struct, float value)
Unsafe version ofmWeight
.
-
-