Class BoneMapping

java.lang.Object
com.jme3.scene.plugins.bvh.BoneMapping
All Implemented Interfaces:
com.jme3.export.Savable

public class BoneMapping extends Object implements com.jme3.export.Savable
A mapping to convert a bone transform from one skeleton to another.
  • Constructor Summary

    Constructors
    Constructor
    Description
    No-argument constructor for serialization purposes only.
    BoneMapping(String targetBone, String sourceBone)
    Instantiate a mapping to the named bone in the target skeleton from the named bone in the source skeleton.
    BoneMapping(String targetBone, String sourceBone, float twistAngle, com.jme3.math.Vector3f twistAxis)
    Instantiate a mapping to the named bone in the target skeleton from the named bone in the source skeleton.
    BoneMapping(String targetBone, String sourceBone, com.jme3.math.Quaternion twist)
    Instantiate a mapping to the named bone in the target skeleton from the named bone in the source skeleton.
  • Method Summary

    Modifier and Type
    Method
    Description
    Read the name of the bone in the source skeleton.
    Read the name of the bone in the target skeleton.
    com.jme3.math.Quaternion
    Access the rotation to apply.
    void
    read(com.jme3.export.JmeImporter im)
    De-serialize this mapping.
    void
    setSourceName(String sourceName)
    Alter the name of the bone in the source skeleton.
    void
    setTargetName(String targetName)
    Alter the name of the bone in the target skeleton.
    void
    setTwist(com.jme3.math.Quaternion twist)
    Alter the rotation to apply.
    void
    write(com.jme3.export.JmeExporter ex)
    Serialize this mapping.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • BoneMapping

      public BoneMapping()
      No-argument constructor for serialization purposes only. Do not invoke directly!
    • BoneMapping

      public BoneMapping(String targetBone, String sourceBone)
      Instantiate a mapping to the named bone in the target skeleton from the named bone in the source skeleton.
      Parameters:
      targetBone - the name of the bone in the target skeleton.
      sourceBone - the name of the bone in the source skeleton.
    • BoneMapping

      public BoneMapping(String targetBone, String sourceBone, com.jme3.math.Quaternion twist)
      Instantiate a mapping to the named bone in the target skeleton from the named bone in the source skeleton. Apply the specified twist to the animation data.
      Parameters:
      targetBone - the name of the bone in the target skeleton.
      sourceBone - the name of the bone in the source skeleton.
      twist - the twist rotation to apply to the animation data
    • BoneMapping

      public BoneMapping(String targetBone, String sourceBone, float twistAngle, com.jme3.math.Vector3f twistAxis)
      Instantiate a mapping to the named bone in the target skeleton from the named bone in the source skeleton. Apply the given twist to the animation data.
      Parameters:
      targetBone - the name of the bone in the target skeleton.
      sourceBone - the name of the bone in the source skeleton.
      twistAngle - the twist rotation angle to apply to the animation data
      twistAxis - the twist rotation axis to apply to the animation data
  • Method Details

    • getSourceName

      public String getSourceName()
      Read the name of the bone in the source skeleton.
      Returns:
      the name
    • getTargetName

      public String getTargetName()
      Read the name of the bone in the target skeleton.
      Returns:
      the name
    • getTwist

      public com.jme3.math.Quaternion getTwist()
      Access the rotation to apply.
      Returns:
      the pre-existing instance
    • setSourceName

      public void setSourceName(String sourceName)
      Alter the name of the bone in the source skeleton.
      Parameters:
      sourceName - name of the source bone
    • setTargetName

      public void setTargetName(String targetName)
      Alter the name of the bone in the target skeleton.
      Parameters:
      targetName - name of the target bone
    • setTwist

      public void setTwist(com.jme3.math.Quaternion twist)
      Alter the rotation to apply.
      Parameters:
      twist - (alias created)
    • read

      public void read(com.jme3.export.JmeImporter im) throws IOException
      De-serialize this mapping.
      Specified by:
      read in interface com.jme3.export.Savable
      Parameters:
      im - importer to use (not null)
      Throws:
      IOException - from importer
    • write

      public void write(com.jme3.export.JmeExporter ex) throws IOException
      Serialize this mapping.
      Specified by:
      write in interface com.jme3.export.Savable
      Parameters:
      ex - exporter to use (not null)
      Throws:
      IOException - from exporter