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.Layout
struct aiFace { unsigned intmNumIndices(); 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 Deprecated 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 AIFace.Buffercalloc(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newAIFace.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static AIFacecalloc(org.lwjgl.system.MemoryStack stack)Returns a newAIFaceinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static AIFacecallocStack()Deprecated.static AIFace.BuffercallocStack(int capacity)Deprecated.static AIFace.BuffercallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Deprecated.static AIFacecallocStack(org.lwjgl.system.MemoryStack stack)Deprecated.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 AIFace.Buffermalloc(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newAIFace.Bufferinstance allocated on the specifiedMemoryStack.static AIFacemalloc(org.lwjgl.system.MemoryStack stack)Returns a newAIFaceinstance allocated on the specifiedMemoryStack.static AIFacemallocStack()Deprecated.static AIFace.BuffermallocStack(int capacity)Deprecated.static AIFace.BuffermallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Deprecated.static AIFacemallocStack(org.lwjgl.system.MemoryStack stack)Deprecated.java.nio.IntBuffermIndices()Pointer to the indices array.AIFacemIndices(java.nio.IntBuffer value)Sets the address of the specifiedIntBufferto themIndices()field.intmNumIndices()Number of indices defining this face.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.
-
-
-
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()
Number of indices defining this face. The maximum value for this member isAssimp.AI_MAX_FACE_INDICES.
-
mIndices
public java.nio.IntBuffer mIndices()
Pointer to the indices array. Size of the array is given innumIndices.
-
mIndices
public AIFace mIndices(java.nio.IntBuffer value)
Sets the address of the specifiedIntBufferto themIndices()field.
-
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
@Deprecated public static AIFace mallocStack()
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)instead.
-
callocStack
@Deprecated public static AIFace callocStack()
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)instead.
-
mallocStack
@Deprecated public static AIFace mallocStack(org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)instead.
-
callocStack
@Deprecated public static AIFace callocStack(org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)instead.
-
mallocStack
@Deprecated public static AIFace.Buffer mallocStack(int capacity)
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)instead.
-
callocStack
@Deprecated public static AIFace.Buffer callocStack(int capacity)
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)instead.
-
mallocStack
@Deprecated public static AIFace.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)instead.
-
callocStack
@Deprecated public static AIFace.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)instead.
-
malloc
public static AIFace malloc(org.lwjgl.system.MemoryStack stack)
Returns a newAIFaceinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
calloc
public static AIFace calloc(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
-
malloc
public static AIFace.Buffer malloc(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
-
calloc
public static AIFace.Buffer calloc(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
-
-