com.badlogic.gdx.graphics.g3d.loaders.md5
Class MD5Renderer
java.lang.Object
com.badlogic.gdx.graphics.g3d.loaders.md5.MD5Renderer
- All Implemented Interfaces:
- Disposable
public class MD5Renderer
- extends java.lang.Object
- implements Disposable
The MD5Renderer draws the current frame of an animated MD5 model. It also calculates the bounding box using the resulting
interpolated vertex data.
- Author:
- Mario Zechner , Nathan Sweet , Dave Clayton
Constructor Summary |
MD5Renderer(MD5Model model,
boolean useNormals,
boolean useJni)
Constructs an MD5Renderer. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MD5Renderer
public MD5Renderer(MD5Model model,
boolean useNormals,
boolean useJni)
- Constructs an MD5Renderer. Normals are required for dynamic lighting. Note that there is currently no JNI implementation
supporting normal animation, so if you require normals you must use the Java implementation. On >=2.2 phones JNI is not much
faster anyway.
- Parameters:
model
- The MD5 model this renderer will draw.useNormals
- Whether to interpolate the model's normals as well as its vertices.useJni
- Whether to use the JNI implementation or not.
getBBox
public BoundingBox getBBox()
getVertices
public float[] getVertices(int idx)
getIndices
public short[] getIndices(int idx)
getMesh
public Mesh getMesh()
setSkeleton
public void setSkeleton(MD5Joints skeleton)
setUseJni
public void setUseJni(boolean useJni)
calculateNormals
public void calculateNormals(MD5Joints bindPoseSkeleton)
render
public void render()
render
public void render(Material[] materials)
dispose
public void dispose()
- Description copied from interface:
Disposable
- Releases all resources of this object.
- Specified by:
dispose
in interface Disposable
isJniUsed
public boolean isJniUsed()
Copyright 2010 Mario Zechner (contact@badlogicgames.com), Nathan Sweet (admin@esotericsoftware.com)