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.NativeResource
A single face in a mesh, referring to multiple vertices.If
mNumIndices
is 3, we call the face 'triangle', formNumIndices > 3
it's called 'polygon' (hey, that's just a definition!).AIMesh
::mPrimitiveTypes
can be queried to quickly examine which types of primitive are actually present in a mesh. TheProcess_SortByPType
flag 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_SortByPType
to remove specific kinds of primitives from the imported scene, completely and forever.Layout
struct aiFace { unsigned int
mNumIndices()
; unsigned int *mIndices()
; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
AIFace.Buffer
An array ofAIFace
structs.
-
Field Summary
Fields Modifier and Type Field Description static int
ALIGNOF
The struct alignment in bytes.static int
MINDICES
MNUMINDICESThe struct member offsets.static int
SIZEOF
The struct size in bytes.
-
Constructor Summary
Constructors Constructor Description AIFace(java.nio.ByteBuffer container)
Creates aAIFace
instance at the current position of the specifiedByteBuffer
container.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static AIFace
calloc()
Returns a newAIFace
instance allocated withmemCalloc
.static AIFace.Buffer
calloc(int capacity)
Returns a newAIFace.Buffer
instance allocated withmemCalloc
.static AIFace.Buffer
calloc(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newAIFace.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static AIFace
calloc(org.lwjgl.system.MemoryStack stack)
Returns a newAIFace
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static AIFace
callocStack()
Deprecated.static AIFace.Buffer
callocStack(int capacity)
Deprecated.static AIFace.Buffer
callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Deprecated.static AIFace
callocStack(org.lwjgl.system.MemoryStack stack)
Deprecated.static AIFace
create()
Returns a newAIFace
instance allocated withBufferUtils
.static AIFace.Buffer
create(int capacity)
Returns a newAIFace.Buffer
instance allocated withBufferUtils
.static AIFace
create(long address)
Returns a newAIFace
instance for the specified memory address.static AIFace.Buffer
create(long address, int capacity)
Create aAIFace.Buffer
instance at the specified memory.static AIFace
createSafe(long address)
static AIFace.Buffer
createSafe(long address, int capacity)
static AIFace
malloc()
Returns a newAIFace
instance allocated withmemAlloc
.static AIFace.Buffer
malloc(int capacity)
Returns a newAIFace.Buffer
instance allocated withmemAlloc
.static AIFace.Buffer
malloc(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newAIFace.Buffer
instance allocated on the specifiedMemoryStack
.static AIFace
malloc(org.lwjgl.system.MemoryStack stack)
Returns a newAIFace
instance allocated on the specifiedMemoryStack
.static AIFace
mallocStack()
Deprecated.static AIFace.Buffer
mallocStack(int capacity)
Deprecated.static AIFace.Buffer
mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Deprecated.static AIFace
mallocStack(org.lwjgl.system.MemoryStack stack)
Deprecated.java.nio.IntBuffer
mIndices()
Pointer to the indices array.AIFace
mIndices(java.nio.IntBuffer value)
Sets the address of the specifiedIntBuffer
to themIndices()
field.int
mNumIndices()
Number of indices defining this face.static java.nio.IntBuffer
nmIndices(long struct)
Unsafe version ofmIndices
.static void
nmIndices(long struct, java.nio.IntBuffer value)
Unsafe version ofmIndices
.static int
nmNumIndices(long struct)
Unsafe version ofmNumIndices()
.static void
nmNumIndices(long struct, int value)
Sets the specified value to themNumIndices
field of the specifiedstruct
.AIFace
set(AIFace src)
Copies the specified struct data to this struct.int
sizeof()
static void
validate(long struct)
Validates pointer members that should not beNULL
.
-
-
-
Constructor Detail
-
AIFace
public AIFace(java.nio.ByteBuffer container)
Creates aAIFace
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
-
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 specifiedIntBuffer
to 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 newAIFace
instance allocated withmemAlloc
. The instance must be explicitly freed.
-
calloc
public static AIFace calloc()
Returns a newAIFace
instance allocated withmemCalloc
. The instance must be explicitly freed.
-
create
public static AIFace create()
Returns a newAIFace
instance allocated withBufferUtils
.
-
create
public static AIFace create(long address)
Returns a newAIFace
instance for the specified memory address.
-
createSafe
@Nullable public static AIFace createSafe(long address)
-
malloc
public static AIFace.Buffer malloc(int capacity)
Returns a newAIFace.Buffer
instance allocated withmemAlloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
calloc
public static AIFace.Buffer calloc(int capacity)
Returns a newAIFace.Buffer
instance allocated withmemCalloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
create
public static AIFace.Buffer create(int capacity)
Returns a newAIFace.Buffer
instance allocated withBufferUtils
.- Parameters:
capacity
- the buffer capacity
-
create
public static AIFace.Buffer create(long address, int capacity)
Create aAIFace.Buffer
instance 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 newAIFace
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
calloc
public static AIFace calloc(org.lwjgl.system.MemoryStack stack)
Returns a newAIFace
instance allocated on the specifiedMemoryStack
and 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.Buffer
instance 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.Buffer
instance allocated on the specifiedMemoryStack
and 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 themNumIndices
field 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
-
-