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

java.lang.Object
  extended by com.threerings.opengl.model.tools.ModelDef.Vertex
Direct Known Subclasses:
ModelDef.SkinVertex
Enclosing class:
ModelDef

public static class ModelDef.Vertex
extends Object

A single vertex in a mesh.


Field Summary
 float[] color
           
 List<ModelDef.Extra> extras
          Extra data associated with the vertex.
 float[] location
          The parameters of the vertex.
 float[] normal
           
 float score
          When reordering vertices, the last computed score of the vertex.
 Vector3f tangent
          The tangent vector, if computed.
 float[] tcoords
           
 ArrayList<com.threerings.opengl.model.tools.ModelDef.Triangle> triangles
          When reordering vertices, the triangles containing the vertex.
 
Constructor Summary
ModelDef.Vertex()
           
 
Method Summary
 void addExtra(ModelDef.Extra extra)
          Called by the parser to add extra data to this vertex.
 boolean equals(Object obj)
           
 void generateTangent()
          Generates the tangent vector for this vertex (after its triangle list has been initialized).
 void get(FloatBuffer vbuf)
          Puts the contents of this vertex into the specified buffer.
 int hashCode()
           
 String toString()
           
 void transform(Matrix4f vtrans, Matrix4f ntrans)
          Transforms this vertex in-place by the given vertex and normal matrices.
 void updateScore(int cacheIdx)
          Updates this vertex's score based on its current position in the simulated cache and the number of remaining triangles that include it.
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

location

public float[] location
The parameters of the vertex.


normal

public float[] normal

tcoords

public float[] tcoords

color

public float[] color

extras

public List<ModelDef.Extra> extras
Extra data associated with the vertex.


triangles

public ArrayList<com.threerings.opengl.model.tools.ModelDef.Triangle> triangles
When reordering vertices, the triangles containing the vertex.


score

public float score
When reordering vertices, the last computed score of the vertex.


tangent

public Vector3f tangent
The tangent vector, if computed.

Constructor Detail

ModelDef.Vertex

public ModelDef.Vertex()
Method Detail

addExtra

public void addExtra(ModelDef.Extra extra)
Called by the parser to add extra data to this vertex.


transform

public void transform(Matrix4f vtrans,
                      Matrix4f ntrans)
Transforms this vertex in-place by the given vertex and normal matrices.


generateTangent

public void generateTangent()
Generates the tangent vector for this vertex (after its triangle list has been initialized).


get

public void get(FloatBuffer vbuf)
Puts the contents of this vertex into the specified buffer.


updateScore

public void updateScore(int cacheIdx)
Updates this vertex's score based on its current position in the simulated cache and the number of remaining triangles that include it.


hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2011. All Rights Reserved.