|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.threerings.opengl.model.tools.ModelDef
public class ModelDef
An intermediate representation for models used to store data parsed from XML.
| Nested Class Summary | |
|---|---|
static class |
ModelDef.BoneWeight
The influence of a single bone on a vertex. |
static class |
ModelDef.Extra
An extra bit of data associated with a vertex. |
protected static class |
ModelDef.HashArrayList<E>
Accelerates ArrayList.indexOf(java.lang.Object), ArrayList.contains(java.lang.Object), and
ArrayList.remove(int) using an internal hash map (assumes that all elements of the list
are unique and non-null). |
static class |
ModelDef.NodeDef
Represents a node without geometry. |
static class |
ModelDef.SkinMeshDef
Represents a triangle mesh whose vertices are influenced by sets of bones. |
static class |
ModelDef.SkinVertex
A vertex with bone influences. |
static class |
ModelDef.SpatialDef
The abstract base class of the nodes stored in the model definition. |
protected static class |
ModelDef.Triangle
Represents a triangle for processing purposes. |
static class |
ModelDef.TriMeshDef
Represents a triangle mesh. |
static class |
ModelDef.Vertex
A single vertex in a mesh. |
| Field Summary | |
|---|---|
protected static int |
MAX_BONE_COUNT
The maximum number of bones that may influence a single mesh. |
HashMap<String,ModelDef.SpatialDef> |
spatials
The nodes in the model, mapped by name. |
| Constructor Summary | |
|---|---|
ModelDef()
|
|
| Method Summary | |
|---|---|
void |
addSpatial(ModelDef.SpatialDef spatial)
Called by the parser to add a node to this model. |
protected static Matrix4f |
createMatrix(float[] translation,
float[] rotation,
float[] scale)
Creates and returns a matrix containing the described transform. |
protected static Matrix4f |
createMatrix(float[] translation,
float[] rotation,
float[] scale,
float gscale)
Creates and returns a matrix containing the described transform. |
protected ModelDef.NodeDef |
createRootNode()
Resolves the node references and returns a root node containing the hierarchy. |
static Transform3D |
createTransform(float[] translation,
float[] rotation,
float[] scale,
float gscale)
Creates a Transform3D object from the supplied arrays. |
protected ArrayList<ModelDef.SpatialDef> |
resolveReferences()
Resolves the parent/child references and returns a list of the top-level children. |
void |
update(ArticulatedConfig config)
Updates the supplied configuration with the model data in this definition. |
void |
update(StaticConfig config)
Updates the supplied configuration with the model data in this definition. |
void |
update(StaticSetConfig config)
Updates the supplied configuration with the model data in this definition. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public HashMap<String,ModelDef.SpatialDef> spatials
protected static final int MAX_BONE_COUNT
| Constructor Detail |
|---|
public ModelDef()
| Method Detail |
|---|
public static Transform3D createTransform(float[] translation,
float[] rotation,
float[] scale,
float gscale)
Transform3D object from the supplied arrays.
public void addSpatial(ModelDef.SpatialDef spatial)
public void update(StaticConfig config)
public void update(StaticSetConfig config)
public void update(ArticulatedConfig config)
protected ModelDef.NodeDef createRootNode()
protected ArrayList<ModelDef.SpatialDef> resolveReferences()
protected static Matrix4f createMatrix(float[] translation,
float[] rotation,
float[] scale)
protected static Matrix4f createMatrix(float[] translation,
float[] rotation,
float[] scale,
float gscale)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||