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

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

public static class ModelDef.TriMeshDef
extends ModelDef.SpatialDef

Represents a triangle mesh.


Field Summary
 boolean colored
          Whether or not any of the vertices are non-white.
 ArrayList<Integer> indices
          The triangle indices.
 float[] offsetRotation
           
 float[] offsetScale
           
 float[] offsetTranslation
          The geometry offset transform.
 String tag
          The mesh's tag, if any.
 String texture
          The texture of the mesh, if any.
 com.threerings.opengl.model.tools.ModelDef.HashArrayList<ModelDef.Vertex> vertices
          The vertices of the mesh.
 
Fields inherited from class com.threerings.opengl.model.tools.ModelDef.SpatialDef
bone, childDefs, name, parent, parentDef, point, rotation, scale, translation
 
Constructor Summary
ModelDef.TriMeshDef()
           
 
Method Summary
 void addVertex(ModelDef.Vertex vertex)
          Called by the parser to add a vertex to this mesh.
 CollisionMesh createCollisionMesh()
          Creates and returns a collision mesh object for this mesh.
 ArticulatedConfig.Node createNode(ArticulatedConfig config, boolean haveCollisionMesh)
          Creates an articulation node.
 ModelConfig.VisibleMesh createVisibleMesh(ModelConfig.Imported config)
          Creates and returns a visible mesh config for this mesh.
 Object getConfigurationKey()
          Returns a key representing the configuration of this mesh that will be compared to others in order to determine which meshes can be merged.
 void merge(ModelDef.TriMeshDef omesh)
          Merges another mesh (assumed to have the same configuration, transform, etc.) into this one.
 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.
 
Methods inherited from class com.threerings.opengl.model.tools.ModelDef.SpatialDef
createChildNodes, createMeshes, getTransformMatrix, mergeSkinMeshes, mergeSkinMeshes, removeBoneWeights, update
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

offsetTranslation

public float[] offsetTranslation
The geometry offset transform.


offsetRotation

public float[] offsetRotation

offsetScale

public float[] offsetScale

texture

public String texture
The texture of the mesh, if any.


tag

public String tag
The mesh's tag, if any.


vertices

public com.threerings.opengl.model.tools.ModelDef.HashArrayList<ModelDef.Vertex> vertices
The vertices of the mesh.


indices

public ArrayList<Integer> indices
The triangle indices.


colored

public boolean colored
Whether or not any of the vertices are non-white.

Constructor Detail

ModelDef.TriMeshDef

public ModelDef.TriMeshDef()
Method Detail

addVertex

public void addVertex(ModelDef.Vertex vertex)
Called by the parser to add a vertex to this mesh.


createNode

public ArticulatedConfig.Node createNode(ArticulatedConfig config,
                                         boolean haveCollisionMesh)
Description copied from class: ModelDef.SpatialDef
Creates an articulation node.

Specified by:
createNode in class ModelDef.SpatialDef

mergeMeshes

public void mergeMeshes(HashMap<Object,ModelDef.TriMeshDef> meshes)
Description copied from class: ModelDef.SpatialDef
Merges meshes with the same properties under this node.

Overrides:
mergeMeshes in class ModelDef.SpatialDef

mergeMeshes

public void mergeMeshes(ModelDef.TriMeshDef mesh)
Description copied from class: ModelDef.SpatialDef
Merges all of the meshes under this node.

Overrides:
mergeMeshes in class ModelDef.SpatialDef

getConfigurationKey

public Object getConfigurationKey()
Returns a key representing the configuration of this mesh that will be compared to others in order to determine which meshes can be merged.


merge

public void merge(ModelDef.TriMeshDef omesh)
Merges another mesh (assumed to have the same configuration, transform, etc.) into this one.


createVisibleMesh

public ModelConfig.VisibleMesh createVisibleMesh(ModelConfig.Imported config)
Creates and returns a visible mesh config for this mesh.


createCollisionMesh

public CollisionMesh createCollisionMesh()
Creates and returns a collision mesh object for this mesh.



Copyright © 2011. All Rights Reserved.