Class BlendableAction

java.lang.Object
com.jme3.anim.tween.action.Action
com.jme3.anim.tween.action.BlendableAction
All Implemented Interfaces:
Tween, JmeCloneable, Cloneable
Direct Known Subclasses:
BlendAction, ClipAction

public abstract class BlendableAction extends Action
  • Field Details

    • collectTransformDelegate

      protected BlendableAction collectTransformDelegate
  • Constructor Details

    • BlendableAction

      public BlendableAction(Tween... tweens)
  • Method Details

    • setCollectTransformDelegate

      public void setCollectTransformDelegate(BlendableAction delegate)
    • interpolate

      public boolean interpolate(double t)
      Description copied from interface: Tween
      Sets the implementation specific interpolation to the specified 'tween' value as a value in the range from 0 to getLength(). If the value is greater or equal to getLength() then it is internally clamped and the method returns false. If 't' is still in the tween's range then this method returns true.
      Parameters:
      t - animation time (in de-scaled seconds)
      Returns:
      true if t>length(), otherwise false
    • getWeight

      public float getWeight()
    • setWeight

      public void setWeight(float weight)
    • doInterpolate

      protected abstract void doInterpolate(double t)
    • getTargets

      public abstract Collection<HasLocalTransform> getTargets()
    • collectTransform

      public abstract void collectTransform(HasLocalTransform target, Transform t, float weight, BlendableAction source)
    • getTransitionLength

      public double getTransitionLength()
    • setTransitionLength

      public void setTransitionLength(double transitionLength)
    • getTransitionWeight

      protected float getTransitionWeight()
    • setMaxTransitionWeight

      public void setMaxTransitionWeight(double maxTransitionWeight)
      Parameters:
      maxTransitionWeight - The max transition weight. Must be >=0 and <=1 (default=1)
      Throws:
      IllegalArgumentException - If maxTransitionWeight is not between 0 and 1.
    • getMaxTransitionWeight

      public double getMaxTransitionWeight()
      Returns:
      The max transition weight (default=1)
    • jmeClone

      public BlendableAction jmeClone()
      Create a shallow clone for the JME cloner.
      Specified by:
      jmeClone in interface JmeCloneable
      Overrides:
      jmeClone in class Action
      Returns:
      a new action (not null)
    • cloneFields

      public void cloneFields(Cloner cloner, Object original)
      Callback from Cloner to convert this shallow-cloned action into a deep-cloned one, using the specified cloner and original to resolve copied fields.
      Specified by:
      cloneFields in interface JmeCloneable
      Overrides:
      cloneFields in class Action
      Parameters:
      cloner - the cloner that's cloning this action (not null)
      original - the action from which this action was shallow-cloned (unused)