com.threerings.opengl.model.tools
Class ModelDef

java.lang.Object
  extended by com.threerings.opengl.model.tools.ModelDef

public class ModelDef
extends Object

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.
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.
static class ModelDef.TriMeshDef
          Represents a triangle mesh.
static class ModelDef.Vertex
          A single vertex in a mesh.
 
Field Summary
 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.
static Transform3D createTransform(float[] translation, float[] rotation, float[] scale, float gscale)
          Creates a Transform3D object from the supplied arrays.
 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
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

spatials

public HashMap<String,ModelDef.SpatialDef> spatials
The nodes in the model, mapped by name.

Constructor Detail

ModelDef

public ModelDef()
Method Detail

createTransform

public static Transform3D createTransform(float[] translation,
                                          float[] rotation,
                                          float[] scale,
                                          float gscale)
Creates a Transform3D object from the supplied arrays.


addSpatial

public void addSpatial(ModelDef.SpatialDef spatial)
Called by the parser to add a node to this model.


update

public void update(StaticConfig config)
Updates the supplied configuration with the model data in this definition.


update

public void update(StaticSetConfig config)
Updates the supplied configuration with the model data in this definition.


update

public void update(ArticulatedConfig config)
Updates the supplied configuration with the model data in this definition.



Copyright © 2011. All Rights Reserved.