public class AIMaterial
extends org.lwjgl.system.Struct
implements org.lwjgl.system.NativeResource
Material data is stored using a key-value structure. A single key-value pair is called a 'material property'. C++ users should use the provided member
functions of aiMaterial to process material properties, C users have to stick with the aiMaterialGetXXX family of unbound functions.
The library defines a set of standard keys (AI_MATKEY_XXX).
mProperties – List of all material properties loaded.mNumProperties – Number of properties in the data basemNumAllocated – Storage allocated
struct aiMaterial {
struct aiMaterialProperty ** mProperties;
unsigned int mNumProperties;
unsigned int mNumAllocated;
}| Modifier and Type | Class and Description |
|---|---|
static class |
AIMaterial.Buffer
An array of
AIMaterial structs. |
| Modifier and Type | Field and Description |
|---|---|
static int |
ALIGNOF
The struct alignment in bytes.
|
static int |
MNUMALLOCATED
The struct member offsets.
|
static int |
MNUMPROPERTIES
The struct member offsets.
|
static int |
MPROPERTIES
The struct member offsets.
|
static int |
SIZEOF
The struct size in bytes.
|
| Constructor and Description |
|---|
AIMaterial(java.nio.ByteBuffer container)
Creates a
AIMaterial instance at the current position of the specified ByteBuffer container. |
| Modifier and Type | Method and Description |
|---|---|
static AIMaterial |
calloc()
Returns a new
AIMaterial instance allocated with memCalloc. |
static AIMaterial.Buffer |
calloc(int capacity)
Returns a new
AIMaterial.Buffer instance allocated with memCalloc. |
static AIMaterial |
callocStack()
Returns a new
AIMaterial instance allocated on the thread-local MemoryStack and initializes all its bits to zero. |
static AIMaterial.Buffer |
callocStack(int capacity)
Returns a new
AIMaterial.Buffer instance allocated on the thread-local MemoryStack and initializes all its bits to zero. |
static AIMaterial.Buffer |
callocStack(int capacity,
org.lwjgl.system.MemoryStack stack)
Returns a new
AIMaterial.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero. |
static AIMaterial |
callocStack(org.lwjgl.system.MemoryStack stack)
Returns a new
AIMaterial instance allocated on the specified MemoryStack and initializes all its bits to zero. |
static AIMaterial |
create()
Returns a new
AIMaterial instance allocated with BufferUtils. |
static AIMaterial.Buffer |
create(int capacity)
Returns a new
AIMaterial.Buffer instance allocated with BufferUtils. |
static AIMaterial |
create(long address)
Returns a new
AIMaterial instance for the specified memory address. |
static AIMaterial.Buffer |
create(long address,
int capacity)
Create a
AIMaterial.Buffer instance at the specified memory. |
static AIMaterial |
createSafe(long address)
|
static AIMaterial.Buffer |
createSafe(long address,
int capacity)
|
static AIMaterial |
malloc()
Returns a new
AIMaterial instance allocated with memAlloc. |
static AIMaterial.Buffer |
malloc(int capacity)
Returns a new
AIMaterial.Buffer instance allocated with memAlloc. |
static AIMaterial |
mallocStack()
Returns a new
AIMaterial instance allocated on the thread-local MemoryStack. |
static AIMaterial.Buffer |
mallocStack(int capacity)
Returns a new
AIMaterial.Buffer instance allocated on the thread-local MemoryStack. |
static AIMaterial.Buffer |
mallocStack(int capacity,
org.lwjgl.system.MemoryStack stack)
Returns a new
AIMaterial.Buffer instance allocated on the specified MemoryStack. |
static AIMaterial |
mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a new
AIMaterial instance allocated on the specified MemoryStack. |
int |
mNumAllocated()
Returns the value of the
mNumAllocated field. |
AIMaterial |
mNumAllocated(int value)
Sets the specified value to the
mNumAllocated field. |
int |
mNumProperties()
Returns the value of the
mNumProperties field. |
org.lwjgl.PointerBuffer |
mProperties()
Returns a
PointerBuffer view of the data pointed to by the mProperties field. |
AIMaterial |
mProperties(org.lwjgl.PointerBuffer value)
Sets the address of the specified
PointerBuffer to the mProperties field. |
static int |
nmNumAllocated(long struct)
Unsafe version of
mNumAllocated(). |
static void |
nmNumAllocated(long struct,
int value)
Unsafe version of
mNumAllocated. |
static int |
nmNumProperties(long struct)
Unsafe version of
mNumProperties(). |
static void |
nmNumProperties(long struct,
int value)
Sets the specified value to the
mNumProperties field of the specified struct. |
static org.lwjgl.PointerBuffer |
nmProperties(long struct)
Unsafe version of
mProperties. |
static void |
nmProperties(long struct,
org.lwjgl.PointerBuffer value)
Unsafe version of
mProperties. |
AIMaterial |
set(AIMaterial src)
Copies the specified struct data to this struct.
|
AIMaterial |
set(org.lwjgl.PointerBuffer mProperties,
int mNumAllocated)
Initializes this struct with the specified values.
|
int |
sizeof() |
static void |
validate(long struct)
Validates pointer members that should not be
NULL. |
static void |
validate(long array,
int count)
Calls
validate(long) for each struct contained in the specified struct array. |
public static final int SIZEOF
public static final int ALIGNOF
public static final int MPROPERTIES
public static final int MNUMPROPERTIES
public static final int MNUMALLOCATED
public AIMaterial(java.nio.ByteBuffer container)
AIMaterial instance at the current position of the specified ByteBuffer 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.
public int sizeof()
sizeof in class org.lwjgl.system.Structpublic org.lwjgl.PointerBuffer mProperties()
PointerBuffer view of the data pointed to by the mProperties field.public int mNumProperties()
mNumProperties field.public int mNumAllocated()
mNumAllocated field.public AIMaterial mProperties(org.lwjgl.PointerBuffer value)
PointerBuffer to the mProperties field.public AIMaterial mNumAllocated(int value)
mNumAllocated field.public AIMaterial set(org.lwjgl.PointerBuffer mProperties, int mNumAllocated)
public AIMaterial set(AIMaterial src)
src - the source structpublic static AIMaterial malloc()
AIMaterial instance allocated with memAlloc. The instance must be explicitly freed.public static AIMaterial calloc()
AIMaterial instance allocated with memCalloc. The instance must be explicitly freed.public static AIMaterial create()
AIMaterial instance allocated with BufferUtils.public static AIMaterial create(long address)
AIMaterial instance for the specified memory address.@Nullable public static AIMaterial createSafe(long address)
public static AIMaterial.Buffer malloc(int capacity)
AIMaterial.Buffer instance allocated with memAlloc. The instance must be explicitly freed.capacity - the buffer capacitypublic static AIMaterial.Buffer calloc(int capacity)
AIMaterial.Buffer instance allocated with memCalloc. The instance must be explicitly freed.capacity - the buffer capacitypublic static AIMaterial.Buffer create(int capacity)
AIMaterial.Buffer instance allocated with BufferUtils.capacity - the buffer capacitypublic static AIMaterial.Buffer create(long address, int capacity)
AIMaterial.Buffer instance at the specified memory.address - the memory addresscapacity - the buffer capacity@Nullable public static AIMaterial.Buffer createSafe(long address, int capacity)
public static AIMaterial mallocStack()
AIMaterial instance allocated on the thread-local MemoryStack.public static AIMaterial callocStack()
AIMaterial instance allocated on the thread-local MemoryStack and initializes all its bits to zero.public static AIMaterial mallocStack(org.lwjgl.system.MemoryStack stack)
AIMaterial instance allocated on the specified MemoryStack.stack - the stack from which to allocatepublic static AIMaterial callocStack(org.lwjgl.system.MemoryStack stack)
AIMaterial instance allocated on the specified MemoryStack and initializes all its bits to zero.stack - the stack from which to allocatepublic static AIMaterial.Buffer mallocStack(int capacity)
AIMaterial.Buffer instance allocated on the thread-local MemoryStack.capacity - the buffer capacitypublic static AIMaterial.Buffer callocStack(int capacity)
AIMaterial.Buffer instance allocated on the thread-local MemoryStack and initializes all its bits to zero.capacity - the buffer capacitypublic static AIMaterial.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
AIMaterial.Buffer instance allocated on the specified MemoryStack.stack - the stack from which to allocatecapacity - the buffer capacitypublic static AIMaterial.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
AIMaterial.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.stack - the stack from which to allocatecapacity - the buffer capacitypublic static org.lwjgl.PointerBuffer nmProperties(long struct)
mProperties.public static int nmNumProperties(long struct)
mNumProperties().public static int nmNumAllocated(long struct)
mNumAllocated().public static void nmProperties(long struct,
org.lwjgl.PointerBuffer value)
mProperties.public static void nmNumProperties(long struct,
int value)
mNumProperties field of the specified struct.public static void nmNumAllocated(long struct,
int value)
mNumAllocated.public static void validate(long struct)
NULL.struct - the struct to validatepublic static void validate(long array,
int count)
validate(long) for each struct contained in the specified struct array.array - the struct array to validatecount - the number of structs in arrayCopyright LWJGL. All Rights Reserved. License terms.