Class BoneMapping

  • All Implemented Interfaces:
    com.jme3.export.Savable

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

      Constructors 
      Constructor Description
      BoneMapping()
      No-argument constructor for serialization purposes only.
      BoneMapping​(java.lang.String targetBone, java.lang.String sourceBone)
      Instantiate a mapping to the named bone in the target skeleton from the named bone in the source skeleton.
      BoneMapping​(java.lang.String targetBone, java.lang.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​(java.lang.String targetBone, java.lang.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

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getSourceName()
      Read the name of the bone in the source skeleton.
      java.lang.String getTargetName()
      Read the name of the bone in the target skeleton.
      com.jme3.math.Quaternion getTwist()
      Access the rotation to apply.
      void read​(com.jme3.export.JmeImporter im)
      De-serialize this mapping.
      void setSourceName​(java.lang.String sourceName)
      Alter the name of the bone in the source skeleton.
      void setTargetName​(java.lang.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 Detail

      • BoneMapping

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

        public BoneMapping​(java.lang.String targetBone,
                           java.lang.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​(java.lang.String targetBone,
                           java.lang.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​(java.lang.String targetBone,
                           java.lang.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 Detail

      • getSourceName

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

        public java.lang.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​(java.lang.String sourceName)
        Alter the name of the bone in the source skeleton.
        Parameters:
        sourceName - name of the source bone
      • setTargetName

        public void setTargetName​(java.lang.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 java.io.IOException
        De-serialize this mapping.
        Specified by:
        read in interface com.jme3.export.Savable
        Parameters:
        im - importer to use (not null)
        Throws:
        java.io.IOException - from importer
      • write

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