java.lang.Object
com.ardor3d.extension.animation.skeletal.blendtree.ClipSource
All Implemented Interfaces:
BlendTreeSource
Direct Known Subclasses:
ExclusiveClipSource, InclusiveClipSource

public class ClipSource extends Object implements BlendTreeSource
A blend tree leaf node that samples and returns values from the channels of an AnimationClip.
  • Field Details

    • _clip

      protected AnimationClip _clip
      Our clip to sample from. This may be shared with other clip sources, etc.
  • Constructor Details

    • ClipSource

      public ClipSource()
      Construct a new ClipSource. Clip and Manager must be set separately before use.
    • ClipSource

      public ClipSource(AnimationClip clip, AnimationManager manager)
      Construct a new ClipSource using the given data.
      Parameters:
      clip - the clip to use.
      manager - the manager to track clip state with.
  • Method Details

    • getClip

      public AnimationClip getClip()
    • setClip

      public void setClip(AnimationClip clip)
    • getSourceData

      public Map<String,? extends Object> getSourceData(AnimationManager manager)
      Specified by:
      getSourceData in interface BlendTreeSource
      Parameters:
      manager - the manager this is being called from.
      Returns:
      a map of source information from the blend tree node.
    • setTime

      public boolean setTime(double globalTime, AnimationManager manager)
      Sets the current time on our AnimationClip instance, accounting for looping and time scaling.
      Specified by:
      setTime in interface BlendTreeSource
      Parameters:
      globalTime - our new "global" timeline time.
      manager - the manager this is being called from.
      Returns:
      true if we found at least one active clip in the tree
    • resetClips

      public void resetClips(AnimationManager manager, double globalStartTime)
      Description copied from interface: BlendTreeSource
      Reset any clips in this tree. This sets the start time to the given time and sets it active.
      Specified by:
      resetClips in interface BlendTreeSource
      Parameters:
      manager - the manager to use in resetting the clips.
      globalStartTime - the new start time to use.
    • isActive

      public boolean isActive(AnimationManager manager)
      Description copied from interface: BlendTreeSource
      Check if there are still active clips in the tree.
      Specified by:
      isActive in interface BlendTreeSource
      Parameters:
      manager - the manager this is being called from.
      Returns:
      true if we found at least one active clip in the tree