Package org.lwjgl.assimp
Class AIFace
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.assimp.AIFace
-
- All Implemented Interfaces:
java.lang.AutoCloseable,org.lwjgl.system.NativeResource,org.lwjgl.system.Pointer
public class AIFace extends org.lwjgl.system.Struct implements org.lwjgl.system.NativeResourceA single face in a mesh, referring to multiple vertices.If
mNumIndicesis 3, we call the face 'triangle', formNumIndices > 3it's called 'polygon' (hey, that's just a definition!).AIMesh::mPrimitiveTypescan be queried to quickly examine which types of primitive are actually present in a mesh. TheProcess_SortByPTypeflag executes a special post-processing algorithm which splits meshes with *different* primitive types mixed up (e.g. lines and triangles) in several 'clean' submeshes. Furthermore there is a configuration option (Assimp.AI_CONFIG_PP_SBP_REMOVE) to forceProcess_SortByPTypeto remove specific kinds of primitives from the imported scene, completely and forever.Member documentation
mNumIndices– Number of indices defining this face. The maximum value for this member isAssimp.AI_MAX_FACE_INDICES.mIndices– Pointer to the indices array. Size of the array is given innumIndices.
Layout
struct aiFace { unsigned int mNumIndices; unsigned int * mIndices; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classAIFace.BufferAn array ofAIFacestructs.
-
Field Summary
Fields Modifier and Type Field Description static intALIGNOFThe struct alignment in bytes.static intMINDICES
MNUMINDICESThe struct member offsets.static intSIZEOFThe struct size in bytes.
-
Constructor Summary
Constructors Constructor Description AIFace(java.nio.ByteBuffer container)Creates aAIFaceinstance at the current position of the specifiedByteBuffercontainer.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static AIFacecalloc()Returns a newAIFaceinstance allocated withmemCalloc.static AIFace.Buffercalloc(int capacity)Returns a newAIFace.Bufferinstance allocated withmemCalloc.static AIFacecallocStack()Returns a newAIFaceinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.static AIFace.BuffercallocStack(int capacity)Returns a newAIFace.Bufferinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.static AIFace.BuffercallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newAIFace.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static AIFacecallocStack(org.lwjgl.system.MemoryStack stack)Returns a newAIFaceinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static AIFacecreate()Returns a newAIFaceinstance allocated withBufferUtils.static AIFace.Buffercreate(int capacity)Returns a newAIFace.Bufferinstance allocated withBufferUtils.static AIFacecreate(long address)Returns a newAIFaceinstance for the specified memory address.static AIFace.Buffercreate(long address, int capacity)Create aAIFace.Bufferinstance at the specified memory.static AIFacecreateSafe(long address)static AIFace.BuffercreateSafe(long address, int capacity)static AIFacemalloc()Returns a newAIFaceinstance allocated withmemAlloc.static AIFace.Buffermalloc(int capacity)Returns a newAIFace.Bufferinstance allocated withmemAlloc.static AIFacemallocStack()Returns a newAIFaceinstance allocated on the thread-localMemoryStack.static AIFace.BuffermallocStack(int capacity)Returns a newAIFace.Bufferinstance allocated on the thread-localMemoryStack.static AIFace.BuffermallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newAIFace.Bufferinstance allocated on the specifiedMemoryStack.static AIFacemallocStack(org.lwjgl.system.MemoryStack stack)Returns a newAIFaceinstance allocated on the specifiedMemoryStack.java.nio.IntBuffermIndices()Returns aIntBufferview of the data pointed to by themIndicesfield.AIFacemIndices(java.nio.IntBuffer value)Sets the address of the specifiedIntBufferto themIndicesfield.intmNumIndices()Returns the value of themNumIndicesfield.static java.nio.IntBuffernmIndices(long struct)Unsafe version ofmIndices.static voidnmIndices(long struct, java.nio.IntBuffer value)Unsafe version ofmIndices.static intnmNumIndices(long struct)Unsafe version ofmNumIndices().static voidnmNumIndices(long struct, int value)Sets the specified value to themNumIndicesfield of the specifiedstruct.AIFaceset(AIFace src)Copies the specified struct data to this struct.intsizeof()static voidvalidate(long struct)Validates pointer members that should not beNULL.static voidvalidate(long array, int count)Callsvalidate(long)for each struct contained in the specified struct array.
-
-
-
Constructor Detail
-
AIFace
public AIFace(java.nio.ByteBuffer container)
Creates aAIFaceinstance 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
-
mNumIndices
public int mNumIndices()
Returns the value of themNumIndicesfield.
-
mIndices
public java.nio.IntBuffer mIndices()
Returns aIntBufferview of the data pointed to by themIndicesfield.
-
mIndices
public AIFace mIndices(java.nio.IntBuffer value)
Sets the address of the specifiedIntBufferto themIndicesfield.
-
set
public AIFace set(AIFace src)
Copies the specified struct data to this struct.- Parameters:
src- the source struct- Returns:
- this struct
-
malloc
public static AIFace malloc()
Returns a newAIFaceinstance allocated withmemAlloc. The instance must be explicitly freed.
-
calloc
public static AIFace calloc()
Returns a newAIFaceinstance allocated withmemCalloc. The instance must be explicitly freed.
-
create
public static AIFace create()
Returns a newAIFaceinstance allocated withBufferUtils.
-
create
public static AIFace create(long address)
Returns a newAIFaceinstance for the specified memory address.
-
createSafe
@Nullable public static AIFace createSafe(long address)
-
malloc
public static AIFace.Buffer malloc(int capacity)
Returns a newAIFace.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
public static AIFace.Buffer calloc(int capacity)
Returns a newAIFace.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
public static AIFace.Buffer create(int capacity)
Returns a newAIFace.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
public static AIFace.Buffer create(long address, int capacity)
Create aAIFace.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
@Nullable public static AIFace.Buffer createSafe(long address, int capacity)
-
mallocStack
public static AIFace mallocStack()
Returns a newAIFaceinstance allocated on the thread-localMemoryStack.
-
callocStack
public static AIFace callocStack()
Returns a newAIFaceinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.
-
mallocStack
public static AIFace mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newAIFaceinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
callocStack
public static AIFace callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newAIFaceinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
mallocStack
public static AIFace.Buffer mallocStack(int capacity)
Returns a newAIFace.Bufferinstance allocated on the thread-localMemoryStack.- Parameters:
capacity- the buffer capacity
-
callocStack
public static AIFace.Buffer callocStack(int capacity)
Returns a newAIFace.Bufferinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.- Parameters:
capacity- the buffer capacity
-
mallocStack
public static AIFace.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newAIFace.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
callocStack
public static AIFace.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newAIFace.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
nmNumIndices
public static int nmNumIndices(long struct)
Unsafe version ofmNumIndices().
-
nmIndices
public static java.nio.IntBuffer nmIndices(long struct)
Unsafe version ofmIndices.
-
nmNumIndices
public static void nmNumIndices(long struct, int value)Sets the specified value to themNumIndicesfield of the specifiedstruct.
-
nmIndices
public static void nmIndices(long struct, java.nio.IntBuffer value)Unsafe version ofmIndices.
-
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
-
-