jarp
Class MeshVertex

java.lang.Object
  extended by jarp.MeshVertex

public class MeshVertex
extends java.lang.Object

A vertex on one of the meshes of the avatar.


Constructor Summary
MeshVertex()
           
MeshVertex(JAInputStream jins, int ix, boolean mtgthasnorm)
          Constructs this MeshVertex from the given stream.
 
Method Summary
 void fixBoneReferences(Skeleton skeleton)
          Defines the influencing-bones array for this vertex.
 int[] getAdjacentVertices()
          Returns the array of indices of mesh-points adjacent to this one.
 Vector3f getBaseNormal(int b)
          Returns the base-normal vector for this mesh-point.
 Bone getBone(int b)
          Returns the specified influencing bone for this mesh-point.
 float getBoneEndDistance(int b)
          Returns the distance from this point to its (main) bone-end.
 int getIndex()
          Returns this point's index, w.r.t.
 int getNumBones()
          Returns the number of bones influencing this point.
 Vector3f getOffset(int b)
          Returns the specified offset vector for this mesh-point.
 float getWeight(int b)
          Returns the specified weight component for this mesh-point.
 void save(JAOutputStream jouts)
          Writes this MeshVertex to the given stream.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MeshVertex

public MeshVertex()

MeshVertex

public MeshVertex(JAInputStream jins,
                  int ix,
                  boolean mtgthasnorm)
           throws java.io.IOException
Constructs this MeshVertex from the given stream.

Throws:
java.io.IOException
Method Detail

getBoneEndDistance

public float getBoneEndDistance(int b)
Returns the distance from this point to its (main) bone-end.


getIndex

public int getIndex()
Returns this point's index, w.r.t. its mesh's points array.


getNumBones

public int getNumBones()
Returns the number of bones influencing this point.


getBone

public Bone getBone(int b)
Returns the specified influencing bone for this mesh-point.


getWeight

public float getWeight(int b)
Returns the specified weight component for this mesh-point.


getOffset

public Vector3f getOffset(int b)
Returns the specified offset vector for this mesh-point.


getBaseNormal

public Vector3f getBaseNormal(int b)
Returns the base-normal vector for this mesh-point.


getAdjacentVertices

public int[] getAdjacentVertices()
Returns the array of indices of mesh-points adjacent to this one.


fixBoneReferences

public void fixBoneReferences(Skeleton skeleton)
Defines the influencing-bones array for this vertex. This cannot be done at load/construct time, because we do not yet have the skeleton -- needed to give us a mapping from (4-cc) bone-ids to the bones themselves.


save

public void save(JAOutputStream jouts)
          throws java.io.IOException
Writes this MeshVertex to the given stream.

Throws:
java.io.IOException