libgdx API

com.badlogic.gdx.graphics.g3d.loaders.md5
Class MD5Mesh

java.lang.Object
  extended by com.badlogic.gdx.graphics.g3d.loaders.md5.MD5Mesh

public class MD5Mesh
extends java.lang.Object

Represents an MD5 (Doom 3) mesh, with or without normal data.

Author:
Mario Zechner , Nathan Sweet , Dave Clayton

Field Summary
 int floatsPerVertex
           
 int floatsPerWeight
           
 short[] indices
          idx 1, idx 2, idx 3
 int numTriangles
           
 int numVertices
           
 int numWeights
           
 java.lang.String shader
           
 float[] vertices
          s, t, start, count
 float[] weights
          joint, bias, pos.x, pos.y, pos.z
 
Constructor Summary
MD5Mesh()
           
 
Method Summary
 void calculateNormalsBind(MD5Joints bindPoseSkeleton, float[] verts)
           
static void calculateNormalsBind(MD5Joints skeleton, float[] weights, float[] vertices, short[] indices, float[] verts, int vstride, int wstride)
           
 void calculateVertices(MD5Joints skeleton, float[] verts, BoundingBox bbox)
           
static void calculateVertices(MD5Joints skeleton, float[] weights, float[] vertices, float[] verts, int vstride, int wstride, BoundingBox bbox)
           
 void calculateVerticesJni(MD5Joints skeleton, float[] verts)
           
 void calculateVerticesN(MD5Joints skeleton, float[] verts, BoundingBox bbox)
           
static void calculateVerticesN(MD5Joints skeleton, float[] weights, float[] vertices, float[] verts, int vstride, int wstride, BoundingBox bbox)
           
 float[] createVertexArray()
           
 float[] createVertexArray(int stride)
           
 short[] getIndices()
           
 void read(java.io.DataInputStream in)
           
 void write(java.io.DataOutputStream out)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

shader

public java.lang.String shader

numVertices

public int numVertices

numWeights

public int numWeights

numTriangles

public int numTriangles

vertices

public float[] vertices
s, t, start, count


weights

public float[] weights
joint, bias, pos.x, pos.y, pos.z


indices

public short[] indices
idx 1, idx 2, idx 3


floatsPerVertex

public int floatsPerVertex

floatsPerWeight

public int floatsPerWeight
Constructor Detail

MD5Mesh

public MD5Mesh()
Method Detail

createVertexArray

public float[] createVertexArray()

createVertexArray

public float[] createVertexArray(int stride)

getIndices

public short[] getIndices()

calculateVerticesN

public void calculateVerticesN(MD5Joints skeleton,
                               float[] verts,
                               BoundingBox bbox)

calculateVertices

public void calculateVertices(MD5Joints skeleton,
                              float[] verts,
                              BoundingBox bbox)

calculateVerticesN

public static void calculateVerticesN(MD5Joints skeleton,
                                      float[] weights,
                                      float[] vertices,
                                      float[] verts,
                                      int vstride,
                                      int wstride,
                                      BoundingBox bbox)

calculateVertices

public static void calculateVertices(MD5Joints skeleton,
                                     float[] weights,
                                     float[] vertices,
                                     float[] verts,
                                     int vstride,
                                     int wstride,
                                     BoundingBox bbox)

calculateVerticesJni

public void calculateVerticesJni(MD5Joints skeleton,
                                 float[] verts)

calculateNormalsBind

public void calculateNormalsBind(MD5Joints bindPoseSkeleton,
                                 float[] verts)

calculateNormalsBind

public static void calculateNormalsBind(MD5Joints skeleton,
                                        float[] weights,
                                        float[] vertices,
                                        short[] indices,
                                        float[] verts,
                                        int vstride,
                                        int wstride)

read

public void read(java.io.DataInputStream in)
          throws java.io.IOException
Throws:
java.io.IOException

write

public void write(java.io.DataOutputStream out)
           throws java.io.IOException
Throws:
java.io.IOException

libgdx API

Copyright 2010 Mario Zechner (contact@badlogicgames.com), Nathan Sweet (admin@esotericsoftware.com)