Normally textures are contained in external files but some file formats embed them directly in the model file. There are two types of embedded textures:
The raw file bytes are given so the application must utilize an image decoder (e.g. DevIL) to get access to the actual color data.
Embedded textures are referenced from materials using strings like "*0", "*1", etc. as the texture paths (a single asterisk character followed by the
zero-based index of the texture in the AIScene::mTextures array).
struct aiTexture {
unsigned int mWidth;
unsigned int mHeight;
char achFormatHint[9];
struct aiTexel * pcData;
struct aiString mFilename;
}
| Modifier and Type | Class and Description |
|---|---|
| public static class | AITexture.
An array of |
| Modifier and Type | Field and Description |
|---|---|
| public static final int | ACHFORMATHINT
The struct member offsets. |
| public static final int | ALIGNOF
The struct alignment in bytes. |
| public static final int | MFILENAME
The struct member offsets. |
| public static final int | MHEIGHT
The struct member offsets. |
| public static final int | MWIDTH
The struct member offsets. |
| public static final int | PCDATA
The struct member offsets. |
| public static final int | SIZEOF
The struct size in bytes. |
| Access | Constructor and Description |
|---|---|
| protected | |
| public | AITexture(ByteBuffer container)
Creates a |
| Modifier and Type | Method and Description |
|---|---|
| public ByteBuffer | achFormatHint()
A hint from the loader to make it easier for applications to determine the type of embedded textures. |
| public String | achFormatHintString()
A hint from the loader to make it easier for applications to determine the type of embedded textures. |
| protected AITexture | create(long
the struct memory address address, ByteBuffer an optional container buffer, to be referenced strongly by the struct instance. container)Implements abstract org. the constructor, but returns the exact type of the Struct subclass.
|
| public static AITexture | |
| public static AITexture. | create(long
the memory address address, int the buffer capacity capacity)Create a |
| public static AITexture | |
| public static AITexture. | |
| public AIString | |
| public int | |
| public int | |
| public static ByteBuffer | |
| public static String | |
| public static AIString | |
| public static int | |
| public static int | |
| public static AITexel. | |
| public static ByteBuffer | |
| public AITexel. | |
| public ByteBuffer | |
| public int |
| ACHFORMATHINT | back to summary |
|---|---|
| public static final int ACHFORMATHINT The struct member offsets. | |
| ALIGNOF | back to summary |
|---|---|
| public static final int ALIGNOF The struct alignment in bytes. | |
| MFILENAME | back to summary |
|---|---|
| public static final int MFILENAME The struct member offsets. | |
| MHEIGHT | back to summary |
|---|---|
| public static final int MHEIGHT The struct member offsets. | |
| MWIDTH | back to summary |
|---|---|
| public static final int MWIDTH The struct member offsets. | |
| PCDATA | back to summary |
|---|---|
| public static final int PCDATA The struct member offsets. | |
| SIZEOF | back to summary |
|---|---|
| public static final int SIZEOF The struct size in bytes. | |
| AITexture | back to summary |
|---|---|
| protected AITexture(long address, ByteBuffer container) | |
| AITexture | back to summary |
|---|---|
| public AITexture(ByteBuffer container) Creates a The created instance holds a strong reference to the container object. | |
| achFormatHint | back to summary |
|---|---|
| public ByteBuffer achFormatHint() A hint from the loader to make it easier for applications to determine the type of embedded textures. If
If
| |
| achFormatHintString | back to summary |
|---|---|
| public String achFormatHintString() A hint from the loader to make it easier for applications to determine the type of embedded textures. If
If
| |
| create | back to summary |
|---|---|
| protected AITexture create(long address, ByteBuffer container) Implements abstract org. Doc from org. Similar to Effectively, every
| |
| create | back to summary |
|---|---|
| public static AITexture create(long address) Returns a new | |
| create | back to summary |
|---|---|
| public static AITexture. Create a
| |
| createSafe | back to summary |
|---|---|
| public static AITexture createSafe(long address) Like
| |
| createSafe | back to summary |
|---|---|
| public static AITexture. Like
| |
| mFilename | back to summary |
|---|---|
| public AIString mFilename() texture original filename. Used to get the texture reference.
| |
| mHeight | back to summary |
|---|---|
| public int mHeight() Height of the texture, in pixels. If this value is zero,
| |
| mWidth | back to summary |
|---|---|
| public int mWidth() Width of the texture, in pixels. If
| |
| nachFormatHint | back to summary |
|---|---|
| public static ByteBuffer nachFormatHint(long struct) Unsafe version of | |
| nachFormatHintString | back to summary |
|---|---|
| public static String nachFormatHintString(long struct) Unsafe version of | |
| nmFilename | back to summary |
|---|---|
| public static AIString nmFilename(long struct) Unsafe version of | |
| nmHeight | back to summary |
|---|---|
| public static int nmHeight(long struct) Unsafe version of | |
| nmWidth | back to summary |
|---|---|
| public static int nmWidth(long struct) Unsafe version of | |
| npcData | back to summary |
|---|---|
| public static AITexel. Unsafe version of | |
| npcDataCompressed | back to summary |
|---|---|
| public static ByteBuffer npcDataCompressed(long struct) Unsafe version of | |
| pcData | back to summary |
|---|---|
| public AITexel. Data of the texture. Points to an array of
| |
| pcDataCompressed | back to summary |
|---|---|
| public ByteBuffer pcDataCompressed() Returns a
| |
| sizeof | back to summary |
|---|---|
| public int sizeof() Implements abstract org. Doc from org. Returns
| |
AITexture structs.
| Modifier and Type | Field and Description |
|---|---|
| private static final AITexture |
| Access | Constructor and Description |
|---|---|
| public | Buffer(ByteBuffer container)
Creates a new |
| public | |
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| public ByteBuffer | |
| public String | Returns: the null-terminated string stored in theAITexture#achFormatHint field.
|
| protected AITexture | |
| public AIString | |
| public int | |
| public int | |
| public AITexel. | |
| public ByteBuffer | |
| protected AITexture. |
| ELEMENT_FACTORY | back to summary |
|---|---|
| private static final AITexture ELEMENT_FACTORY | |
| Buffer | back to summary |
|---|---|
| public Buffer(ByteBuffer container) Creates a new 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 The created buffer instance holds a strong reference to the container object. | |
| Buffer | back to summary |
|---|---|
| public Buffer(long address, int cap) | |
| Buffer | back to summary |
|---|---|
| pack-priv Buffer(long address, ByteBuffer container, int mark, int pos, int lim, int cap) | |
| achFormatHint | back to summary |
|---|---|
public ByteBuffer achFormatHint()
| |
| achFormatHintString | back to summary |
|---|---|
public String achFormatHintString()
| |
| getElementFactory | back to summary |
|---|---|
| protected AITexture getElementFactory() Implements abstract org.
| |
| mFilename | back to summary |
|---|---|
public AIString mFilename()
| |
| mHeight | back to summary |
|---|---|
public int mHeight()
| |
| mWidth | back to summary |
|---|---|
public int mWidth()
| |
| pcData | back to summary |
|---|---|
public AITexel.
| |
| pcDataCompressed | back to summary |
|---|---|
| public ByteBuffer pcDataCompressed() Returns a
| |
| self | back to summary |
|---|---|
| protected AITexture. Implements abstract org.
| |