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.NativeResourceAnAnimMeshis an attachment to anAIMeshstores per-vertex animations for a particular frame.You may think of an
aiAnimMeshas 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 aiStringmName();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 classAIAnimMesh.BufferAn array ofAIAnimMeshstructs.
-
Field Summary
Fields Modifier and Type Field Description static intALIGNOFThe struct alignment in bytes.static intMBITANGENTS
MCOLORS
MNAME
MNORMALS
MNUMVERTICES
MTANGENTS
MTEXTURECOORDS
MVERTICES
MWEIGHTThe struct member offsets.static intSIZEOFThe struct size in bytes.
-
Constructor Summary
Constructors Constructor Description AIAnimMesh(java.nio.ByteBuffer container)Creates aAIAnimMeshinstance at the current position of the specifiedByteBuffercontainer.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static AIAnimMeshcalloc()Returns a newAIAnimMeshinstance allocated withmemCalloc.static AIAnimMesh.Buffercalloc(int capacity)Returns a newAIAnimMesh.Bufferinstance allocated withmemCalloc.static AIAnimMesh.Buffercalloc(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newAIAnimMesh.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static AIAnimMeshcalloc(org.lwjgl.system.MemoryStack stack)Returns a newAIAnimMeshinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static AIAnimMeshcallocStack()Deprecated.static AIAnimMesh.BuffercallocStack(int capacity)Deprecated.static AIAnimMesh.BuffercallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Deprecated.static AIAnimMeshcallocStack(org.lwjgl.system.MemoryStack stack)Deprecated.static AIAnimMeshcreate()Returns a newAIAnimMeshinstance allocated withBufferUtils.static AIAnimMesh.Buffercreate(int capacity)Returns a newAIAnimMesh.Bufferinstance allocated withBufferUtils.static AIAnimMeshcreate(long address)Returns a newAIAnimMeshinstance for the specified memory address.static AIAnimMesh.Buffercreate(long address, int capacity)Create aAIAnimMesh.Bufferinstance at the specified memory.static AIAnimMeshcreateSafe(long address)static AIAnimMesh.BuffercreateSafe(long address, int capacity)static AIAnimMeshmalloc()Returns a newAIAnimMeshinstance allocated withmemAlloc.static AIAnimMesh.Buffermalloc(int capacity)Returns a newAIAnimMesh.Bufferinstance allocated withmemAlloc.static AIAnimMesh.Buffermalloc(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newAIAnimMesh.Bufferinstance allocated on the specifiedMemoryStack.static AIAnimMeshmalloc(org.lwjgl.system.MemoryStack stack)Returns a newAIAnimMeshinstance allocated on the specifiedMemoryStack.static AIAnimMeshmallocStack()Deprecated.static AIAnimMesh.BuffermallocStack(int capacity)Deprecated.static AIAnimMesh.BuffermallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Deprecated.static AIAnimMeshmallocStack(org.lwjgl.system.MemoryStack stack)Deprecated.AIVector3D.BuffermBitangents()Replacement forAIMesh::mBitangents.AIAnimMeshmBitangents(AIVector3D.Buffer value)Sets the address of the specifiedAIVector3D.Bufferto themBitangents()field.org.lwjgl.PointerBuffermColors()Replacement forAIMesh::mColorsAIColor4D.BuffermColors(int index)Replacement forAIMesh::mColorsAIAnimMeshmColors(int index, java.util.function.Consumer<AIColor4D.Buffer> consumer)AIAnimMeshmColors(int index, AIColor4D.Buffer value)Copies the address of the specifiedAIColor4D.Bufferat the specified index of themColors()field.AIAnimMeshmColors(org.lwjgl.PointerBuffer value)Copies the specifiedPointerBufferto themColors()field.AIStringmName()theAnimMeshnameAIAnimMeshmName(java.util.function.Consumer<AIString> consumer)Passes themName()field to the specifiedConsumer.AIAnimMeshmName(AIString value)AIVector3D.BuffermNormals()Replacement forAIMesh::mNormals.AIAnimMeshmNormals(AIVector3D.Buffer value)Sets the address of the specifiedAIVector3D.Bufferto themNormals()field.intmNumVertices()The number of vertices in theaiAnimMesh, and thus the length of all the member arrays.AIAnimMeshmNumVertices(int value)Sets the specified value to themNumVertices()field.AIVector3D.BuffermTangents()Replacement forAIMesh::mTangents.AIAnimMeshmTangents(AIVector3D.Buffer value)Sets the address of the specifiedAIVector3D.Bufferto themTangents()field.org.lwjgl.PointerBuffermTextureCoords()Replacement forAIMesh::mTextureCoordsAIVector3D.BuffermTextureCoords(int index)Replacement forAIMesh::mTextureCoordsAIAnimMeshmTextureCoords(int index, java.util.function.Consumer<AIVector3D.Buffer> consumer)AIAnimMeshmTextureCoords(int index, AIVector3D.Buffer value)Copies the address of the specifiedAIVector3D.Bufferat the specified index of themTextureCoords()field.AIAnimMeshmTextureCoords(org.lwjgl.PointerBuffer value)Copies the specifiedPointerBufferto themTextureCoords()field.AIVector3D.BuffermVertices()Replacement forAIMesh::mVertices.AIAnimMeshmVertices(AIVector3D.Buffer value)Sets the address of the specifiedAIVector3D.Bufferto themVertices()field.floatmWeight()Weight of theAnimMesh.AIAnimMeshmWeight(float value)Sets the specified value to themWeight()field.static AIVector3D.BuffernmBitangents(long struct)Unsafe version ofmBitangents().static voidnmBitangents(long struct, AIVector3D.Buffer value)Unsafe version ofmBitangents.static org.lwjgl.PointerBuffernmColors(long struct)Unsafe version ofmColors().static AIColor4D.BuffernmColors(long struct, int index)Unsafe version ofmColors.static voidnmColors(long struct, int index, AIColor4D.Buffer value)Unsafe version ofmColors.static voidnmColors(long struct, org.lwjgl.PointerBuffer value)Unsafe version ofmColors.static AIStringnmName(long struct)Unsafe version ofmName().static voidnmName(long struct, AIString value)Unsafe version ofmName.static AIVector3D.BuffernmNormals(long struct)Unsafe version ofmNormals().static voidnmNormals(long struct, AIVector3D.Buffer value)Unsafe version ofmNormals.static intnmNumVertices(long struct)Unsafe version ofmNumVertices().static voidnmNumVertices(long struct, int value)Sets the specified value to themNumVerticesfield of the specifiedstruct.static AIVector3D.BuffernmTangents(long struct)Unsafe version ofmTangents().static voidnmTangents(long struct, AIVector3D.Buffer value)Unsafe version ofmTangents.static org.lwjgl.PointerBuffernmTextureCoords(long struct)Unsafe version ofmTextureCoords().static AIVector3D.BuffernmTextureCoords(long struct, int index)Unsafe version ofmTextureCoords.static voidnmTextureCoords(long struct, int index, AIVector3D.Buffer value)Unsafe version ofmTextureCoords.static voidnmTextureCoords(long struct, org.lwjgl.PointerBuffer value)Unsafe version ofmTextureCoords.static AIVector3D.BuffernmVertices(long struct)Unsafe version ofmVertices().static voidnmVertices(long struct, AIVector3D.Buffer value)Unsafe version ofmVertices.static floatnmWeight(long struct)Unsafe version ofmWeight().static voidnmWeight(long struct, float value)Unsafe version ofmWeight.AIAnimMeshset(AIAnimMesh src)Copies the specified struct data to this struct.AIAnimMeshset(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.intsizeof()
-
-
-
Constructor Detail
-
AIAnimMesh
public AIAnimMesh(java.nio.ByteBuffer container)
Creates aAIAnimMeshinstance at the current position of the specifiedByteBuffercontainer. 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:
sizeofin classorg.lwjgl.system.Struct
-
mName
public AIString mName()
theAnimMeshname
-
mVertices
@Nullable public AIVector3D.Buffer mVertices()
Replacement forAIMesh::mVertices. If this array is non-NULL, it *must* containmNumVerticesentries. The corresponding array in the host mesh must be non-NULLas well - animation meshes may neither add or nor remove vertex components (if a replacement array isNULLand 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
mNumVerticesproperty in the correspondingAIMesh. It is duplicated here merely to make the length of the member arrays accessible even if theaiMeshis 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.Bufferto themVertices()field.
-
mNormals
public AIAnimMesh mNormals(@Nullable AIVector3D.Buffer value)
Sets the address of the specifiedAIVector3D.Bufferto themNormals()field.
-
mTangents
public AIAnimMesh mTangents(@Nullable AIVector3D.Buffer value)
Sets the address of the specifiedAIVector3D.Bufferto themTangents()field.
-
mBitangents
public AIAnimMesh mBitangents(@Nullable AIVector3D.Buffer value)
Sets the address of the specifiedAIVector3D.Bufferto themBitangents()field.
-
mColors
public AIAnimMesh mColors(org.lwjgl.PointerBuffer value)
Copies the specifiedPointerBufferto themColors()field.
-
mColors
public AIAnimMesh mColors(int index, @Nullable AIColor4D.Buffer value)
Copies the address of the specifiedAIColor4D.Bufferat 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 specifiedPointerBufferto themTextureCoords()field.
-
mTextureCoords
public AIAnimMesh mTextureCoords(int index, @Nullable AIVector3D.Buffer value)
Copies the address of the specifiedAIVector3D.Bufferat 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 newAIAnimMeshinstance allocated withmemAlloc. The instance must be explicitly freed.
-
calloc
public static AIAnimMesh calloc()
Returns a newAIAnimMeshinstance allocated withmemCalloc. The instance must be explicitly freed.
-
create
public static AIAnimMesh create()
Returns a newAIAnimMeshinstance allocated withBufferUtils.
-
create
public static AIAnimMesh create(long address)
Returns a newAIAnimMeshinstance for the specified memory address.
-
createSafe
@Nullable public static AIAnimMesh createSafe(long address)
-
malloc
public static AIAnimMesh.Buffer malloc(int capacity)
Returns a newAIAnimMesh.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
public static AIAnimMesh.Buffer calloc(int capacity)
Returns a newAIAnimMesh.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
public static AIAnimMesh.Buffer create(int capacity)
Returns a newAIAnimMesh.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
public static AIAnimMesh.Buffer create(long address, int capacity)
Create aAIAnimMesh.Bufferinstance 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 newAIAnimMeshinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
public static AIAnimMesh calloc(org.lwjgl.system.MemoryStack stack)
Returns a newAIAnimMeshinstance allocated on the specifiedMemoryStackand 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.Bufferinstance 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.Bufferinstance allocated on the specifiedMemoryStackand 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 themNumVerticesfield of the specifiedstruct.
-
nmWeight
public static void nmWeight(long struct, float value)Unsafe version ofmWeight.
-
-