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.NativeResourceData 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
aiMaterialto process material properties, C users have to stick with theaiMaterialGetXXXfamily of unbound functions. The library defines a set of standard keys (AI_MATKEY_XXX).Member documentation
mProperties– List of all material properties loaded.mNumProperties– Number of properties in the data basemNumAllocated– Storage allocated
Layout
struct aiMaterial {struct aiMaterialProperty** mProperties; unsigned int mNumProperties; unsigned int mNumAllocated; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classAIMaterial.BufferAn array ofAIMaterialstructs.
-
Field Summary
Fields Modifier and Type Field Description static intALIGNOFThe struct alignment in bytes.static intMNUMALLOCATED
MNUMPROPERTIES
MPROPERTIESThe struct member offsets.static intSIZEOFThe struct size in bytes.
-
Constructor Summary
Constructors Constructor Description AIMaterial(java.nio.ByteBuffer container)Creates aAIMaterialinstance at the current position of the specifiedByteBuffercontainer.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static AIMaterialcalloc()Returns a newAIMaterialinstance allocated withmemCalloc.static AIMaterial.Buffercalloc(int capacity)Returns a newAIMaterial.Bufferinstance allocated withmemCalloc.static AIMaterialcallocStack()Returns a newAIMaterialinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.static AIMaterial.BuffercallocStack(int capacity)Returns a newAIMaterial.Bufferinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.static AIMaterial.BuffercallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newAIMaterial.Bufferinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static AIMaterialcallocStack(org.lwjgl.system.MemoryStack stack)Returns a newAIMaterialinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.static AIMaterialcreate()Returns a newAIMaterialinstance allocated withBufferUtils.static AIMaterial.Buffercreate(int capacity)Returns a newAIMaterial.Bufferinstance allocated withBufferUtils.static AIMaterialcreate(long address)Returns a newAIMaterialinstance for the specified memory address.static AIMaterial.Buffercreate(long address, int capacity)Create aAIMaterial.Bufferinstance at the specified memory.static AIMaterialcreateSafe(long address)static AIMaterial.BuffercreateSafe(long address, int capacity)static AIMaterialmalloc()Returns a newAIMaterialinstance allocated withmemAlloc.static AIMaterial.Buffermalloc(int capacity)Returns a newAIMaterial.Bufferinstance allocated withmemAlloc.static AIMaterialmallocStack()Returns a newAIMaterialinstance allocated on the thread-localMemoryStack.static AIMaterial.BuffermallocStack(int capacity)Returns a newAIMaterial.Bufferinstance allocated on the thread-localMemoryStack.static AIMaterial.BuffermallocStack(int capacity, org.lwjgl.system.MemoryStack stack)Returns a newAIMaterial.Bufferinstance allocated on the specifiedMemoryStack.static AIMaterialmallocStack(org.lwjgl.system.MemoryStack stack)Returns a newAIMaterialinstance allocated on the specifiedMemoryStack.intmNumAllocated()Returns the value of themNumAllocatedfield.AIMaterialmNumAllocated(int value)Sets the specified value to themNumAllocatedfield.intmNumProperties()Returns the value of themNumPropertiesfield.org.lwjgl.PointerBuffermProperties()Returns aPointerBufferview of the data pointed to by themPropertiesfield.AIMaterialmProperties(org.lwjgl.PointerBuffer value)Sets the address of the specifiedPointerBufferto themPropertiesfield.static intnmNumAllocated(long struct)Unsafe version ofmNumAllocated().static voidnmNumAllocated(long struct, int value)Unsafe version ofmNumAllocated.static intnmNumProperties(long struct)Unsafe version ofmNumProperties().static voidnmNumProperties(long struct, int value)Sets the specified value to themNumPropertiesfield of the specifiedstruct.static org.lwjgl.PointerBuffernmProperties(long struct)Unsafe version ofmProperties.static voidnmProperties(long struct, org.lwjgl.PointerBuffer value)Unsafe version ofmProperties.AIMaterialset(AIMaterial src)Copies the specified struct data to this struct.AIMaterialset(org.lwjgl.PointerBuffer mProperties, int mNumAllocated)Initializes this struct with the specified values.intsizeof()static voidvalidate(long struct)Validates pointer members that should not beNULL.static voidvalidate(long array, int count)Callsvalidate(long)for each struct contained in the specified struct array.
-
-
-
Constructor Detail
-
AIMaterial
public AIMaterial(java.nio.ByteBuffer container)
Creates aAIMaterialinstance 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
-
mProperties
public org.lwjgl.PointerBuffer mProperties()
Returns aPointerBufferview of the data pointed to by themPropertiesfield.
-
mNumProperties
public int mNumProperties()
Returns the value of themNumPropertiesfield.
-
mNumAllocated
public int mNumAllocated()
Returns the value of themNumAllocatedfield.
-
mProperties
public AIMaterial mProperties(org.lwjgl.PointerBuffer value)
Sets the address of the specifiedPointerBufferto themPropertiesfield.
-
mNumAllocated
public AIMaterial mNumAllocated(int value)
Sets the specified value to themNumAllocatedfield.
-
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 newAIMaterialinstance allocated withmemAlloc. The instance must be explicitly freed.
-
calloc
public static AIMaterial calloc()
Returns a newAIMaterialinstance allocated withmemCalloc. The instance must be explicitly freed.
-
create
public static AIMaterial create()
Returns a newAIMaterialinstance allocated withBufferUtils.
-
create
public static AIMaterial create(long address)
Returns a newAIMaterialinstance for the specified memory address.
-
createSafe
@Nullable public static AIMaterial createSafe(long address)
-
malloc
public static AIMaterial.Buffer malloc(int capacity)
Returns a newAIMaterial.Bufferinstance allocated withmemAlloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
calloc
public static AIMaterial.Buffer calloc(int capacity)
Returns a newAIMaterial.Bufferinstance allocated withmemCalloc. The instance must be explicitly freed.- Parameters:
capacity- the buffer capacity
-
create
public static AIMaterial.Buffer create(int capacity)
Returns a newAIMaterial.Bufferinstance allocated withBufferUtils.- Parameters:
capacity- the buffer capacity
-
create
public static AIMaterial.Buffer create(long address, int capacity)
Create aAIMaterial.Bufferinstance at the specified memory.- Parameters:
address- the memory addresscapacity- the buffer capacity
-
createSafe
@Nullable public static AIMaterial.Buffer createSafe(long address, int capacity)
-
mallocStack
public static AIMaterial mallocStack()
Returns a newAIMaterialinstance allocated on the thread-localMemoryStack.
-
callocStack
public static AIMaterial callocStack()
Returns a newAIMaterialinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.
-
mallocStack
public static AIMaterial mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newAIMaterialinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocate
-
callocStack
public static AIMaterial callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newAIMaterialinstance allocated on the specifiedMemoryStackand initializes all its bits to zero.- Parameters:
stack- the stack from which to allocate
-
mallocStack
public static AIMaterial.Buffer mallocStack(int capacity)
Returns a newAIMaterial.Bufferinstance allocated on the thread-localMemoryStack.- Parameters:
capacity- the buffer capacity
-
callocStack
public static AIMaterial.Buffer callocStack(int capacity)
Returns a newAIMaterial.Bufferinstance allocated on the thread-localMemoryStackand initializes all its bits to zero.- Parameters:
capacity- the buffer capacity
-
mallocStack
public static AIMaterial.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newAIMaterial.Bufferinstance allocated on the specifiedMemoryStack.- Parameters:
stack- the stack from which to allocatecapacity- the buffer capacity
-
callocStack
public static AIMaterial.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newAIMaterial.Bufferinstance allocated on the specifiedMemoryStackand 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 themNumPropertiesfield 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
-
validate
public static void validate(long array, int count)Callsvalidate(long)for each struct contained in the specified struct array.- Parameters:
array- the struct array to validatecount- the number of structs inarray
-
-