com.md5importer.model.mesh.primitive
Class Weight

java.lang.Object
  extended by com.md5importer.model.mesh.primitive.Weight
All Implemented Interfaces:
com.jme.util.export.Savable, IWeight, java.io.Serializable

public class Weight
extends java.lang.Object
implements java.io.Serializable, IWeight

Weight defines the concrete implementation of a weight.

Weight should not be cloned directly. The cloning process of a Weight should be initiated by the cloning process of the parent IMesh.

This class is used internally by MD5Importer only.

See Also:
Serialized Form

Constructor Summary
Weight()
          Constructor of Weight.
Weight(int index, float value, com.jme.math.Vector3f position)
          Constructor of Weight.
 
Method Summary
 IWeight clone(IJoint[] clonedJoints)
          Clone this weight.
 java.lang.Class getClassTag()
           
 int getIndex()
          Retrieve the index value of this weight.
 IJoint getJoint()
          Retrieve the index of the Joint this Weight affects.
 com.jme.math.Vector3f getPosition()
          Retrieve the fixed position of this Weight.
 float getWeightValue()
          Retrieve the fixed weight value of this Weight.
 void read(com.jme.util.export.JMEImporter im)
           
 void setJoint(IJoint joint)
          Set the joint this weight affects.
 void write(com.jme.util.export.JMEExporter ex)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Weight

public Weight()
Constructor of Weight.


Weight

public Weight(int index,
              float value,
              com.jme.math.Vector3f position)
Constructor of Weight.

Parameters:
index - The Integer index value.
value - The fixed Float weight value.
position - The fixed Vector3f position vector.
Method Detail

setJoint

public void setJoint(IJoint joint)
Description copied from interface: IWeight
Set the joint this weight affects.

Specified by:
setJoint in interface IWeight
Parameters:
joint - The IJoint instance.

getWeightValue

public float getWeightValue()
Description copied from interface: IWeight
Retrieve the fixed weight value of this Weight.

Specified by:
getWeightValue in interface IWeight
Returns:
The float weight value.

getPosition

public com.jme.math.Vector3f getPosition()
Description copied from interface: IWeight
Retrieve the fixed position of this Weight.

Specified by:
getPosition in interface IWeight
Returns:
The Vector3f position of this Weight.

getJoint

public IJoint getJoint()
Description copied from interface: IWeight
Retrieve the index of the Joint this Weight affects.

Specified by:
getJoint in interface IWeight
Returns:
The index number of the Joint.

getIndex

public int getIndex()
Description copied from interface: IWeight
Retrieve the index value of this weight.

Specified by:
getIndex in interface IWeight
Returns:
The Integer index value.

getClassTag

public java.lang.Class getClassTag()
Specified by:
getClassTag in interface com.jme.util.export.Savable

write

public void write(com.jme.util.export.JMEExporter ex)
           throws java.io.IOException
Specified by:
write in interface com.jme.util.export.Savable
Throws:
java.io.IOException

read

public void read(com.jme.util.export.JMEImporter im)
          throws java.io.IOException
Specified by:
read in interface com.jme.util.export.Savable
Throws:
java.io.IOException

clone

public IWeight clone(IJoint[] clonedJoints)
Description copied from interface: IWeight
Clone this weight.

Specified by:
clone in interface IWeight
Parameters:
clonedJoints - The array of cloned IJoint.
Returns:
The cloned IWeight instance.