|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--md3.md3model.MD3Mesh
Represents data of an MD3 model mesh. This also includes the textures of the mesh.
If the containing MD3 model has bone animation frames, a version of the mesh for each of those animation key frames is provided.
Field Summary | |
java.lang.String |
id
|
int |
meshFrameNum
Number of animation frames of mesh, same as boneFrameNum in MD3Model. |
Vec3[][] |
meshFrames
2d array of size meshFrameNum * vertexNum that stores mesh frame triangle vertices. |
int |
meshSize
|
int[][][] |
meshVertexNormals
3d array of size meshFrameNum * vertexNum * 2 with spherical coordinates giving the direction of the vertex normal. |
java.lang.String |
name
|
float[][] |
textureCoord
U/V texture coordinates of vertices. |
int |
textureNum
|
MD3Texture[] |
textures
Array of textures of size textureNum. |
int |
textureStart
|
int |
texVecStart
|
int |
triangleNum
|
int[][] |
triangles
Indices into meshFrames array of the triangle vertices. |
int |
triangleStart
|
int |
vertexNum
|
int |
vertexStart
|
Constructor Summary | |
protected |
MD3Mesh()
Create empty new mesh object. |
protected |
MD3Mesh(java.io.DataInput din)
Create a mesh object with data coming from the specified input stream. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Field Detail |
public java.lang.String id
public java.lang.String name
public int meshFrameNum
Number of animation frames of mesh, same as boneFrameNum in MD3Model.
MD3Model
public int textureNum
public int vertexNum
public int triangleNum
public int triangleStart
public int textureStart
public int texVecStart
public int vertexStart
public int meshSize
public MD3Texture[] textures
Array of textures of size textureNum. In most cases, there's only 1 texture per mesh.
public int[][] triangles
Indices into meshFrames array of the triangle vertices. Size triangleNum * 3.
public float[][] textureCoord
U/V texture coordinates of vertices. Size vertexNum * 2.
public Vec3[][] meshFrames
2d array of size meshFrameNum * vertexNum that stores mesh frame triangle vertices.
public int[][][] meshVertexNormals
3d array of size meshFrameNum * vertexNum * 2 with spherical coordinates giving the direction of the vertex normal. They are both unsigned byte values. The first one is the inclination, and the second the rotation in the horizontal plane. Both actually run 0..255 for full rotation.
Constructor Detail |
protected MD3Mesh(java.io.DataInput din) throws java.io.IOException
Create a mesh object with data coming from the specified input stream.
protected MD3Mesh()
Create empty new mesh object.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |