Package org.lwjgl.assimp
Class AIMaterialProperty
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.assimp.AIMaterialProperty
-
- All Implemented Interfaces:
org.lwjgl.system.Pointer
public class AIMaterialProperty extends org.lwjgl.system.Struct
Data structure for a single material property.As a user, you'll probably never need to deal with this data structure. Just use the provided
aiGetMaterialXXX()
family of functions to query material properties easily. Processing them manually is faster, but it is not the recommended way. It isn't worth the effort.Material property names follow a simple scheme:
$<name> ?<name> A public property, there must be corresponding AI_MATKEY_XXX define 2nd: Public, but ignored by the aiProcess_RemoveRedundantMaterials post-processing step. ~<name> A temporary property for internal use.
Layout
struct aiMaterialProperty {
struct aiString
mKey()
; unsigned intmSemantic()
; unsigned intmIndex()
; unsigned intmDataLength()
; aiPropertyTypeInfomType()
; char *mData()
; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
AIMaterialProperty.Buffer
An array ofAIMaterialProperty
structs.
-
Constructor Summary
Constructors Constructor Description AIMaterialProperty(java.nio.ByteBuffer container)
Creates aAIMaterialProperty
instance at the current position of the specifiedByteBuffer
container.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static AIMaterialProperty
create(long address)
Returns a newAIMaterialProperty
instance for the specified memory address.static AIMaterialProperty.Buffer
create(long address, int capacity)
Create aAIMaterialProperty.Buffer
instance at the specified memory.static AIMaterialProperty
createSafe(long address)
static AIMaterialProperty.Buffer
createSafe(long address, int capacity)
java.nio.ByteBuffer
mData()
Binary buffer to hold the property's value.int
mDataLength()
Size of the buffermData
is pointing to, in bytes.int
mIndex()
Textures: Specifies the index of the texture.AIString
mKey()
Specifies the name of the property (key).int
mSemantic()
Textures: Specifies their exact usage semantic.int
mType()
Type information for the property.static java.nio.ByteBuffer
nmData(long struct)
Unsafe version ofmData
.static int
nmDataLength(long struct)
Unsafe version ofmDataLength()
.static int
nmIndex(long struct)
Unsafe version ofmIndex()
.static AIString
nmKey(long struct)
Unsafe version ofmKey()
.static int
nmSemantic(long struct)
Unsafe version ofmSemantic()
.static int
nmType(long struct)
Unsafe version ofmType()
.int
sizeof()
-
-
-
Constructor Detail
-
AIMaterialProperty
public AIMaterialProperty(java.nio.ByteBuffer container)
Creates aAIMaterialProperty
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
-
mKey
public AIString mKey()
Specifies the name of the property (key). Keys are generally case insensitive.
-
mSemantic
public int mSemantic()
Textures: Specifies their exact usage semantic. For non-texture properties, this member is always 0 (or, better-said,TextureType_NONE
).
-
mIndex
public int mIndex()
Textures: Specifies the index of the texture. For non-texture properties, this member is always 0.
-
mDataLength
public int mDataLength()
Size of the buffermData
is pointing to, in bytes. This value may not be 0.
-
mType
public int mType()
Type information for the property. Defines the data layout inside the data buffer. This is used by the library internally to perform debug checks and to utilize proper type conversions. (It's probably a hacky solution, but it works.)
-
mData
public java.nio.ByteBuffer mData()
Binary buffer to hold the property's value. The size of the buffer is always mDataLength.
-
create
public static AIMaterialProperty create(long address)
Returns a newAIMaterialProperty
instance for the specified memory address.
-
createSafe
@Nullable public static AIMaterialProperty createSafe(long address)
-
create
public static AIMaterialProperty.Buffer create(long address, int capacity)
Create aAIMaterialProperty.Buffer
instance at the specified memory.- Parameters:
address
- the memory addresscapacity
- the buffer capacity
-
createSafe
@Nullable public static AIMaterialProperty.Buffer createSafe(long address, int capacity)
-
nmSemantic
public static int nmSemantic(long struct)
Unsafe version ofmSemantic()
.
-
nmIndex
public static int nmIndex(long struct)
Unsafe version ofmIndex()
.
-
nmDataLength
public static int nmDataLength(long struct)
Unsafe version ofmDataLength()
.
-
nmType
public static int nmType(long struct)
Unsafe version ofmType()
.
-
nmData
public static java.nio.ByteBuffer nmData(long struct)
Unsafe version ofmData
.
-
-