Package org.lwjgl.assimp
Class AIMaterial
- All Implemented Interfaces:
AutoCloseable
,NativeResource
,Pointer
Data structure for a material.
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).
Layout
struct aiMaterial {
struct aiMaterialProperty
** mProperties()
;
unsigned int mNumProperties()
;
unsigned int mNumAllocated()
;
}
-
Nested Class Summary
Nested classes/interfaces inherited from class org.lwjgl.system.Struct
Struct.StructValidation
Nested classes/interfaces inherited from interface org.lwjgl.system.Pointer
Pointer.Default
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
The struct alignment in bytes.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct member offsets.static final int
The struct size in bytes.Fields inherited from interface org.lwjgl.system.Pointer
BITS32, BITS64, CLONG_SHIFT, CLONG_SIZE, POINTER_SHIFT, POINTER_SIZE
-
Constructor Summary
ConstructorDescriptionAIMaterial
(ByteBuffer container) Creates aAIMaterial
instance at the current position of the specifiedByteBuffer
container. -
Method Summary
Modifier and TypeMethodDescriptionstatic AIMaterial
calloc()
Returns a newAIMaterial
instance allocated withmemCalloc
.static AIMaterial.Buffer
calloc
(int capacity) Returns a newAIMaterial.Buffer
instance allocated withmemCalloc
.static AIMaterial.Buffer
calloc
(int capacity, MemoryStack stack) Returns a newAIMaterial.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static AIMaterial
calloc
(MemoryStack stack) Returns a newAIMaterial
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static AIMaterial
Deprecated.static AIMaterial.Buffer
callocStack
(int capacity) Deprecated.static AIMaterial.Buffer
callocStack
(int capacity, MemoryStack stack) Deprecated.static AIMaterial
callocStack
(MemoryStack stack) Deprecated.static AIMaterial
create()
Returns a newAIMaterial
instance allocated withBufferUtils
.static AIMaterial.Buffer
create
(int capacity) Returns a newAIMaterial.Buffer
instance allocated withBufferUtils
.static AIMaterial
create
(long address) Returns a newAIMaterial
instance for the specified memory address.static AIMaterial.Buffer
create
(long address, int capacity) Create aAIMaterial.Buffer
instance at the specified memory.static AIMaterial
createSafe
(long address) static AIMaterial.Buffer
createSafe
(long address, int capacity) static AIMaterial
malloc()
Returns a newAIMaterial
instance allocated withmemAlloc
.static AIMaterial.Buffer
malloc
(int capacity) Returns a newAIMaterial.Buffer
instance allocated withmemAlloc
.static AIMaterial.Buffer
malloc
(int capacity, MemoryStack stack) Returns a newAIMaterial.Buffer
instance allocated on the specifiedMemoryStack
.static AIMaterial
malloc
(MemoryStack stack) Returns a newAIMaterial
instance allocated on the specifiedMemoryStack
.static AIMaterial
Deprecated.static AIMaterial.Buffer
mallocStack
(int capacity) Deprecated.static AIMaterial.Buffer
mallocStack
(int capacity, MemoryStack stack) Deprecated.static AIMaterial
mallocStack
(MemoryStack stack) Deprecated.int
Storage allocatedmNumAllocated
(int value) Sets the specified value to themNumAllocated()
field.int
Number of properties in the data baseList of all material properties loaded.mProperties
(PointerBuffer value) Sets the address of the specifiedPointerBuffer
to themProperties()
field.static int
nmNumAllocated
(long struct) Unsafe version ofmNumAllocated()
.static void
nmNumAllocated
(long struct, int value) Unsafe version ofmNumAllocated
.static int
nmNumProperties
(long struct) Unsafe version ofmNumProperties()
.static void
nmNumProperties
(long struct, int value) Sets the specified value to themNumProperties
field of the specifiedstruct
.static PointerBuffer
nmProperties
(long struct) Unsafe version ofmProperties
.static void
nmProperties
(long struct, PointerBuffer value) Unsafe version ofmProperties
.set
(AIMaterial src) Copies the specified struct data to this struct.set
(PointerBuffer mProperties, int mNumAllocated) Initializes this struct with the specified values.int
sizeof()
Returnssizeof(struct)
.static void
validate
(long struct) Validates pointer members that should not beNULL
.Methods inherited from class org.lwjgl.system.Pointer.Default
address, equals, hashCode, toString
Methods inherited from interface org.lwjgl.system.NativeResource
close, free
-
Field Details
-
SIZEOF
public static final int SIZEOFThe struct size in bytes. -
ALIGNOF
public static final int ALIGNOFThe struct alignment in bytes. -
MPROPERTIES
public static final int MPROPERTIESThe struct member offsets. -
MNUMPROPERTIES
public static final int MNUMPROPERTIESThe struct member offsets. -
MNUMALLOCATED
public static final int MNUMALLOCATEDThe struct member offsets.
-
-
Constructor Details
-
AIMaterial
Creates aAIMaterial
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 Details
-
sizeof
public int sizeof()Description copied from class:Struct
Returnssizeof(struct)
.- Specified by:
sizeof
in classStruct<AIMaterial>
-
mProperties
List of all material properties loaded. -
mNumProperties
public int mNumProperties()Number of properties in the data base -
mNumAllocated
public int mNumAllocated()Storage allocated -
mProperties
Sets the address of the specifiedPointerBuffer
to themProperties()
field. -
mNumAllocated
Sets the specified value to themNumAllocated()
field. -
set
Initializes this struct with the specified values. -
set
Copies the specified struct data to this struct.- Parameters:
src
- the source struct- Returns:
- this struct
-
malloc
Returns a newAIMaterial
instance allocated withmemAlloc
. The instance must be explicitly freed. -
calloc
Returns a newAIMaterial
instance allocated withmemCalloc
. The instance must be explicitly freed. -
create
Returns a newAIMaterial
instance allocated withBufferUtils
. -
create
Returns a newAIMaterial
instance for the specified memory address. -
createSafe
-
malloc
Returns a newAIMaterial.Buffer
instance allocated withmemAlloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
calloc
Returns a newAIMaterial.Buffer
instance allocated withmemCalloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
create
Returns a newAIMaterial.Buffer
instance allocated withBufferUtils
.- Parameters:
capacity
- the buffer capacity
-
create
Create aAIMaterial.Buffer
instance at the specified memory.- Parameters:
address
- the memory addresscapacity
- the buffer capacity
-
createSafe
-
mallocStack
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)
instead. -
callocStack
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)
instead. -
mallocStack
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)
instead. -
callocStack
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)
instead. -
mallocStack
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)
instead. -
callocStack
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)
instead. -
mallocStack
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)
instead. -
callocStack
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)
instead. -
malloc
Returns a newAIMaterial
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
calloc
Returns a newAIMaterial
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocate
-
malloc
Returns a newAIMaterial.Buffer
instance allocated on the specifiedMemoryStack
.- Parameters:
capacity
- the buffer capacitystack
- the stack from which to allocate
-
calloc
Returns a newAIMaterial.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
capacity
- the buffer capacitystack
- the stack from which to allocate
-
nmProperties
Unsafe version ofmProperties
. -
nmNumProperties
public static int nmNumProperties(long struct) Unsafe version ofmNumProperties()
. -
nmNumAllocated
public static int nmNumAllocated(long struct) Unsafe version ofmNumAllocated()
. -
nmProperties
Unsafe version ofmProperties
. -
nmNumProperties
public static void nmNumProperties(long struct, int value) Sets the specified value to themNumProperties
field of the specifiedstruct
. -
nmNumAllocated
public static void nmNumAllocated(long struct, int value) Unsafe version ofmNumAllocated
. -
validate
public static void validate(long struct) Validates pointer members that should not beNULL
.- Parameters:
struct
- the struct to validate
-