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.Member documentation
mName– theAnimMeshnamemVertices– 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– Replacement forAIMesh::mNormals.mTangents– Replacement forAIMesh::mTangents.mBitangents– Replacement forAIMesh::mBitangents.mColors[Assimp.AI_MAX_NUMBER_OF_COLOR_SETS]– Replacement forAIMesh::mColorsmTextureCoords[Assimp.AI_MAX_NUMBER_OF_TEXTURECOORDS]– Replacement forAIMesh::mTextureCoordsmNumVertices– The number of vertices in theaiAnimMesh, and thus the length of all the member arrays. This has always the same value as themNumVerticesproperty 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– Weight of theAnimMesh.
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 int mNumVertices; float mWeight; }
-
-
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 Modifier and Type Method Description static AIAnimMeshcalloc()Returns a newAIAnimMeshinstance allocated withmemCalloc.static AIAnimMesh.Buffercalloc(int capacity)Returns a newAIAnimMesh.Bufferinstance allocated withmemCalloc.static AIAnimMeshcallocStack()Returns a newAIAnimMeshinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.static AIAnimMesh.BuffercallocStack(int capacity)Returns a newAIAnimMesh.Bufferinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.static AIAnimMesh.BuffercallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newAIAnimMesh.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static AIAnimMeshcallocStack(org.lwjgl.system.MemoryStack stack)Returns a newAIAnimMeshinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.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 AIAnimMeshmallocStack()Returns a newAIAnimMeshinstance allocated on the thread-localMemoryStack.static AIAnimMesh.BuffermallocStack(int capacity)Returns a newAIAnimMesh.Bufferinstance allocated on the thread-localMemoryStack.static AIAnimMesh.BuffermallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newAIAnimMesh.Bufferinstance allocated on the specifiedMemoryStack.static AIAnimMeshmallocStack(org.lwjgl.system.MemoryStack stack)Returns a newAIAnimMeshinstance allocated on the specifiedMemoryStack.AIVector3D.BuffermBitangents()Returns aAIVector3D.Bufferview of the struct array pointed to by themBitangentsfield.AIAnimMeshmBitangents(AIVector3D.Buffer value)Sets the address of the specifiedAIVector3D.Bufferto themBitangentsfield.org.lwjgl.PointerBuffermColors()Returns aPointerBufferview of themColorsfield.AIColor4D.BuffermColors(int index)Returns aAIColor4Dview of the pointer at the specified index of themColorsfield.AIAnimMeshmColors(int index, java.util.function.Consumer<AIColor4D.Buffer> consumer)Passes the element atindexof themColorsfield to the specifiedConsumer.AIAnimMeshmColors(int index, AIColor4D.Buffer value)Copies the address of the specifiedAIColor4Dat the specified index of themColorsfield.AIAnimMeshmColors(org.lwjgl.PointerBuffer value)Copies the specifiedPointerBufferto themColorsfield.AIStringmName()Returns aAIStringview of themNamefield.AIAnimMeshmName(java.util.function.Consumer<AIString> consumer)Passes themNamefield to the specifiedConsumer.AIAnimMeshmName(AIString value)Copies the specifiedAIStringto themNamefield.AIVector3D.BuffermNormals()Returns aAIVector3D.Bufferview of the struct array pointed to by themNormalsfield.AIAnimMeshmNormals(AIVector3D.Buffer value)Sets the address of the specifiedAIVector3D.Bufferto themNormalsfield.intmNumVertices()Returns the value of themNumVerticesfield.AIAnimMeshmNumVertices(int value)Sets the specified value to themNumVerticesfield.AIVector3D.BuffermTangents()Returns aAIVector3D.Bufferview of the struct array pointed to by themTangentsfield.AIAnimMeshmTangents(AIVector3D.Buffer value)Sets the address of the specifiedAIVector3D.Bufferto themTangentsfield.org.lwjgl.PointerBuffermTextureCoords()Returns aPointerBufferview of themTextureCoordsfield.AIVector3D.BuffermTextureCoords(int index)Returns aAIVector3Dview of the pointer at the specified index of themTextureCoordsfield.AIAnimMeshmTextureCoords(int index, java.util.function.Consumer<AIVector3D.Buffer> consumer)Passes the element atindexof themTextureCoordsfield to the specifiedConsumer.AIAnimMeshmTextureCoords(int index, AIVector3D.Buffer value)Copies the address of the specifiedAIVector3Dat the specified index of themTextureCoordsfield.AIAnimMeshmTextureCoords(org.lwjgl.PointerBuffer value)Copies the specifiedPointerBufferto themTextureCoordsfield.AIVector3D.BuffermVertices()Returns aAIVector3D.Bufferview of the struct array pointed to by themVerticesfield.AIAnimMeshmVertices(AIVector3D.Buffer value)Sets the address of the specifiedAIVector3D.Bufferto themVerticesfield.floatmWeight()Returns the value of themWeightfield.AIAnimMeshmWeight(float value)Sets the specified value to themWeightfield.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
-
mVertices
@Nullable public AIVector3D.Buffer mVertices()
Returns aAIVector3D.Bufferview of the struct array pointed to by themVerticesfield.
-
mNormals
@Nullable public AIVector3D.Buffer mNormals()
Returns aAIVector3D.Bufferview of the struct array pointed to by themNormalsfield.
-
mTangents
@Nullable public AIVector3D.Buffer mTangents()
Returns aAIVector3D.Bufferview of the struct array pointed to by themTangentsfield.
-
mBitangents
@Nullable public AIVector3D.Buffer mBitangents()
Returns aAIVector3D.Bufferview of the struct array pointed to by themBitangentsfield.
-
mColors
public org.lwjgl.PointerBuffer mColors()
Returns aPointerBufferview of themColorsfield.
-
mColors
@Nullable public AIColor4D.Buffer mColors(int index)
Returns aAIColor4Dview of the pointer at the specified index of themColorsfield.
-
mTextureCoords
public org.lwjgl.PointerBuffer mTextureCoords()
Returns aPointerBufferview of themTextureCoordsfield.
-
mTextureCoords
@Nullable public AIVector3D.Buffer mTextureCoords(int index)
Returns aAIVector3Dview of the pointer at the specified index of themTextureCoordsfield.
-
mNumVertices
public int mNumVertices()
Returns the value of themNumVerticesfield.
-
mWeight
public float mWeight()
Returns the value of themWeightfield.
-
mName
public AIAnimMesh mName(AIString value)
Copies the specifiedAIStringto themNamefield.
-
mName
public AIAnimMesh mName(java.util.function.Consumer<AIString> consumer)
Passes themNamefield to the specifiedConsumer.
-
mVertices
public AIAnimMesh mVertices(@Nullable AIVector3D.Buffer value)
Sets the address of the specifiedAIVector3D.Bufferto themVerticesfield.
-
mNormals
public AIAnimMesh mNormals(@Nullable AIVector3D.Buffer value)
Sets the address of the specifiedAIVector3D.Bufferto themNormalsfield.
-
mTangents
public AIAnimMesh mTangents(@Nullable AIVector3D.Buffer value)
Sets the address of the specifiedAIVector3D.Bufferto themTangentsfield.
-
mBitangents
public AIAnimMesh mBitangents(@Nullable AIVector3D.Buffer value)
Sets the address of the specifiedAIVector3D.Bufferto themBitangentsfield.
-
mColors
public AIAnimMesh mColors(org.lwjgl.PointerBuffer value)
Copies the specifiedPointerBufferto themColorsfield.
-
mColors
public AIAnimMesh mColors(int index, @Nullable AIColor4D.Buffer value)
Copies the address of the specifiedAIColor4Dat the specified index of themColorsfield.
-
mColors
public AIAnimMesh mColors(int index, java.util.function.Consumer<AIColor4D.Buffer> consumer)
Passes the element atindexof themColorsfield to the specifiedConsumer.
-
mTextureCoords
public AIAnimMesh mTextureCoords(org.lwjgl.PointerBuffer value)
Copies the specifiedPointerBufferto themTextureCoordsfield.
-
mTextureCoords
public AIAnimMesh mTextureCoords(int index, @Nullable AIVector3D.Buffer value)
Copies the address of the specifiedAIVector3Dat the specified index of themTextureCoordsfield.
-
mTextureCoords
public AIAnimMesh mTextureCoords(int index, java.util.function.Consumer<AIVector3D.Buffer> consumer)
Passes the element atindexof themTextureCoordsfield to the specifiedConsumer.
-
mNumVertices
public AIAnimMesh mNumVertices(int value)
Sets the specified value to themNumVerticesfield.
-
mWeight
public AIAnimMesh mWeight(float value)
Sets the specified value to themWeightfield.
-
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
public static AIAnimMesh mallocStack()
Returns a newAIAnimMeshinstance allocated on the thread-localMemoryStack.
-
callocStack
public static AIAnimMesh callocStack()
Returns a newAIAnimMeshinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.
-
mallocStack
public static AIAnimMesh mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newAIAnimMeshinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
callocStack
public static AIAnimMesh callocStack(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
-
mallocStack
public static AIAnimMesh.Buffer mallocStack(int capacity)
Returns a newAIAnimMesh.Bufferinstance allocated on the thread-localMemoryStack.- Parameters:
capacity- the buffer capacity
-
callocStack
public static AIAnimMesh.Buffer callocStack(int capacity)
Returns a newAIAnimMesh.Bufferinstance allocated on the thread-localMemoryStackand 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.Bufferinstance 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.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.
-
-