|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--md3.md3model.MD3Texture
Objets of this class represent textures with associated metadata. The texture data is stored in the OpenGL compatible RGBA format.
Field Summary | |
byte[] |
data
Actual texture bitmap data. |
int |
height
|
java.lang.String |
loadFilename
Filename of actual file from which data was loaded. |
java.lang.String |
name
Name as specified in the originating .md3 model or .skin file. |
int |
width
|
Constructor Summary | |
protected |
MD3Texture()
Create a new uninitialized MD3Texture object. |
protected |
MD3Texture(java.lang.String name,
java.lang.String loadFilename)
Constructor for use in subclasses that loads texture data from the specified file and initializes a new MD3Texture object with the read data/metadata. |
protected |
MD3Texture(java.lang.String name,
java.lang.String loadFilename,
java.io.InputStream in)
Constructor for use in subclasses that loads texture data from the sepcified input stream and initializes a new MD3Texture object with the read data/metadata. |
Method Summary | |
protected void |
getTextureData(java.io.InputStream in)
Load the texture data from the given input stream and put it in the data array. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Field Detail |
public java.lang.String name
Name as specified in the originating .md3 model or .skin file.
public java.lang.String loadFilename
Filename of actual file from which data was loaded.
public byte[] data
Actual texture bitmap data. These are unsigned bytes in RGBA order.
public int width
public int height
Constructor Detail |
protected MD3Texture(java.lang.String name, java.lang.String loadFilename) throws java.io.IOException
Constructor for use in subclasses that loads texture data from the specified file and initializes a new MD3Texture object with the read data/metadata.
name
- Name of the texture as specified in .md3 or .skin file.loadFilename
- Full name of file from which texture data will be loaded.protected MD3Texture(java.lang.String name, java.lang.String loadFilename, java.io.InputStream in) throws java.io.IOException
Constructor for use in subclasses that loads texture data from the sepcified input stream and initializes a new MD3Texture object with the read data/metadata. The given loadFilename is stored in the corresponding data member.
name
- Name of the texture as specified in .md3 or .skin file.loadFilename
- Full name of file from which texture data is (supposedly) loaded.in
- Stream from to load texture data from.protected MD3Texture()
Create a new uninitialized MD3Texture object.
Method Detail |
protected void getTextureData(java.io.InputStream in) throws java.io.IOException
Load the texture data from the given input stream and put it in the data array.
TGA or JPG input is selected depending on the loadFilename, so make sure it is set before calling this method!
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |