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.StructData 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.Member documentation
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 buffermDatais 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.
Layout
struct aiMaterialProperty {struct aiStringmKey; unsigned int mSemantic; unsigned int mIndex; unsigned int mDataLength; aiPropertyTypeInfo mType; char * mData; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classAIMaterialProperty.BufferAn array ofAIMaterialPropertystructs.
-
Constructor Summary
Constructors Constructor Description AIMaterialProperty(java.nio.ByteBuffer container)Creates aAIMaterialPropertyinstance at the current position of the specifiedByteBuffercontainer.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static AIMaterialPropertycreate(long address)Returns a newAIMaterialPropertyinstance for the specified memory address.static AIMaterialProperty.Buffercreate(long address, int capacity)Create aAIMaterialProperty.Bufferinstance at the specified memory.static AIMaterialPropertycreateSafe(long address)static AIMaterialProperty.BuffercreateSafe(long address, int capacity)java.nio.ByteBuffermData()Returns aByteBufferview of the data pointed to by themDatafield.intmDataLength()Returns the value of themDataLengthfield.intmIndex()Returns the value of themIndexfield.AIStringmKey()Returns aAIStringview of themKeyfield.intmSemantic()Returns the value of themSemanticfield.intmType()Returns the value of themTypefield.static java.nio.ByteBuffernmData(long struct)Unsafe version ofmData.static intnmDataLength(long struct)Unsafe version ofmDataLength().static intnmIndex(long struct)Unsafe version ofmIndex().static AIStringnmKey(long struct)Unsafe version ofmKey().static intnmSemantic(long struct)Unsafe version ofmSemantic().static intnmType(long struct)Unsafe version ofmType().intsizeof()
-
-
-
Constructor Detail
-
AIMaterialProperty
public AIMaterialProperty(java.nio.ByteBuffer container)
Creates aAIMaterialPropertyinstance 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
-
mSemantic
public int mSemantic()
Returns the value of themSemanticfield.
-
mIndex
public int mIndex()
Returns the value of themIndexfield.
-
mDataLength
public int mDataLength()
Returns the value of themDataLengthfield.
-
mType
public int mType()
Returns the value of themTypefield.
-
mData
public java.nio.ByteBuffer mData()
Returns aByteBufferview of the data pointed to by themDatafield.
-
create
public static AIMaterialProperty create(long address)
Returns a newAIMaterialPropertyinstance 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.Bufferinstance 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.
-
-