Class InclusiveClipSource

java.lang.Object
com.ardor3d.extension.animation.skeletal.blendtree.ClipSource
com.ardor3d.extension.animation.skeletal.blendtree.InclusiveClipSource
All Implemented Interfaces:
BlendTreeSource

public class InclusiveClipSource extends ClipSource
Similar to a ClipSource, this class samples and returns values from the channels of an AnimationClip. InclusiveClipSource further filters this result set, excluding any channels whose names do not match those in our enabledChannels list.
  • Constructor Details

    • InclusiveClipSource

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

      public InclusiveClipSource(AnimationClip clip, AnimationManager manager)
      Construct a new source using the given clip and manager.
      Parameters:
      clip - our source clip.
      manager - the manager used to track clip state.
  • Method Details

    • clearEnabled

      public void clearEnabled()
      Clears all enabled channels/joints from this source.
    • addEnabledChannels

      public void addEnabledChannels(String... enabledChannels)
      Parameters:
      enabledChannels - a list of channel names to include when returning clip results.
    • addEnabledJoints

      public void addEnabledJoints(int... enabledJoints)
      Parameters:
      enabledJoints - a list of joint indices to include when returning clip results. These are converted to channel names and stored in our enabledChannels list.
    • getEnabledChannels

      public List<String> getEnabledChannels()
      Returns:
      a COPY of the enabled channel list.
    • getSourceData

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