Package org.lwjgl.assimp
Class AIMaterial
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.assimp.AIMaterial
-
- All Implemented Interfaces:
java.lang.AutoCloseable
,org.lwjgl.system.NativeResource
,org.lwjgl.system.Pointer
public class AIMaterial extends org.lwjgl.system.Struct implements org.lwjgl.system.NativeResource
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 theaiMaterialGetXXX
family of unbound functions. The library defines a set of standard keys (AI_MATKEY_XXX).Layout
struct aiMaterial {
struct aiMaterialProperty
**mProperties()
; unsigned intmNumProperties()
; unsigned intmNumAllocated()
; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
AIMaterial.Buffer
An array ofAIMaterial
structs.
-
Field Summary
Fields Modifier and Type Field Description static int
ALIGNOF
The struct alignment in bytes.static int
MNUMALLOCATED
MNUMPROPERTIES
MPROPERTIESThe struct member offsets.static int
SIZEOF
The struct size in bytes.
-
Constructor Summary
Constructors Constructor Description AIMaterial(java.nio.ByteBuffer container)
Creates aAIMaterial
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 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, org.lwjgl.system.MemoryStack stack)
Returns a newAIMaterial.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static AIMaterial
calloc(org.lwjgl.system.MemoryStack stack)
Returns a newAIMaterial
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static AIMaterial
callocStack()
Deprecated.static AIMaterial.Buffer
callocStack(int capacity)
Deprecated.static AIMaterial.Buffer
callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Deprecated.static AIMaterial
callocStack(org.lwjgl.system.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, org.lwjgl.system.MemoryStack stack)
Returns a newAIMaterial.Buffer
instance allocated on the specifiedMemoryStack
.static AIMaterial
malloc(org.lwjgl.system.MemoryStack stack)
Returns a newAIMaterial
instance allocated on the specifiedMemoryStack
.static AIMaterial
mallocStack()
Deprecated.static AIMaterial.Buffer
mallocStack(int capacity)
Deprecated.static AIMaterial.Buffer
mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Deprecated.static AIMaterial
mallocStack(org.lwjgl.system.MemoryStack stack)
Deprecated.int
mNumAllocated()
Storage allocatedAIMaterial
mNumAllocated(int value)
Sets the specified value to themNumAllocated()
field.int
mNumProperties()
Number of properties in the data baseorg.lwjgl.PointerBuffer
mProperties()
List of all material properties loaded.AIMaterial
mProperties(org.lwjgl.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 org.lwjgl.PointerBuffer
nmProperties(long struct)
Unsafe version ofmProperties
.static void
nmProperties(long struct, org.lwjgl.PointerBuffer value)
Unsafe version ofmProperties
.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 beNULL
.
-
-
-
Constructor Detail
-
AIMaterial
public AIMaterial(java.nio.ByteBuffer container)
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 Detail
-
sizeof
public int sizeof()
- Specified by:
sizeof
in classorg.lwjgl.system.Struct
-
mProperties
public org.lwjgl.PointerBuffer 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
public AIMaterial mProperties(org.lwjgl.PointerBuffer value)
Sets the address of the specifiedPointerBuffer
to themProperties()
field.
-
mNumAllocated
public AIMaterial mNumAllocated(int value)
Sets the specified value to themNumAllocated()
field.
-
set
public AIMaterial set(org.lwjgl.PointerBuffer mProperties, int mNumAllocated)
Initializes this struct with the specified values.
-
set
public AIMaterial set(AIMaterial src)
Copies the specified struct data to this struct.- Parameters:
src
- the source struct- Returns:
- this struct
-
malloc
public static AIMaterial malloc()
Returns a newAIMaterial
instance allocated withmemAlloc
. The instance must be explicitly freed.
-
calloc
public static AIMaterial calloc()
Returns a newAIMaterial
instance allocated withmemCalloc
. The instance must be explicitly freed.
-
create
public static AIMaterial create()
Returns a newAIMaterial
instance allocated withBufferUtils
.
-
create
public static AIMaterial create(long address)
Returns a newAIMaterial
instance for the specified memory address.
-
createSafe
@Nullable public static AIMaterial createSafe(long address)
-
malloc
public static AIMaterial.Buffer malloc(int capacity)
Returns a newAIMaterial.Buffer
instance allocated withmemAlloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
calloc
public static AIMaterial.Buffer calloc(int capacity)
Returns a newAIMaterial.Buffer
instance allocated withmemCalloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
create
public static AIMaterial.Buffer create(int capacity)
Returns a newAIMaterial.Buffer
instance allocated withBufferUtils
.- Parameters:
capacity
- the buffer capacity
-
create
public static AIMaterial.Buffer create(long address, int capacity)
Create aAIMaterial.Buffer
instance at the specified memory.- Parameters:
address
- the memory addresscapacity
- the buffer capacity
-
createSafe
@Nullable public static AIMaterial.Buffer createSafe(long address, int capacity)
-
mallocStack
@Deprecated public static AIMaterial mallocStack()
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)
instead.
-
callocStack
@Deprecated public static AIMaterial callocStack()
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)
instead.
-
mallocStack
@Deprecated public static AIMaterial mallocStack(org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(MemoryStack)
instead.
-
callocStack
@Deprecated public static AIMaterial callocStack(org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(MemoryStack)
instead.
-
mallocStack
@Deprecated public static AIMaterial.Buffer mallocStack(int capacity)
Deprecated.Deprecated for removal in 3.4.0. Usemalloc(int, MemoryStack)
instead.
-
callocStack
@Deprecated public static AIMaterial.Buffer callocStack(int capacity)
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)
instead.
-
mallocStack
@Deprecated public static AIMaterial.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 AIMaterial.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Deprecated.Deprecated for removal in 3.4.0. Usecalloc(int, MemoryStack)
instead.
-
malloc
public static AIMaterial malloc(org.lwjgl.system.MemoryStack stack)
Returns a newAIMaterial
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
calloc
public static AIMaterial calloc(org.lwjgl.system.MemoryStack stack)
Returns a newAIMaterial
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocate
-
malloc
public static AIMaterial.Buffer malloc(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newAIMaterial.Buffer
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
calloc
public static AIMaterial.Buffer calloc(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newAIMaterial.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
nmProperties
public static org.lwjgl.PointerBuffer nmProperties(long struct)
Unsafe version ofmProperties
.
-
nmNumProperties
public static int nmNumProperties(long struct)
Unsafe version ofmNumProperties()
.
-
nmNumAllocated
public static int nmNumAllocated(long struct)
Unsafe version ofmNumAllocated()
.
-
nmProperties
public static void nmProperties(long struct, org.lwjgl.PointerBuffer value)
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
-
-