|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.threerings.opengl.model.tools.ModelDef.SpatialDef
com.threerings.opengl.model.tools.ModelDef.TriMeshDef
public static class ModelDef.TriMeshDef
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. |
ModelDef.HashArrayList<ModelDef.Vertex> |
vertices
The vertices of the mesh. |
| Fields inherited from class com.threerings.opengl.model.tools.ModelDef.SpatialDef |
|---|
_transformMatrix, 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. |
protected boolean |
containsCollisionMesh()
Determines whether this node contains an explicit collision mesh. |
CollisionMesh |
createCollisionMesh()
Creates and returns a collision mesh object for this mesh. |
protected GeometryConfig |
createGeometry(Box bounds,
GeometryConfig.AttributeArrayConfig[] vertexAttribArrays,
ClientArrayConfig[] texCoordArrays,
ClientArrayConfig colorArray,
ClientArrayConfig normalArray,
ClientArrayConfig vertexArray)
Creates the geometry for this node. |
protected ShortBuffer |
createIndexBuffer()
Creates the index buffer for the mesh. |
ArticulatedConfig.Node |
createNode(ArticulatedConfig config,
boolean haveCollisionMesh)
Creates an articulation node. |
protected GeometryConfig.AttributeArrayConfig[] |
createVertexAttribArrays(ModelConfig.Imported config)
Creates the attribute arrays. |
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. |
protected String |
getDefaultTag()
Returns the default tag for this mesh type. |
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. |
protected void |
optimizeVertexOrder(boolean generateTangents)
Reorders the vertices to optimize for vertex cache utilization. |
protected void |
transformVertices(Matrix4f vtrans)
Transforms all of the mesh's vertices by the specified matrix. |
| Methods inherited from class com.threerings.opengl.model.tools.ModelDef.SpatialDef |
|---|
clearTransform, clearTransforms, createChildNodes, createMeshes, getTransformMatrix, mergeSkinMeshes, mergeSkinMeshes, removeBoneWeights, update |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public float[] offsetTranslation
public float[] offsetRotation
public float[] offsetScale
public String texture
public String tag
public ModelDef.HashArrayList<ModelDef.Vertex> vertices
public ArrayList<Integer> indices
public boolean colored
| Constructor Detail |
|---|
public ModelDef.TriMeshDef()
| Method Detail |
|---|
public void addVertex(ModelDef.Vertex vertex)
public ArticulatedConfig.Node createNode(ArticulatedConfig config,
boolean haveCollisionMesh)
ModelDef.SpatialDef
createNode in class ModelDef.SpatialDefpublic void mergeMeshes(HashMap<Object,ModelDef.TriMeshDef> meshes)
ModelDef.SpatialDef
mergeMeshes in class ModelDef.SpatialDefpublic void mergeMeshes(ModelDef.TriMeshDef mesh)
ModelDef.SpatialDef
mergeMeshes in class ModelDef.SpatialDefpublic Object getConfigurationKey()
public void merge(ModelDef.TriMeshDef omesh)
public ModelConfig.VisibleMesh createVisibleMesh(ModelConfig.Imported config)
public CollisionMesh createCollisionMesh()
protected GeometryConfig.AttributeArrayConfig[] createVertexAttribArrays(ModelConfig.Imported config)
protected String getDefaultTag()
protected GeometryConfig createGeometry(Box bounds,
GeometryConfig.AttributeArrayConfig[] vertexAttribArrays,
ClientArrayConfig[] texCoordArrays,
ClientArrayConfig colorArray,
ClientArrayConfig normalArray,
ClientArrayConfig vertexArray)
protected boolean containsCollisionMesh()
ModelDef.SpatialDef
containsCollisionMesh in class ModelDef.SpatialDefprotected void transformVertices(Matrix4f vtrans)
protected void optimizeVertexOrder(boolean generateTangents)
protected ShortBuffer createIndexBuffer()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||