Class BaseAnimationController

  • Direct Known Subclasses:
    AnimationController

    public class BaseAnimationController
    extends java.lang.Object
    Base class for applying one or more Animations to a ModelInstance. This class only applies the actual Node transformations, it does not manage animations or keep track of animation states. See AnimationController for an implementation of this class which does manage animations.
    • Constructor Detail

      • BaseAnimationController

        public BaseAnimationController​(ModelInstance target)
        Construct a new BaseAnimationController.
        Parameters:
        target - The ModelInstance on which the animations are being performed.
    • Method Detail

      • begin

        protected void begin()
        Begin applying multiple animations to the instance, must followed by one or more calls to { apply(Animation, float, float) and finally {end().
      • apply

        protected void apply​(Animation animation,
                             float time,
                             float weight)
        Apply an animation, must be called between {begin() and {end().
        Parameters:
        weight - The blend weight of this animation relative to the previous applied animations.
      • end

        protected void end()
        End applying multiple animations to the instance and update it to reflect the changes.
      • applyAnimation

        protected void applyAnimation​(Animation animation,
                                      float time)
        Apply a single animation to the ModelInstance and update the it to reflect the changes.
      • applyAnimations

        protected void applyAnimations​(Animation anim1,
                                       float time1,
                                       Animation anim2,
                                       float time2,
                                       float weight)
        Apply two animations, blending the second onto to first using weight.
      • removeAnimation

        protected void removeAnimation​(Animation animation)
        Remove the specified animation, by marking the affected nodes as not animated. When switching animation, this should be call prior to applyAnimation(s).