com.threerings.opengl.model.tools
Class ModelDef.SpatialDef

java.lang.Object
  extended by com.threerings.opengl.model.tools.ModelDef.SpatialDef
Direct Known Subclasses:
ModelDef.NodeDef, ModelDef.TriMeshDef
Enclosing class:
ModelDef

public abstract static class ModelDef.SpatialDef
extends Object

The abstract base class of the nodes stored in the model definition.


Field Summary
 boolean bone
          Whether or not this node is used as a bone.
 ArrayList<ModelDef.SpatialDef> childDefs
          The definitions of the node's children.
 String name
          The node's name.
 String parent
          The name of the node's parent.
 ModelDef.SpatialDef parentDef
          The definition of the node's parent.
 boolean point
          Whether or not this node is used as an attachment point.
 float[] rotation
           
 float[] scale
           
 float[] translation
          The node's transformation.
 
Constructor Summary
ModelDef.SpatialDef()
           
 
Method Summary
 ArticulatedConfig.Node[] createChildNodes(ArticulatedConfig config, boolean haveCollisionMesh)
          Creates nodes for the children of this one.
 ModelConfig.MeshSet createMeshes(ModelConfig.Imported config)
          Creates a set of meshes for this node.
abstract  ArticulatedConfig.Node createNode(ArticulatedConfig config, boolean haveCollisionMesh)
          Creates an articulation node.
 Matrix4f getTransformMatrix()
          Returns the transform matrix (which includes the parent matrix).
 void mergeMeshes(HashMap<Object,ModelDef.TriMeshDef> meshes)
          Merges meshes with the same properties under this node.
 void mergeMeshes(ModelDef.TriMeshDef mesh)
          Merges all of the meshes under this node.
 void mergeSkinMeshes(HashMap<Object,ModelDef.SkinMeshDef> meshes, HashSet<String> bones)
          Finds the names of all nodes referenced as bones, merges skin meshes with the same properties.
 void mergeSkinMeshes(ModelDef.TriMeshDef mesh)
          Merges all of the skin meshes under this node.
 void removeBoneWeights(String bone)
          Removes influences from the named bone.
 void update(ArticulatedConfig config)
          Updates the supplied configuration with the contents of this node.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

name

public String name
The node's name.


parent

public String parent
The name of the node's parent.


translation

public float[] translation
The node's transformation.


rotation

public float[] rotation

scale

public float[] scale

parentDef

public ModelDef.SpatialDef parentDef
The definition of the node's parent.


childDefs

public ArrayList<ModelDef.SpatialDef> childDefs
The definitions of the node's children.


bone

public boolean bone
Whether or not this node is used as a bone.


point

public boolean point
Whether or not this node is used as an attachment point.

Constructor Detail

ModelDef.SpatialDef

public ModelDef.SpatialDef()
Method Detail

createMeshes

public ModelConfig.MeshSet createMeshes(ModelConfig.Imported config)
Creates a set of meshes for this node.


update

public void update(ArticulatedConfig config)
Updates the supplied configuration with the contents of this node.


mergeSkinMeshes

public void mergeSkinMeshes(HashMap<Object,ModelDef.SkinMeshDef> meshes,
                            HashSet<String> bones)
Finds the names of all nodes referenced as bones, merges skin meshes with the same properties.


removeBoneWeights

public void removeBoneWeights(String bone)
Removes influences from the named bone.


mergeSkinMeshes

public void mergeSkinMeshes(ModelDef.TriMeshDef mesh)
Merges all of the skin meshes under this node.


createNode

public abstract ArticulatedConfig.Node createNode(ArticulatedConfig config,
                                                  boolean haveCollisionMesh)
Creates an articulation node.


createChildNodes

public ArticulatedConfig.Node[] createChildNodes(ArticulatedConfig config,
                                                 boolean haveCollisionMesh)
Creates nodes for the children of this one.


mergeMeshes

public void mergeMeshes(HashMap<Object,ModelDef.TriMeshDef> meshes)
Merges meshes with the same properties under this node.


mergeMeshes

public void mergeMeshes(ModelDef.TriMeshDef mesh)
Merges all of the meshes under this node.


getTransformMatrix

public Matrix4f getTransformMatrix()
Returns the transform matrix (which includes the parent matrix).



Copyright © 2011. All Rights Reserved.