Class TransformData

java.lang.Object
com.ardor3d.extension.animation.skeletal.clip.TransformData
All Implemented Interfaces:
Savable
Direct Known Subclasses:
JointData

public class TransformData extends Object implements Savable
Describes a relative transform as a Quaternion-Vector-Vector tuple. We use QVV to make it simpler to do LERP blending.
  • Constructor Details

    • TransformData

      public TransformData()
      Construct a new, identity transform data object.
    • TransformData

      public TransformData(TransformData source)
      Construct a new transform data object, copying the value of the given source.
      Parameters:
      source - our source to copy.
      Throws:
      NullPointerException - if source is null.
  • Method Details

    • set

      public void set(TransformData source)
      Copy the source's values into this transform data object.
      Parameters:
      source - our source to copy.
      Throws:
      NullPointerException - if source is null.
    • getRotation

      public Quaternion getRotation()
    • setRotation

      public void setRotation(ReadOnlyQuaternion rotation)
    • setRotation

      public void setRotation(double x, double y, double z, double w)
    • getScale

      public Vector3 getScale()
    • setScale

      public void setScale(ReadOnlyVector3 scale)
    • setScale

      public void setScale(double x, double y, double z)
    • getTranslation

      public Vector3 getTranslation()
    • setTranslation

      public void setTranslation(ReadOnlyVector3 translation)
    • setTranslation

      public void setTranslation(double x, double y, double z)
    • applyTo

      public void applyTo(Transform transform)
    • applyTo

      public void applyTo(Spatial spat)
    • blend

      public TransformData blend(TransformData blendTo, double blendWeight, TransformData store)
      Blend this transform with the given transform.
      Parameters:
      blendTo - The transform to blend to
      blendWeight - The blend weight
      store - The transform store.
      Returns:
      The blended transform.
    • getClassTag

      public Class<? extends TransformData> getClassTag()
      Specified by:
      getClassTag in interface Savable
    • write

      public void write(OutputCapsule capsule) throws IOException
      Specified by:
      write in interface Savable
      Throws:
      IOException
    • read

      public void read(InputCapsule capsule) throws IOException
      Specified by:
      read in interface Savable
      Throws:
      IOException