Top Description Inners Fields Constructors Methods
org.lwjgl.assimp

public Class AIMaterialProperty

extends Struct<AIMaterialProperty>
Class Inheritance
Annotations
@NativeType:struct aiMaterialProperty
Imports
javax.annotation.*, java.nio.*, org.lwjgl.system.*

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 int mSemantic;
    unsigned int mIndex;
    unsigned int mDataLength;
    aiPropertyTypeInfo mType;
    char * mData;
}

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static class

Field Summary

Modifier and TypeField and Description
public static final int
ALIGNOF

The struct alignment in bytes.

public static final int
MDATA

The struct member offsets.

public static final int
MDATALENGTH

The struct member offsets.

public static final int
MINDEX

The struct member offsets.

public static final int
MKEY

The struct member offsets.

public static final int
MSEMANTIC

The struct member offsets.

public static final int
MTYPE

The struct member offsets.

public static final int
SIZEOF

The struct size in bytes.

Inherited from org.lwjgl.system.Struct:
containerDEFAULT_ALIGN_ASDEFAULT_PACK_ALIGNMENT

Constructor Summary

AccessConstructor and Description
protected
AIMaterialProperty(long address, ByteBuffer container)

public
AIMaterialProperty(ByteBuffer container)

Creates a AIMaterialProperty instance at the current position of the specified ByteBuffer container.

Method Summary

Modifier and TypeMethod and Description
protected AIMaterialProperty
create(long
the struct memory address
address
,
ByteBuffer
an optional container buffer, to be referenced strongly by the struct instance.
container
)

Implements abstract org.lwjgl.system.Struct.create.

Similar to the constructor, but returns the exact type of the Struct subclass.
public static AIMaterialProperty
create(long address)

Returns a new AIMaterialProperty instance for the specified memory address.

public static AIMaterialProperty.Buffer
create(long
the memory address
address
,
int
the buffer capacity
capacity
)

Create a AIMaterialProperty.Buffer instance at the specified memory.

public static AIMaterialProperty
createSafe(long address)

Like create, but returns null if address is NULL.

public static AIMaterialProperty.Buffer
createSafe(long address, int capacity)

Like create, but returns null if address is NULL.

public ByteBuffer
mData()

Binary buffer to hold the property's value.

public int
mDataLength()

Size of the buffer mData is pointing to, in bytes.

public int
mIndex()

Textures: Specifies the index of the texture.

public AIString
mKey()

Specifies the name of the property (key).

public int
mSemantic()

Textures: Specifies their exact usage semantic.

public int
mType()

Type information for the property.

public static ByteBuffer
nmData(long struct)

Unsafe version of mData.

public static int
nmDataLength(long struct)

Unsafe version of mDataLength.

public static int
nmIndex(long struct)

Unsafe version of mIndex.

public static AIString
nmKey(long struct)

Unsafe version of mKey.

public static int
nmSemantic(long struct)

Unsafe version of mSemantic.

public static int
nmType(long struct)

Unsafe version of mType.

public int
sizeof()

Implements abstract org.lwjgl.system.Struct.sizeof.

Returns sizeof(struct).
Inherited from org.lwjgl.system.Struct:
__array__array__array__checkContainer__checkMalloc__create__getContainer__getContainer__member__member__member__padding__padding__struct__struct__union__unionclearfreeisNullvalidate

Field Detail

ALIGNOFback to summary
public static final int ALIGNOF

The struct alignment in bytes.

MDATAback to summary
public static final int MDATA

The struct member offsets.

MDATALENGTHback to summary
public static final int MDATALENGTH

The struct member offsets.

MINDEXback to summary
public static final int MINDEX

The struct member offsets.

MKEYback to summary
public static final int MKEY

The struct member offsets.

MSEMANTICback to summary
public static final int MSEMANTIC

The struct member offsets.

MTYPEback to summary
public static final int MTYPE

The struct member offsets.

SIZEOFback to summary
public static final int SIZEOF

The struct size in bytes.

Constructor Detail

AIMaterialPropertyback to summary
protected AIMaterialProperty(long address, ByteBuffer container)
AIMaterialPropertyback to summary
public AIMaterialProperty(ByteBuffer container)

Creates a 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.

Method Detail

createback to summary
protected AIMaterialProperty create(long address, ByteBuffer container)

Implements abstract org.lwjgl.system.Struct.create.

Doc from org.lwjgl.system.Struct.create.

Similar to the constructor, but returns the exact type of the Struct subclass.

Effectively, every Struct instance is a factory for more instances of the same type. This is used by StructBuffer.

Parameters
address:long

the struct memory address

container:ByteBuffer

an optional container buffer, to be referenced strongly by the struct instance.

Annotations
@Override
createback to summary
public static AIMaterialProperty create(long address)

Returns a new AIMaterialProperty instance for the specified memory address.

createback to summary
public static AIMaterialProperty.Buffer create(long address, int capacity)

Create a AIMaterialProperty.Buffer instance at the specified memory.

Parameters
address:long

the memory address

capacity:int

the buffer capacity

createSafeback to summary
public static AIMaterialProperty createSafe(long address)

Like create, but returns null if address is NULL.

Annotations
@Nullable
createSafeback to summary
public static AIMaterialProperty.Buffer createSafe(long address, int capacity)

Like create, but returns null if address is NULL.

Annotations
@Nullable
mDataback to summary
public ByteBuffer mData()

Binary buffer to hold the property's value. The size of the buffer is always mDataLength.

Annotations
@NativeType:char *
mDataLengthback to summary
public int mDataLength()

Size of the buffer mData is pointing to, in bytes. This value may not be 0.

Annotations
@NativeType:unsigned int
mIndexback to summary
public int mIndex()

Textures: Specifies the index of the texture. For non-texture properties, this member is always 0.

Annotations
@NativeType:unsigned int
mKeyback to summary
public AIString mKey()

Specifies the name of the property (key). Keys are generally case insensitive.

Annotations
@NativeType:struct aiString
mSemanticback to summary
public int mSemantic()

Textures: Specifies their exact usage semantic. For non-texture properties, this member is always 0 (or, better-said, TextureType_NONE).

Annotations
@NativeType:unsigned int
mTypeback to summary
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.)

Annotations
@NativeType:aiPropertyTypeInfo
nmDataback to summary
public static ByteBuffer nmData(long struct)

Unsafe version of mData.

nmDataLengthback to summary
public static int nmDataLength(long struct)

Unsafe version of mDataLength.

nmIndexback to summary
public static int nmIndex(long struct)

Unsafe version of mIndex.

nmKeyback to summary
public static AIString nmKey(long struct)

Unsafe version of mKey.

nmSemanticback to summary
public static int nmSemantic(long struct)

Unsafe version of mSemantic.

nmTypeback to summary
public static int nmType(long struct)

Unsafe version of mType.

sizeofback to summary
public int sizeof()

Implements abstract org.lwjgl.system.Struct.sizeof.

Doc from org.lwjgl.system.Struct.sizeof.

Returns sizeof(struct).

Annotations
@Override
org.lwjgl.assimp back to summary

public Class AIMaterialProperty.Buffer

extends StructBuffer<AIMaterialProperty, AIMaterialProperty.Buffer>
Class Inheritance

An array of AIMaterialProperty structs.

Field Summary

Modifier and TypeField and Description
private static final AIMaterialProperty

Constructor Summary

AccessConstructor and Description
public
Buffer(ByteBuffer container)

Creates a new AIMaterialProperty.Buffer instance backed by the specified container.

public
Buffer(long address, int cap)

pack-priv
Buffer(long address, ByteBuffer container, int mark, int pos, int lim, int cap)

Method Summary

Modifier and TypeMethod and Description
protected AIMaterialProperty
public ByteBuffer

Returns:

a ByteBuffer view of the data pointed to by the AIMaterialProperty#mData field.
mData
()

public int

Returns:

the value of the AIMaterialProperty#mDataLength field.
mDataLength
()

public int

Returns:

the value of the AIMaterialProperty#mIndex field.
mIndex
()

public AIString

Returns:

a AIString view of the AIMaterialProperty#mKey field.
mKey
()

public int

Returns:

the value of the AIMaterialProperty#mSemantic field.
mSemantic
()

public int

Returns:

the value of the AIMaterialProperty#mType field.
mType
()

protected AIMaterialProperty.Buffer
Inherited from org.lwjgl.system.StructBuffer:
applyapplyforEachgetgetgetgetiteratorparallelStreamputputsizeofspliteratorstream

Field Detail

ELEMENT_FACTORYback to summary
private static final AIMaterialProperty ELEMENT_FACTORY

Constructor Detail

Bufferback to summary
public Buffer(ByteBuffer container)

Creates a new AIMaterialProperty.Buffer instance backed by the specified container.

Changes to the container's content will be visible to the struct buffer instance and vice versa. The two buffers' position, limit, and mark values will be independent. The new buffer's position will be zero, its capacity and its limit will be the number of bytes remaining in this buffer divided by AIMaterialProperty#SIZEOF, and its mark will be undefined.

The created buffer instance holds a strong reference to the container object.

Bufferback to summary
public Buffer(long address, int cap)
Bufferback to summary
pack-priv Buffer(long address, ByteBuffer container, int mark, int pos, int lim, int cap)

Method Detail

getElementFactoryback to summary
protected AIMaterialProperty getElementFactory()

Implements abstract org.lwjgl.system.StructBuffer.getElementFactory.

Annotations
@Override
mDataback to summary
public ByteBuffer mData()
Returns:ByteBuffer

a ByteBuffer view of the data pointed to by the AIMaterialProperty#mData field.

Annotations
@NativeType:char *
mDataLengthback to summary
public int mDataLength()
Returns:int

the value of the AIMaterialProperty#mDataLength field.

Annotations
@NativeType:unsigned int
mIndexback to summary
public int mIndex()
Returns:int

the value of the AIMaterialProperty#mIndex field.

Annotations
@NativeType:unsigned int
mKeyback to summary
public AIString mKey()
Returns:AIString

a AIString view of the AIMaterialProperty#mKey field.

Annotations
@NativeType:struct aiString
mSemanticback to summary
public int mSemantic()
Returns:int

the value of the AIMaterialProperty#mSemantic field.

Annotations
@NativeType:unsigned int
mTypeback to summary
public int mType()
Returns:int

the value of the AIMaterialProperty#mType field.

Annotations
@NativeType:aiPropertyTypeInfo
selfback to summary
protected AIMaterialProperty.Buffer self()

Implements abstract org.lwjgl.system.CustomBuffer.self.

Annotations
@Override