Top Description Inners Fields Constructors Methods
org.lwjgl.assimp

public Class AIMesh

extends Struct<AIMesh>
implements NativeResource
Class Inheritance
All Implemented Interfaces
org.lwjgl.system.NativeResource, java.lang.AutoCloseable
Annotations
@NativeType:struct aiMesh
Imports
javax.annotation.*, java.nio.*, org.lwjgl.*, org.lwjgl.system.*

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 coordinates 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.

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[AI_MAX_NUMBER_OF_COLOR_SETS];
    struct aiVector3D * mTextureCoords[AI_MAX_NUMBER_OF_TEXTURECOORDS];
    unsigned int mNumUVComponents[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;
    aiMorphingMethod mMethod;
    struct aiAABB mAABB;
    struct aiString ** mTextureCoordsNames;
}

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class
AIMesh.Buffer

An array of AIMesh structs.

Field Summary

Modifier and TypeField and Description
public static final int
ALIGNOF

The struct alignment in bytes.

public static final int
MAABB

The struct member offsets.

public static final int
MANIMMESHES

The struct member offsets.

public static final int
MBITANGENTS

The struct member offsets.

public static final int
MBONES

The struct member offsets.

public static final int
MCOLORS

The struct member offsets.

public static final int
MFACES

The struct member offsets.

public static final int
MMATERIALINDEX

The struct member offsets.

public static final int
MMETHOD

The struct member offsets.

public static final int
MNAME

The struct member offsets.

public static final int
MNORMALS

The struct member offsets.

public static final int
MNUMANIMMESHES

The struct member offsets.

public static final int
MNUMBONES

The struct member offsets.

public static final int
MNUMFACES

The struct member offsets.

public static final int
MNUMUVCOMPONENTS

The struct member offsets.

public static final int
MNUMVERTICES

The struct member offsets.

public static final int
MPRIMITIVETYPES

The struct member offsets.

public static final int
MTANGENTS

The struct member offsets.

public static final int
MTEXTURECOORDS

The struct member offsets.

public static final int
MTEXTURECOORDSNAMES

The struct member offsets.

public static final int
MVERTICES

The struct member offsets.

public static final int
SIZEOF

The struct size in bytes.

Inherited from org.lwjgl.system.Struct:
containerDEFAULT_ALIGN_ASDEFAULT_PACK_ALIGNMENT

Constructor Summary

AccessConstructor and Description
protected
AIMesh(long address, ByteBuffer container)

public
AIMesh(ByteBuffer container)

Creates a AIMesh instance at the current position of the specified ByteBuffer container.

Method Summary

Modifier and TypeMethod and Description
public static AIMesh
calloc()

Returns a new AIMesh instance allocated with memCalloc.

public static AIMesh.Buffer
calloc(int
the buffer capacity
capacity
)

Returns a new AIMesh.Buffer instance allocated with memCalloc.

public static AIMesh
calloc(MemoryStack
the stack from which to allocate
stack
)

Returns a new AIMesh instance allocated on the specified MemoryStack and initializes all its bits to zero.

public static AIMesh.Buffer
calloc(int
the buffer capacity
capacity
,
MemoryStack
the stack from which to allocate
stack
)

Returns a new AIMesh.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.

public static AIMesh
callocStack()

Deprecated
Deprecated for removal in 3.4.0.
public static AIMesh
callocStack(MemoryStack stack)

Deprecated
Deprecated for removal in 3.4.0.
public static AIMesh.Buffer
callocStack(int capacity)

Deprecated
Deprecated for removal in 3.4.0.
public static AIMesh.Buffer
callocStack(int capacity, MemoryStack stack)

Deprecated
Deprecated for removal in 3.4.0.
protected AIMesh
create(long
the struct memory address
address
,
ByteBuffer
an optional container buffer, to be referenced strongly by the struct instance.
container
)

Implements abstract org.lwjgl.system.Struct.create.

Similar to the constructor, but returns the exact type of the Struct subclass.
public static AIMesh
create()

Returns a new AIMesh instance allocated with BufferUtils.

public static AIMesh
create(long address)

Returns a new AIMesh instance for the specified memory address.

public static AIMesh.Buffer
create(int
the buffer capacity
capacity
)

Returns a new AIMesh.Buffer instance allocated with BufferUtils.

public static AIMesh.Buffer
create(long
the memory address
address
,
int
the buffer capacity
capacity
)

Create a AIMesh.Buffer instance at the specified memory.

public static AIMesh
createSafe(long address)

Like create, but returns null if address is NULL.

public static AIMesh.Buffer
createSafe(long address, int capacity)

Like create, but returns null if address is NULL.

public AIAABB
mAABB()

the bounding box

public AIMesh
mAABB(AIAABB value)

Copies the specified AIAABB to the mAABB field.

public AIMesh
mAABB(Consumer<AIAABB> consumer)

Passes the mAABB field to the specified Consumer.

public static AIMesh
malloc()

Returns a new AIMesh instance allocated with memAlloc.

public static AIMesh.Buffer
malloc(int
the buffer capacity
capacity
)

Returns a new AIMesh.Buffer instance allocated with memAlloc.

public static AIMesh
malloc(MemoryStack
the stack from which to allocate
stack
)

Returns a new AIMesh instance allocated on the specified MemoryStack.

public static AIMesh.Buffer
malloc(int
the buffer capacity
capacity
,
MemoryStack
the stack from which to allocate
stack
)

Returns a new AIMesh.Buffer instance allocated on the specified MemoryStack.

public static AIMesh
mallocStack()

Deprecated
Deprecated for removal in 3.4.0.
public static AIMesh
mallocStack(MemoryStack stack)

Deprecated
Deprecated for removal in 3.4.0.
public static AIMesh.Buffer
mallocStack(int capacity)

Deprecated
Deprecated for removal in 3.4.0.
public static AIMesh.Buffer
mallocStack(int capacity, MemoryStack stack)

Deprecated
Deprecated for removal in 3.4.0.
public PointerBuffer
mAnimMeshes()

Attachment meshes for this mesh, for vertex-based animation.

public AIMesh
mAnimMeshes(PointerBuffer value)

Sets the address of the specified PointerBuffer to the mAnimMeshes field.

public AIVector3D.Buffer
mBitangents()

Vertex bitangents.

public AIMesh
mBitangents(AIVector3D.Buffer value)

Sets the address of the specified AIVector3D.Buffer to the mBitangents field.

public PointerBuffer
mBones()

The bones of this mesh.

public AIMesh
mBones(PointerBuffer value)

Sets the address of the specified PointerBuffer to the mBones field.

public PointerBuffer
mColors()

Vertex color sets.

public AIColor4D.Buffer
mColors(int index)

Vertex color sets.

public AIMesh
mColors(PointerBuffer value)

Copies the specified PointerBuffer to the mColors field.

public AIMesh
mColors(int index, AIColor4D.Buffer value)

Copies the address of the specified AIColor4D.Buffer at the specified index of the mColors field.

public AIMesh
mColors(int index, Consumer<AIColor4D.Buffer> consumer)

Passes the element at index of the mColors field to the specified Consumer.

public AIFace.Buffer
mFaces()

The faces the mesh is constructed from.

public AIMesh
mFaces(AIFace.Buffer value)

Sets the address of the specified AIFace.Buffer to the mFaces field.

public int
mMaterialIndex()

The material used by this mesh.

public AIMesh
mMaterialIndex(int value)

Sets the specified value to the mMaterialIndex field.

public int
mMethod()

Method of morphing when anim-meshes are specified.

public AIMesh
mMethod(int value)

Sets the specified value to the mMethod field.

public AIString
mName()

Name of the mesh.

public AIMesh
mName(AIString value)

Copies the specified AIString to the mName field.

public AIMesh
mName(Consumer<AIString> consumer)

Passes the mName field to the specified Consumer.

public AIVector3D.Buffer
mNormals()

Vertex normals.

public AIMesh
mNormals(AIVector3D.Buffer value)

Sets the address of the specified AIVector3D.Buffer to the mNormals field.

public int
mNumAnimMeshes()

The number of attachment meshes.

public int
mNumBones()

The number of bones this mesh contains.

public int
mNumFaces()

The number of primitives (triangles, polygons, lines) in this mesh.

public IntBuffer
mNumUVComponents()

Specifies the number of components for a given UV channel.

public int
mNumUVComponents(int index)

Specifies the number of components for a given UV channel.

public AIMesh
mNumUVComponents(IntBuffer value)

Copies the specified IntBuffer to the mNumUVComponents field.

public AIMesh
mNumUVComponents(int index, int value)

Sets the specified value at the specified index of the mNumUVComponents field.

public int
mNumVertices()

The number of vertices in this mesh.

public AIMesh
mNumVertices(int value)

Sets the specified value to the mNumVertices field.

public int
mPrimitiveTypes()

Bitwise combination of the members of the aiPrimitiveType enum.

public AIMesh
mPrimitiveTypes(int value)

Sets the specified value to the mPrimitiveTypes field.

public AIVector3D.Buffer
mTangents()

Vertex tangents.

public AIMesh
mTangents(AIVector3D.Buffer value)

Sets the address of the specified AIVector3D.Buffer to the mTangents field.

public PointerBuffer
mTextureCoords()

Vertex texture coordinates, also known as UV channels.

public AIVector3D.Buffer
mTextureCoords(int index)

Vertex texture coordinates, also known as UV channels.

public AIMesh
mTextureCoords(PointerBuffer value)

Copies the specified PointerBuffer to the mTextureCoords field.

public AIMesh
mTextureCoords(int index, AIVector3D.Buffer value)

Copies the address of the specified AIVector3D.Buffer at the specified index of the mTextureCoords field.

public AIMesh
mTextureCoords(int index, Consumer<AIVector3D.Buffer> consumer)

Passes the element at index of the mTextureCoords field to the specified Consumer.

public PointerBuffer
mTextureCoordsNames()

Vertex UV stream names.

public AIMesh
mTextureCoordsNames(PointerBuffer value)

Sets the address of the specified PointerBuffer to the mTextureCoordsNames field.

public AIVector3D.Buffer
mVertices()

Vertex positions.

public AIMesh
mVertices(AIVector3D.Buffer value)

Sets the address of the specified AIVector3D.Buffer to the mVertices field.

public static AIAABB
nmAABB(long struct)

Unsafe version of mAABB.

public static void
nmAABB(long struct, AIAABB value)

Unsafe version of mAABB.

public static PointerBuffer
nmAnimMeshes(long struct)

Unsafe version of mAnimMeshes.

public static void
nmAnimMeshes(long struct, PointerBuffer value)

Unsafe version of mAnimMeshes.

public static AIVector3D.Buffer
nmBitangents(long struct)

Unsafe version of mBitangents.

public static void
nmBitangents(long struct, AIVector3D.Buffer value)

Unsafe version of mBitangents.

public static PointerBuffer
nmBones(long struct)

Unsafe version of mBones.

public static void
nmBones(long struct, PointerBuffer value)

Unsafe version of mBones.

public static PointerBuffer
nmColors(long struct)

Unsafe version of mColors.

public static AIColor4D.Buffer
nmColors(long struct, int index)

Unsafe version of mColors.

public static void
nmColors(long struct, PointerBuffer value)

Unsafe version of mColors.

public static void
nmColors(long struct, int index, AIColor4D.Buffer value)

Unsafe version of mColors.

public static AIFace.Buffer
nmFaces(long struct)

Unsafe version of mFaces.

public static void
nmFaces(long struct, AIFace.Buffer value)

Unsafe version of mFaces.

public static int
nmMaterialIndex(long struct)

Unsafe version of mMaterialIndex.

public static void
nmMaterialIndex(long struct, int value)

Unsafe version of mMaterialIndex.

public static int
nmMethod(long struct)

Unsafe version of mMethod.

public static void
nmMethod(long struct, int value)

Unsafe version of mMethod.

public static AIString
nmName(long struct)

Unsafe version of mName.

public static void
nmName(long struct, AIString value)

Unsafe version of mName.

public static AIVector3D.Buffer
nmNormals(long struct)

Unsafe version of mNormals.

public static void
nmNormals(long struct, AIVector3D.Buffer value)

Unsafe version of mNormals.

public static int
nmNumAnimMeshes(long struct)

Unsafe version of mNumAnimMeshes.

public static void
nmNumAnimMeshes(long struct, int value)

Sets the specified value to the mNumAnimMeshes field of the specified struct.

public static int
nmNumBones(long struct)

Unsafe version of mNumBones.

public static void
nmNumBones(long struct, int value)

Sets the specified value to the mNumBones field of the specified struct.

public static int
nmNumFaces(long struct)

Unsafe version of mNumFaces.

public static void
nmNumFaces(long struct, int value)

Sets the specified value to the mNumFaces field of the specified struct.

public static IntBuffer
nmNumUVComponents(long struct)

Unsafe version of mNumUVComponents.

public static int
nmNumUVComponents(long struct, int index)

Unsafe version of mNumUVComponents.

public static void
nmNumUVComponents(long struct, IntBuffer value)

Unsafe version of mNumUVComponents.

public static void
nmNumUVComponents(long struct, int index, int value)

Unsafe version of mNumUVComponents.

public static int
nmNumVertices(long struct)

Unsafe version of mNumVertices.

public static void
nmNumVertices(long struct, int value)

Sets the specified value to the mNumVertices field of the specified struct.

public static int
nmPrimitiveTypes(long struct)

Unsafe version of mPrimitiveTypes.

public static void
nmPrimitiveTypes(long struct, int value)

Unsafe version of mPrimitiveTypes.

public static AIVector3D.Buffer
nmTangents(long struct)

Unsafe version of mTangents.

public static void
nmTangents(long struct, AIVector3D.Buffer value)

Unsafe version of mTangents.

public static PointerBuffer
nmTextureCoords(long struct)

Unsafe version of mTextureCoords.

public static AIVector3D.Buffer
nmTextureCoords(long struct, int index)

Unsafe version of mTextureCoords.

public static void
nmTextureCoords(long struct, PointerBuffer value)

Unsafe version of mTextureCoords.

public static void
nmTextureCoords(long struct, int index, AIVector3D.Buffer value)

Unsafe version of mTextureCoords.

public static PointerBuffer
nmTextureCoordsNames(long struct)

Unsafe version of mTextureCoordsNames.

public static void
nmTextureCoordsNames(long struct, PointerBuffer value)

Unsafe version of mTextureCoordsNames.

public static AIVector3D.Buffer
nmVertices(long struct)

Unsafe version of mVertices.

public static void
nmVertices(long struct, AIVector3D.Buffer value)

Unsafe version of mVertices.

public AIMesh
set(int mPrimitiveTypes, int mNumVertices, AIVector3D.Buffer mVertices, AIVector3D.Buffer mNormals, AIVector3D.Buffer mTangents, AIVector3D.Buffer mBitangents, PointerBuffer mColors, PointerBuffer mTextureCoords, IntBuffer mNumUVComponents, AIFace.Buffer mFaces, PointerBuffer mBones, int mMaterialIndex, AIString mName, PointerBuffer mAnimMeshes, int mMethod, AIAABB mAABB, PointerBuffer mTextureCoordsNames)

Initializes this struct with the specified values.

public AIMesh

Returns:

this struct
set
(AIMesh
the source struct
src
)

Copies the specified struct data to this struct.

public int
sizeof()

Implements abstract org.lwjgl.system.Struct.sizeof.

Returns sizeof(struct).
public static void
validate(long
the struct to validate
struct
)

Validates pointer members that should not be NULL.

Inherited from org.lwjgl.system.Struct:
__array__array__array__checkContainer__checkMalloc__create__getContainer__getContainer__member__member__member__padding__padding__struct__struct__union__unionclearfreeisNullvalidate