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
NOT CURRENTLY IN USE. An AnimMesh 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
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
– Replacement forAIMesh
::mNormals
.mTangents
– Replacement forAIMesh
::mTangents
.mBitangents
– Replacement forAIMesh
::mBitangents
.mColors
– Replacement forAIMesh
::mColors
mTextureCoords
– 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.
Layout
struct aiAnimMesh {
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; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class and Description static class
AIAnimMesh.Buffer
An array ofAIAnimMesh
structs.
-
Field Summary
Fields Modifier and Type Field and Description static int
SIZEOF
The struct size in bytes.
-
Constructor Summary
Constructors Constructor and 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 and 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, 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.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, 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.AIAnimMesh
set(AIAnimMesh src)
Copies the specified struct data to this struct.AIAnimMesh
set(AIVector3D.Buffer mVertices, AIVector3D.Buffer mNormals, AIVector3D.Buffer mTangents, AIVector3D.Buffer mBitangents, org.lwjgl.PointerBuffer mColors, org.lwjgl.PointerBuffer mTextureCoords, int mNumVertices)
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.
-
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.
-
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.
-
mNumVertices
public AIAnimMesh mNumVertices(int value)
Sets the specified value to themNumVertices
field.
-
set
public AIAnimMesh set(AIVector3D.Buffer mVertices, AIVector3D.Buffer mNormals, AIVector3D.Buffer mTangents, AIVector3D.Buffer mBitangents, org.lwjgl.PointerBuffer mColors, org.lwjgl.PointerBuffer mTextureCoords, int mNumVertices)
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
-
-