public class AIMaterialProperty
extends org.lwjgl.system.Struct
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.
mKey – Specifies the name of the property (key). Keys are generally case insensitive.mSemantic – Textures: Specifies their exact usage semantic. For non-texture properties, this member is always 0 (or, better-said, TextureType_NONE).mIndex – Textures: Specifies the index of the texture. For non-texture properties, this member is always 0.mDataLength – Size of the buffer mData is pointing to, in bytes. This value may not be 0.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 – Binary buffer to hold the property's value. The size of the buffer is always mDataLength.
struct aiMaterialProperty {
struct aiString mKey;
unsigned int mSemantic;
unsigned int mIndex;
unsigned int mDataLength;
aiPropertyTypeInfo mType;
char * mData;
}| Modifier and Type | Class and Description |
|---|---|
static class |
AIMaterialProperty.Buffer
An array of
AIMaterialProperty structs. |
| Modifier and Type | Field and Description |
|---|---|
static int |
ALIGNOF
The struct alignment in bytes.
|
static int |
MDATA
The struct member offsets.
|
static int |
MDATALENGTH
The struct member offsets.
|
static int |
MINDEX
The struct member offsets.
|
static int |
MKEY
The struct member offsets.
|
static int |
MSEMANTIC
The struct member offsets.
|
static int |
MTYPE
The struct member offsets.
|
static int |
SIZEOF
The struct size in bytes.
|
| Constructor and Description |
|---|
AIMaterialProperty(java.nio.ByteBuffer container)
Creates a
AIMaterialProperty instance at the current position of the specified ByteBuffer container. |
| Modifier and Type | Method and Description |
|---|---|
static AIMaterialProperty |
create(long address)
Returns a new
AIMaterialProperty instance for the specified memory address. |
static AIMaterialProperty.Buffer |
create(long address,
int capacity)
Create a
AIMaterialProperty.Buffer instance at the specified memory. |
static AIMaterialProperty |
createSafe(long address)
|
static AIMaterialProperty.Buffer |
createSafe(long address,
int capacity)
|
java.nio.ByteBuffer |
mData()
Returns a
ByteBuffer view of the data pointed to by the mData field. |
int |
mDataLength()
Returns the value of the
mDataLength field. |
int |
mIndex()
Returns the value of the
mIndex field. |
AIString |
mKey()
Returns a
AIString view of the mKey field. |
int |
mSemantic()
Returns the value of the
mSemantic field. |
int |
mType()
Returns the value of the
mType field. |
static java.nio.ByteBuffer |
nmData(long struct)
Unsafe version of
mData. |
static int |
nmDataLength(long struct)
Unsafe version of
mDataLength(). |
static int |
nmIndex(long struct)
Unsafe version of
mIndex(). |
static AIString |
nmKey(long struct)
Unsafe version of
mKey(). |
static int |
nmSemantic(long struct)
Unsafe version of
mSemantic(). |
static int |
nmType(long struct)
Unsafe version of
mType(). |
int |
sizeof() |
public static final int SIZEOF
public static final int ALIGNOF
public static final int MKEY
public static final int MSEMANTIC
public static final int MINDEX
public static final int MDATALENGTH
public static final int MTYPE
public static final int MDATA
public AIMaterialProperty(java.nio.ByteBuffer container)
AIMaterialProperty 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 int mSemantic()
mSemantic field.public int mIndex()
mIndex field.public int mDataLength()
mDataLength field.public int mType()
mType field.public java.nio.ByteBuffer mData()
ByteBuffer view of the data pointed to by the mData field.public static AIMaterialProperty create(long address)
AIMaterialProperty instance for the specified memory address.@Nullable public static AIMaterialProperty createSafe(long address)
public static AIMaterialProperty.Buffer create(long address, int capacity)
AIMaterialProperty.Buffer instance at the specified memory.address - the memory addresscapacity - the buffer capacity@Nullable public static AIMaterialProperty.Buffer createSafe(long address, int capacity)
public static int nmSemantic(long struct)
mSemantic().public static int nmIndex(long struct)
mIndex().public static int nmDataLength(long struct)
mDataLength().public static int nmType(long struct)
mType().public static java.nio.ByteBuffer nmData(long struct)
mData.Copyright LWJGL. All Rights Reserved. License terms.