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.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 intmNumVertices()
; floatmWeight()
; }
-
-
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 Deprecated 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.Buffer
calloc(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
calloc(org.lwjgl.system.MemoryStack stack)
Returns a newAIAnimMesh
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static AIAnimMesh
callocStack()
Deprecated.static AIAnimMesh.Buffer
callocStack(int capacity)
Deprecated.static AIAnimMesh.Buffer
callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Deprecated.static AIAnimMesh
callocStack(org.lwjgl.system.MemoryStack stack)
Deprecated.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.Buffer
malloc(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newAIAnimMesh.Buffer
instance allocated on the specifiedMemoryStack
.static AIAnimMesh
malloc(org.lwjgl.system.MemoryStack stack)
Returns a newAIAnimMesh
instance allocated on the specifiedMemoryStack
.static AIAnimMesh
mallocStack()
Deprecated.static AIAnimMesh.Buffer
mallocStack(int capacity)
Deprecated.static AIAnimMesh.Buffer
mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Deprecated.static AIAnimMesh
mallocStack(org.lwjgl.system.MemoryStack stack)
Deprecated.AIVector3D.Buffer
mBitangents()
Replacement forAIMesh
::mBitangents
.AIAnimMesh
mBitangents(AIVector3D.Buffer value)
Sets the address of the specifiedAIVector3D.Buffer
to themBitangents()
field.org.lwjgl.PointerBuffer
mColors()
Replacement forAIMesh
::mColors
AIColor4D.Buffer
mColors(int index)
Replacement forAIMesh
::mColors
AIAnimMesh
mColors(int index, java.util.function.Consumer<AIColor4D.Buffer> consumer)
AIAnimMesh
mColors(int index, AIColor4D.Buffer value)
Copies the address of the specifiedAIColor4D.Buffer
at the specified index of themColors()
field.AIAnimMesh
mColors(org.lwjgl.PointerBuffer value)
Copies the specifiedPointerBuffer
to themColors()
field.AIString
mName()
theAnimMesh
nameAIAnimMesh
mName(java.util.function.Consumer<AIString> consumer)
Passes themName()
field to the specifiedConsumer
.AIAnimMesh
mName(AIString value)
AIVector3D.Buffer
mNormals()
Replacement forAIMesh
::mNormals
.AIAnimMesh
mNormals(AIVector3D.Buffer value)
Sets the address of the specifiedAIVector3D.Buffer
to themNormals()
field.int
mNumVertices()
The number of vertices in theaiAnimMesh
, and thus the length of all the member arrays.AIAnimMesh
mNumVertices(int value)
Sets the specified value to themNumVertices()
field.AIVector3D.Buffer
mTangents()
Replacement forAIMesh
::mTangents
.AIAnimMesh
mTangents(AIVector3D.Buffer value)
Sets the address of the specifiedAIVector3D.Buffer
to themTangents()
field.org.lwjgl.PointerBuffer
mTextureCoords()
Replacement forAIMesh
::mTextureCoords
AIVector3D.Buffer
mTextureCoords(int index)
Replacement forAIMesh
::mTextureCoords
AIAnimMesh
mTextureCoords(int index, java.util.function.Consumer<AIVector3D.Buffer> consumer)
AIAnimMesh
mTextureCoords(int index, AIVector3D.Buffer value)
Copies the address of the specifiedAIVector3D.Buffer
at the specified index of themTextureCoords()
field.AIAnimMesh
mTextureCoords(org.lwjgl.PointerBuffer value)
Copies the specifiedPointerBuffer
to themTextureCoords()
field.AIVector3D.Buffer
mVertices()
Replacement forAIMesh
::mVertices
.AIAnimMesh
mVertices(AIVector3D.Buffer value)
Sets the address of the specifiedAIVector3D.Buffer
to themVertices()
field.float
mWeight()
Weight of theAnimMesh
.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
-
mName
public AIString mName()
theAnimMesh
name
-
mVertices
@Nullable public AIVector3D.Buffer mVertices()
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
@Nullable public AIVector3D.Buffer mNormals()
Replacement forAIMesh
::mNormals
.
-
mTangents
@Nullable public AIVector3D.Buffer mTangents()
Replacement forAIMesh
::mTangents
.
-
mBitangents
@Nullable public AIVector3D.Buffer mBitangents()
Replacement forAIMesh
::mBitangents
.
-
mColors
public org.lwjgl.PointerBuffer mColors() @Nullable public AIColor4D.Buffer mColors(int index)
Replacement forAIMesh
::mColors
-
mTextureCoords
public org.lwjgl.PointerBuffer mTextureCoords() @Nullable public AIVector3D.Buffer mTextureCoords(int index)
Replacement forAIMesh
::mTextureCoords
-
mNumVertices
public int mNumVertices()
The number of vertices in theaiAnimMesh
, and thus the length of all the member arrays.This has always the same value as the
mNumVertices
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
public float mWeight()
Weight of theAnimMesh
.
-
mName
public AIAnimMesh mName(AIString value)
-
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.Buffer
at the specified index of themColors()
field.
-
mColors
public AIAnimMesh mColors(int index, java.util.function.Consumer<AIColor4D.Buffer> consumer)
-
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.Buffer
at the specified index of themTextureCoords()
field.
-
mTextureCoords
public AIAnimMesh mTextureCoords(int index, java.util.function.Consumer<AIVector3D.Buffer> consumer)
-
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
@Deprecated public static AIAnimMesh mallocStack()
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)
instead.
-
callocStack
@Deprecated public static AIAnimMesh callocStack()
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)
instead.
-
mallocStack
@Deprecated public static AIAnimMesh mallocStack(org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)
instead.
-
callocStack
@Deprecated public static AIAnimMesh callocStack(org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)
instead.
-
mallocStack
@Deprecated public static AIAnimMesh.Buffer mallocStack(int capacity)
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)
instead.
-
callocStack
@Deprecated public static AIAnimMesh.Buffer callocStack(int capacity)
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)
instead.
-
mallocStack
@Deprecated public static AIAnimMesh.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 AIAnimMesh.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)
instead.
-
malloc
public static AIAnimMesh malloc(org.lwjgl.system.MemoryStack stack)
Returns a newAIAnimMesh
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
calloc
public static AIAnimMesh calloc(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
-
malloc
public static AIAnimMesh.Buffer malloc(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
-
calloc
public static AIAnimMesh.Buffer calloc(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
.
-
-