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

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

public static class ModelDef.SkinVertex
extends ModelDef.Vertex

A vertex with bone influences.


Field Summary
 HashMap<String,ModelDef.BoneWeight> boneWeights
          The bones influencing the vertex, mapped by name.
 
Fields inherited from class com.threerings.opengl.model.tools.ModelDef.Vertex
color, extras, location, normal, score, tangent, tcoords, triangles
 
Constructor Summary
ModelDef.SkinVertex()
           
 
Method Summary
 void addBoneWeight(ModelDef.BoneWeight weight)
          Called by the parser to add a bone weight to this vertex.
 boolean equals(Object obj)
           
 void get(FloatBuffer vbuf, String[] bones)
          Puts the contents of this vertex into the specified buffer.
 Set<String> getBones()
          Returns a set containing the names of the bones influencing this vertex.
 
Methods inherited from class com.threerings.opengl.model.tools.ModelDef.Vertex
addExtra, generateTangent, get, hashCode, toString, transform, updateScore
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

boneWeights

public HashMap<String,ModelDef.BoneWeight> boneWeights
The bones influencing the vertex, mapped by name.

Constructor Detail

ModelDef.SkinVertex

public ModelDef.SkinVertex()
Method Detail

addBoneWeight

public void addBoneWeight(ModelDef.BoneWeight weight)
Called by the parser to add a bone weight to this vertex.


getBones

public Set<String> getBones()
Returns a set containing the names of the bones influencing this vertex. If there are more than four, the extra influences will be removed and the weight will be redistributed.


get

public void get(FloatBuffer vbuf,
                String[] bones)
Puts the contents of this vertex into the specified buffer.

Parameters:
bones - the list of bones influencing the mesh.

equals

public boolean equals(Object obj)
Overrides:
equals in class ModelDef.Vertex


Copyright © 2011. All Rights Reserved.