Class AIMesh
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.assimp.AIMesh
-
- All Implemented Interfaces:
java.lang.AutoCloseable
,org.lwjgl.system.NativeResource
,org.lwjgl.system.Pointer
public class AIMesh extends org.lwjgl.system.Struct implements org.lwjgl.system.NativeResource
A mesh represents a geometry or model with a single material.It usually consists of a number of vertices and a series of primitives/faces referencing the vertices. In addition there might be a series of bones, each of them addressing a number of vertices with a certain weight. Vertex data is presented in channels with each channel containing a single per-vertex information such as a set of texture coords or a normal vector. If a data pointer is non-null, the corresponding data stream is present.
A Mesh uses only a single material which is referenced by a material ID.
Member documentation
mPrimitiveTypes
– Bitwise combination of the members of theaiPrimitiveType
enum. This specifies which types of primitives are present in the mesh. The "SortByPrimitiveType"-Step can be used to make sure the output meshes consist of one primitive type each. One or more of:PrimitiveType_POINT
PrimitiveType_LINE
PrimitiveType_TRIANGLE
PrimitiveType_POLYGON
mNumVertices
– The number of vertices in this mesh. This is also the size of all of the per-vertex data arrays. The maximum value for this member isAssimp.AI_MAX_VERTICES
.mNumFaces
– The number of primitives (triangles, polygons, lines) in this mesh. This is also the size of themFaces
array. The maximum value for this member isAssimp.AI_MAX_FACES
.mVertices
– Vertex positions. This array is always present in a mesh. The array ismNumVertices
in size.mNormals
– Vertex normals.The array contains normalized vectors,
NULL
if not present. The array ismNumVertices
in size. Normals are undefined for point and line primitives. A mesh consisting of points and lines only may not have normal vectors. Meshes with mixed primitive types (i.e. lines and triangles) may have normals, but the normals for vertices that are only referenced by point or line primitives are undefined and set toqNaN
.Note
Normal vectors computed by Assimp are always unit-length. However, this needn't apply for normals that have been taken directly from the model file
mTangents
– Vertex tangents.The tangent of a vertex points in the direction of the positive X texture axis. The array contains normalized vectors,
NULL
if not present. The array ismNumVertices
in size. A mesh consisting of points and lines only may not have normal vectors. Meshes with mixed primitive types (i.e. lines and triangles) may have normals, but the normals for vertices that are only referenced by point or line primitives are undefined and set toqNaN
.Note
If the mesh contains tangents, it automatically also contains bitangents.
mBitangents
– Vertex bitangents.The bitangent of a vertex points in the direction of the positive Y texture axis. The array contains normalized vectors,
NULL
if not present. The array ismNumVertices
in size.Note
If the mesh contains tangents, it automatically also contains bitangents.
mColors[Assimp.AI_MAX_NUMBER_OF_COLOR_SETS]
– Vertex color sets. A mesh may contain 0 toAssimp.AI_MAX_NUMBER_OF_COLOR_SETS
vertex colors per vertex.NULL
if not present. Each array ismNumVertices
in size if present.mTextureCoords[Assimp.AI_MAX_NUMBER_OF_TEXTURECOORDS]
– Vertex texture coords, also known as UV channels. A mesh may contain 0 toAssimp.AI_MAX_NUMBER_OF_TEXTURECOORDS
per vertex.NULL
if not present. The array ismNumVertices
in size.mNumUVComponents[Assimp.AI_MAX_NUMBER_OF_TEXTURECOORDS]
– Specifies the number of components for a given UV channel. Up to three channels are supported (UVW, for accessing volume or cube maps). If the value is 2 for a given channel n, the componentp.z
ofmTextureCoords[n][p]
is set to 0.0f. If the value is 1 for a given channel,p.y
is set to 0.0f, too.mFaces
– The faces the mesh is constructed from. Each face refers to a number of vertices by their indices. This array is always present in a mesh, its size is given inmNumFaces
. If theAssimp.AI_SCENE_FLAGS_NON_VERBOSE_FORMAT
is NOT set each face references an unique set of vertices.mNumBones
– The number of bones this mesh contains. Can be 0, in which case themBones
array isNULL
.mBones
– The bones of this mesh. A bone consists of a name by which it can be found in the frame hierarchy and a set of vertex weights.mMaterialIndex
– The material used by this mesh. A mesh uses only a single material. If an imported model uses multiple materials, the import splits up the mesh. Use this value as index into the scene's material list.mName
– Name of the mesh.Meshes can be named, but this is not a requirement and leaving this field empty is totally fine. There are mainly three uses for mesh names:
- some formats name nodes and meshes independently.
- importers tend to split meshes up to meet the one-material-per-mesh requirement. Assigning the same (dummy) name to each of the result meshes aids the caller at recovering the original mesh partitioning.
- vertex animations refer to meshes by their names.
mNumAnimMeshes
– The number of attachment meshes. Note! Currently only works with Collada loader.mAnimMeshes
– Attachment meshes for this mesh, for vertex-based animation. Attachment meshes carry replacement data for some of the mesh'es vertex components (usually positions, normals). Note! Currently only works with Collada loader.mMethod
– Method of morphing whenanimeshes
are specified. One of:MorphingMethod_VERTEX_BLEND
MorphingMethod_MORPH_NORMALIZED
MorphingMethod_MORPH_RELATIVE
Layout
struct aiMesh { unsigned int mPrimitiveTypes; unsigned int mNumVertices; unsigned int mNumFaces;
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 mNumUVComponents[Assimp.AI_MAX_NUMBER_OF_TEXTURECOORDS];struct aiFace
* mFaces; unsigned int mNumBones;struct aiBone
** mBones; unsigned int mMaterialIndex;struct aiString
mName; unsigned int mNumAnimMeshes;struct aiAnimMesh
** mAnimMeshes; unsigned int mMethod;struct aiAABB
mAABB; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
AIMesh.Buffer
An array ofAIMesh
structs.
-
Field Summary
Fields Modifier and Type Field Description static int
ALIGNOF
The struct alignment in bytes.static int
MAABB
MANIMMESHES
MBITANGENTS
MBONES
MCOLORS
MFACES
MMATERIALINDEX
MMETHOD
MNAME
MNORMALS
MNUMANIMMESHES
MNUMBONES
MNUMFACES
MNUMUVCOMPONENTS
MNUMVERTICES
MPRIMITIVETYPES
MTANGENTS
MTEXTURECOORDS
MVERTICESThe struct member offsets.static int
SIZEOF
The struct size in bytes.
-
Constructor Summary
Constructors Constructor Description AIMesh(java.nio.ByteBuffer container)
Creates aAIMesh
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 AIMesh
calloc()
Returns a newAIMesh
instance allocated withmemCalloc
.static AIMesh.Buffer
calloc(int capacity)
Returns a newAIMesh.Buffer
instance allocated withmemCalloc
.static AIMesh
callocStack()
Returns a newAIMesh
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static AIMesh.Buffer
callocStack(int capacity)
Returns a newAIMesh.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static AIMesh.Buffer
callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newAIMesh.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static AIMesh
callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newAIMesh
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static AIMesh
create()
Returns a newAIMesh
instance allocated withBufferUtils
.static AIMesh.Buffer
create(int capacity)
Returns a newAIMesh.Buffer
instance allocated withBufferUtils
.static AIMesh
create(long address)
Returns a newAIMesh
instance for the specified memory address.static AIMesh.Buffer
create(long address, int capacity)
Create aAIMesh.Buffer
instance at the specified memory.static AIMesh
createSafe(long address)
static AIMesh.Buffer
createSafe(long address, int capacity)
AIAABB
mAABB()
Returns aAIAABB
view of themAABB
field.AIMesh
mAABB(java.util.function.Consumer<AIAABB> consumer)
Passes themAABB
field to the specifiedConsumer
.AIMesh
mAABB(AIAABB value)
Copies the specifiedAIAABB
to themAABB
field.static AIMesh
malloc()
Returns a newAIMesh
instance allocated withmemAlloc
.static AIMesh.Buffer
malloc(int capacity)
Returns a newAIMesh.Buffer
instance allocated withmemAlloc
.static AIMesh
mallocStack()
Returns a newAIMesh
instance allocated on the thread-localMemoryStack
.static AIMesh.Buffer
mallocStack(int capacity)
Returns a newAIMesh.Buffer
instance allocated on the thread-localMemoryStack
.static AIMesh.Buffer
mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newAIMesh.Buffer
instance allocated on the specifiedMemoryStack
.static AIMesh
mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newAIMesh
instance allocated on the specifiedMemoryStack
.org.lwjgl.PointerBuffer
mAnimMeshes()
Returns aPointerBuffer
view of the data pointed to by themAnimMeshes
field.AIMesh
mAnimMeshes(org.lwjgl.PointerBuffer value)
Sets the address of the specifiedPointerBuffer
to themAnimMeshes
field.AIVector3D.Buffer
mBitangents()
Returns aAIVector3D.Buffer
view of the struct array pointed to by themBitangents
field.AIMesh
mBitangents(AIVector3D.Buffer value)
Sets the address of the specifiedAIVector3D.Buffer
to themBitangents
field.org.lwjgl.PointerBuffer
mBones()
Returns aPointerBuffer
view of the data pointed to by themBones
field.AIMesh
mBones(org.lwjgl.PointerBuffer value)
Sets the address of the specifiedPointerBuffer
to themBones
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.AIMesh
mColors(int index, java.util.function.Consumer<AIColor4D.Buffer> consumer)
Passes the element atindex
of themColors
field to the specifiedConsumer
.AIMesh
mColors(int index, AIColor4D.Buffer value)
Copies the address of the specifiedAIColor4D
at the specified index of themColors
field.AIMesh
mColors(org.lwjgl.PointerBuffer value)
Copies the specifiedPointerBuffer
to themColors
field.AIFace.Buffer
mFaces()
Returns aAIFace.Buffer
view of the struct array pointed to by themFaces
field.AIMesh
mFaces(AIFace.Buffer value)
Sets the address of the specifiedAIFace.Buffer
to themFaces
field.int
mMaterialIndex()
Returns the value of themMaterialIndex
field.AIMesh
mMaterialIndex(int value)
Sets the specified value to themMaterialIndex
field.int
mMethod()
Returns the value of themMethod
field.AIMesh
mMethod(int value)
Sets the specified value to themMethod
field.AIString
mName()
Returns aAIString
view of themName
field.AIMesh
mName(java.util.function.Consumer<AIString> consumer)
Passes themName
field to the specifiedConsumer
.AIMesh
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.AIMesh
mNormals(AIVector3D.Buffer value)
Sets the address of the specifiedAIVector3D.Buffer
to themNormals
field.int
mNumAnimMeshes()
Returns the value of themNumAnimMeshes
field.int
mNumBones()
Returns the value of themNumBones
field.int
mNumFaces()
Returns the value of themNumFaces
field.java.nio.IntBuffer
mNumUVComponents()
Returns aIntBuffer
view of themNumUVComponents
field.int
mNumUVComponents(int index)
Returns the value at the specified index of themNumUVComponents
field.AIMesh
mNumUVComponents(int index, int value)
Sets the specified value at the specified index of themNumUVComponents
field.AIMesh
mNumUVComponents(java.nio.IntBuffer value)
Copies the specifiedIntBuffer
to themNumUVComponents
field.int
mNumVertices()
Returns the value of themNumVertices
field.AIMesh
mNumVertices(int value)
Sets the specified value to themNumVertices
field.int
mPrimitiveTypes()
Returns the value of themPrimitiveTypes
field.AIMesh
mPrimitiveTypes(int value)
Sets the specified value to themPrimitiveTypes
field.AIVector3D.Buffer
mTangents()
Returns aAIVector3D.Buffer
view of the struct array pointed to by themTangents
field.AIMesh
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.AIMesh
mTextureCoords(int index, java.util.function.Consumer<AIVector3D.Buffer> consumer)
Passes the element atindex
of themTextureCoords
field to the specifiedConsumer
.AIMesh
mTextureCoords(int index, AIVector3D.Buffer value)
Copies the address of the specifiedAIVector3D
at the specified index of themTextureCoords
field.AIMesh
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.AIMesh
mVertices(AIVector3D.Buffer value)
Sets the address of the specifiedAIVector3D.Buffer
to themVertices
field.static AIAABB
nmAABB(long struct)
Unsafe version ofmAABB()
.static void
nmAABB(long struct, AIAABB value)
Unsafe version ofmAABB
.static org.lwjgl.PointerBuffer
nmAnimMeshes(long struct)
Unsafe version ofmAnimMeshes
.static void
nmAnimMeshes(long struct, org.lwjgl.PointerBuffer value)
Unsafe version ofmAnimMeshes
.static AIVector3D.Buffer
nmBitangents(long struct)
Unsafe version ofmBitangents()
.static void
nmBitangents(long struct, AIVector3D.Buffer value)
Unsafe version ofmBitangents
.static org.lwjgl.PointerBuffer
nmBones(long struct)
Unsafe version ofmBones
.static void
nmBones(long struct, org.lwjgl.PointerBuffer value)
Unsafe version ofmBones
.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 AIFace.Buffer
nmFaces(long struct)
Unsafe version ofmFaces()
.static void
nmFaces(long struct, AIFace.Buffer value)
Unsafe version ofmFaces
.static int
nmMaterialIndex(long struct)
Unsafe version ofmMaterialIndex()
.static void
nmMaterialIndex(long struct, int value)
Unsafe version ofmMaterialIndex
.static int
nmMethod(long struct)
Unsafe version ofmMethod()
.static void
nmMethod(long struct, int value)
Unsafe version ofmMethod
.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
nmNumAnimMeshes(long struct)
Unsafe version ofmNumAnimMeshes()
.static void
nmNumAnimMeshes(long struct, int value)
Sets the specified value to themNumAnimMeshes
field of the specifiedstruct
.static int
nmNumBones(long struct)
Unsafe version ofmNumBones()
.static void
nmNumBones(long struct, int value)
Sets the specified value to themNumBones
field of the specifiedstruct
.static int
nmNumFaces(long struct)
Unsafe version ofmNumFaces()
.static void
nmNumFaces(long struct, int value)
Sets the specified value to themNumFaces
field of the specifiedstruct
.static java.nio.IntBuffer
nmNumUVComponents(long struct)
Unsafe version ofmNumUVComponents()
.static int
nmNumUVComponents(long struct, int index)
Unsafe version ofmNumUVComponents
.static void
nmNumUVComponents(long struct, int index, int value)
Unsafe version ofmNumUVComponents
.static void
nmNumUVComponents(long struct, java.nio.IntBuffer value)
Unsafe version ofmNumUVComponents
.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 int
nmPrimitiveTypes(long struct)
Unsafe version ofmPrimitiveTypes()
.static void
nmPrimitiveTypes(long struct, int value)
Unsafe version ofmPrimitiveTypes
.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
.AIMesh
set(int mPrimitiveTypes, int mNumVertices, AIVector3D.Buffer mVertices, AIVector3D.Buffer mNormals, AIVector3D.Buffer mTangents, AIVector3D.Buffer mBitangents, org.lwjgl.PointerBuffer mColors, org.lwjgl.PointerBuffer mTextureCoords, java.nio.IntBuffer mNumUVComponents, AIFace.Buffer mFaces, org.lwjgl.PointerBuffer mBones, int mMaterialIndex, AIString mName, org.lwjgl.PointerBuffer mAnimMeshes, int mMethod, AIAABB mAABB)
Initializes this struct with the specified values.AIMesh
set(AIMesh src)
Copies the specified struct data to this struct.int
sizeof()
static void
validate(long struct)
Validates pointer members that should not beNULL
.static void
validate(long array, int count)
Callsvalidate(long)
for each struct contained in the specified struct array.
-
-
-
Field Detail
-
SIZEOF
The struct size in bytes.
-
ALIGNOF
The struct alignment in bytes.
-
MPRIMITIVETYPES, MNUMVERTICES, MNUMFACES, MVERTICES, MNORMALS, MTANGENTS, MBITANGENTS, MCOLORS, MTEXTURECOORDS, MNUMUVCOMPONENTS, MFACES, MNUMBONES, MBONES, MMATERIALINDEX, MNAME, MNUMANIMMESHES, MANIMMESHES, MMETHOD, MAABB
The struct member offsets.
-
-
Constructor Detail
-
AIMesh
public AIMesh(java.nio.ByteBuffer container)
Creates aAIMesh
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
-
mPrimitiveTypes
public int mPrimitiveTypes()
Returns the value of themPrimitiveTypes
field.
-
mNumVertices
public int mNumVertices()
Returns the value of themNumVertices
field.
-
mNumFaces
public int mNumFaces()
Returns the value of themNumFaces
field.
-
mVertices
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.
-
mNumUVComponents
public java.nio.IntBuffer mNumUVComponents()
Returns aIntBuffer
view of themNumUVComponents
field.
-
mNumUVComponents
public int mNumUVComponents(int index)
Returns the value at the specified index of themNumUVComponents
field.
-
mFaces
public AIFace.Buffer mFaces()
Returns aAIFace.Buffer
view of the struct array pointed to by themFaces
field.
-
mNumBones
public int mNumBones()
Returns the value of themNumBones
field.
-
mBones
@Nullable public org.lwjgl.PointerBuffer mBones()
Returns aPointerBuffer
view of the data pointed to by themBones
field.
-
mMaterialIndex
public int mMaterialIndex()
Returns the value of themMaterialIndex
field.
-
mNumAnimMeshes
public int mNumAnimMeshes()
Returns the value of themNumAnimMeshes
field.
-
mAnimMeshes
@Nullable public org.lwjgl.PointerBuffer mAnimMeshes()
Returns aPointerBuffer
view of the data pointed to by themAnimMeshes
field.
-
mMethod
public int mMethod()
Returns the value of themMethod
field.
-
mPrimitiveTypes
public AIMesh mPrimitiveTypes(int value)
Sets the specified value to themPrimitiveTypes
field.
-
mNumVertices
public AIMesh mNumVertices(int value)
Sets the specified value to themNumVertices
field.
-
mVertices
public AIMesh mVertices(AIVector3D.Buffer value)
Sets the address of the specifiedAIVector3D.Buffer
to themVertices
field.
-
mNormals
public AIMesh mNormals(@Nullable AIVector3D.Buffer value)
Sets the address of the specifiedAIVector3D.Buffer
to themNormals
field.
-
mTangents
public AIMesh mTangents(@Nullable AIVector3D.Buffer value)
Sets the address of the specifiedAIVector3D.Buffer
to themTangents
field.
-
mBitangents
public AIMesh mBitangents(@Nullable AIVector3D.Buffer value)
Sets the address of the specifiedAIVector3D.Buffer
to themBitangents
field.
-
mColors
public AIMesh mColors(org.lwjgl.PointerBuffer value)
Copies the specifiedPointerBuffer
to themColors
field.
-
mColors
public AIMesh mColors(int index, @Nullable AIColor4D.Buffer value)
Copies the address of the specifiedAIColor4D
at the specified index of themColors
field.
-
mColors
public AIMesh mColors(int index, java.util.function.Consumer<AIColor4D.Buffer> consumer)
Passes the element atindex
of themColors
field to the specifiedConsumer
.
-
mTextureCoords
public AIMesh mTextureCoords(org.lwjgl.PointerBuffer value)
Copies the specifiedPointerBuffer
to themTextureCoords
field.
-
mTextureCoords
public AIMesh mTextureCoords(int index, @Nullable AIVector3D.Buffer value)
Copies the address of the specifiedAIVector3D
at the specified index of themTextureCoords
field.
-
mTextureCoords
public AIMesh mTextureCoords(int index, java.util.function.Consumer<AIVector3D.Buffer> consumer)
Passes the element atindex
of themTextureCoords
field to the specifiedConsumer
.
-
mNumUVComponents
public AIMesh mNumUVComponents(java.nio.IntBuffer value)
Copies the specifiedIntBuffer
to themNumUVComponents
field.
-
mNumUVComponents
public AIMesh mNumUVComponents(int index, int value)
Sets the specified value at the specified index of themNumUVComponents
field.
-
mFaces
public AIMesh mFaces(AIFace.Buffer value)
Sets the address of the specifiedAIFace.Buffer
to themFaces
field.
-
mBones
public AIMesh mBones(@Nullable org.lwjgl.PointerBuffer value)
Sets the address of the specifiedPointerBuffer
to themBones
field.
-
mMaterialIndex
public AIMesh mMaterialIndex(int value)
Sets the specified value to themMaterialIndex
field.
-
mName
public AIMesh mName(java.util.function.Consumer<AIString> consumer)
Passes themName
field to the specifiedConsumer
.
-
mAnimMeshes
public AIMesh mAnimMeshes(@Nullable org.lwjgl.PointerBuffer value)
Sets the address of the specifiedPointerBuffer
to themAnimMeshes
field.
-
mMethod
public AIMesh mMethod(int value)
Sets the specified value to themMethod
field.
-
mAABB
public AIMesh mAABB(java.util.function.Consumer<AIAABB> consumer)
Passes themAABB
field to the specifiedConsumer
.
-
set
public AIMesh set(int mPrimitiveTypes, int mNumVertices, AIVector3D.Buffer mVertices, @Nullable AIVector3D.Buffer mNormals, @Nullable AIVector3D.Buffer mTangents, @Nullable AIVector3D.Buffer mBitangents, org.lwjgl.PointerBuffer mColors, org.lwjgl.PointerBuffer mTextureCoords, java.nio.IntBuffer mNumUVComponents, AIFace.Buffer mFaces, @Nullable org.lwjgl.PointerBuffer mBones, int mMaterialIndex, AIString mName, @Nullable org.lwjgl.PointerBuffer mAnimMeshes, int mMethod, AIAABB mAABB)
Initializes this struct with the specified values.
-
set
public AIMesh set(AIMesh src)
Copies the specified struct data to this struct.- Parameters:
src
- the source struct- Returns:
- this struct
-
malloc
public static AIMesh malloc()
Returns a newAIMesh
instance allocated withmemAlloc
. The instance must be explicitly freed.
-
calloc
public static AIMesh calloc()
Returns a newAIMesh
instance allocated withmemCalloc
. The instance must be explicitly freed.
-
create
public static AIMesh create()
Returns a newAIMesh
instance allocated withBufferUtils
.
-
create
public static AIMesh create(long address)
Returns a newAIMesh
instance for the specified memory address.
-
createSafe
@Nullable public static AIMesh createSafe(long address)
-
malloc
public static AIMesh.Buffer malloc(int capacity)
Returns a newAIMesh.Buffer
instance allocated withmemAlloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
calloc
public static AIMesh.Buffer calloc(int capacity)
Returns a newAIMesh.Buffer
instance allocated withmemCalloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
create
public static AIMesh.Buffer create(int capacity)
Returns a newAIMesh.Buffer
instance allocated withBufferUtils
.- Parameters:
capacity
- the buffer capacity
-
create
public static AIMesh.Buffer create(long address, int capacity)
Create aAIMesh.Buffer
instance at the specified memory.- Parameters:
address
- the memory addresscapacity
- the buffer capacity
-
createSafe
@Nullable public static AIMesh.Buffer createSafe(long address, int capacity)
-
mallocStack
public static AIMesh mallocStack()
Returns a newAIMesh
instance allocated on the thread-localMemoryStack
.
-
callocStack
public static AIMesh callocStack()
Returns a newAIMesh
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.
-
mallocStack
public static AIMesh mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newAIMesh
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
callocStack
public static AIMesh callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newAIMesh
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocate
-
mallocStack
public static AIMesh.Buffer mallocStack(int capacity)
Returns a newAIMesh.Buffer
instance allocated on the thread-localMemoryStack
.- Parameters:
capacity
- the buffer capacity
-
callocStack
public static AIMesh.Buffer callocStack(int capacity)
Returns a newAIMesh.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.- Parameters:
capacity
- the buffer capacity
-
mallocStack
public static AIMesh.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newAIMesh.Buffer
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
callocStack
public static AIMesh.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newAIMesh.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
nmPrimitiveTypes
public static int nmPrimitiveTypes(long struct)
Unsafe version ofmPrimitiveTypes()
.
-
nmNumVertices
public static int nmNumVertices(long struct)
Unsafe version ofmNumVertices()
.
-
nmNumFaces
public static int nmNumFaces(long struct)
Unsafe version ofmNumFaces()
.
-
nmVertices
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
.
-
nmNumUVComponents
public static java.nio.IntBuffer nmNumUVComponents(long struct)
Unsafe version ofmNumUVComponents()
.
-
nmNumUVComponents
public static int nmNumUVComponents(long struct, int index)
Unsafe version ofmNumUVComponents
.
-
nmFaces
public static AIFace.Buffer nmFaces(long struct)
Unsafe version ofmFaces()
.
-
nmNumBones
public static int nmNumBones(long struct)
Unsafe version ofmNumBones()
.
-
nmBones
@Nullable public static org.lwjgl.PointerBuffer nmBones(long struct)
Unsafe version ofmBones
.
-
nmMaterialIndex
public static int nmMaterialIndex(long struct)
Unsafe version ofmMaterialIndex()
.
-
nmNumAnimMeshes
public static int nmNumAnimMeshes(long struct)
Unsafe version ofmNumAnimMeshes()
.
-
nmAnimMeshes
@Nullable public static org.lwjgl.PointerBuffer nmAnimMeshes(long struct)
Unsafe version ofmAnimMeshes
.
-
nmMethod
public static int nmMethod(long struct)
Unsafe version ofmMethod()
.
-
nmPrimitiveTypes
public static void nmPrimitiveTypes(long struct, int value)
Unsafe version ofmPrimitiveTypes
.
-
nmNumVertices
public static void nmNumVertices(long struct, int value)
Sets the specified value to themNumVertices
field of the specifiedstruct
.
-
nmNumFaces
public static void nmNumFaces(long struct, int value)
Sets the specified value to themNumFaces
field of the specifiedstruct
.
-
nmVertices
public static void nmVertices(long struct, 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
.
-
nmNumUVComponents
public static void nmNumUVComponents(long struct, java.nio.IntBuffer value)
Unsafe version ofmNumUVComponents
.
-
nmNumUVComponents
public static void nmNumUVComponents(long struct, int index, int value)
Unsafe version ofmNumUVComponents
.
-
nmFaces
public static void nmFaces(long struct, AIFace.Buffer value)
Unsafe version ofmFaces
.
-
nmNumBones
public static void nmNumBones(long struct, int value)
Sets the specified value to themNumBones
field of the specifiedstruct
.
-
nmBones
public static void nmBones(long struct, @Nullable org.lwjgl.PointerBuffer value)
Unsafe version ofmBones
.
-
nmMaterialIndex
public static void nmMaterialIndex(long struct, int value)
Unsafe version ofmMaterialIndex
.
-
nmNumAnimMeshes
public static void nmNumAnimMeshes(long struct, int value)
Sets the specified value to themNumAnimMeshes
field of the specifiedstruct
.
-
nmAnimMeshes
public static void nmAnimMeshes(long struct, @Nullable org.lwjgl.PointerBuffer value)
Unsafe version ofmAnimMeshes
.
-
nmMethod
public static void nmMethod(long struct, int value)
Unsafe version ofmMethod
.
-
validate
public static void validate(long struct)
Validates pointer members that should not beNULL
.- Parameters:
struct
- the struct to validate
-
validate
public static void validate(long array, int count)
Callsvalidate(long)
for each struct contained in the specified struct array.- Parameters:
array
- the struct array to validatecount
- the number of structs inarray
-
-