Class ClipSource
java.lang.Object
com.ardor3d.extension.animation.skeletal.blendtree.ClipSource
- All Implemented Interfaces:
BlendTreeSource
- Direct Known Subclasses:
ExclusiveClipSource
,InclusiveClipSource
A blend tree leaf node that samples and returns values from the channels of an AnimationClip.
-
Field Summary
-
Constructor Summary
ConstructorDescriptionConstruct a new ClipSource.ClipSource
(AnimationClip clip, AnimationManager manager) Construct a new ClipSource using the given data. -
Method Summary
Modifier and TypeMethodDescriptiongetClip()
getSourceData
(AnimationManager manager) boolean
isActive
(AnimationManager manager) Check if there are still active clips in the tree.void
resetClips
(AnimationManager manager, double globalStartTime) Reset any clips in this tree.void
setClip
(AnimationClip clip) boolean
setTime
(double globalTime, AnimationManager manager) Sets the current time on our AnimationClip instance, accounting for looping and time scaling.
-
Field Details
-
_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
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
-
setClip
-
getSourceData
- Specified by:
getSourceData
in interfaceBlendTreeSource
- Parameters:
manager
- the manager this is being called from.- Returns:
- a map of source information from the blend tree node.
-
setTime
Sets the current time on our AnimationClip instance, accounting for looping and time scaling.- Specified by:
setTime
in interfaceBlendTreeSource
- 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
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 interfaceBlendTreeSource
- Parameters:
manager
- the manager to use in resetting the clips.globalStartTime
- the new start time to use.
-
isActive
Description copied from interface:BlendTreeSource
Check if there are still active clips in the tree.- Specified by:
isActive
in interfaceBlendTreeSource
- Parameters:
manager
- the manager this is being called from.- Returns:
- true if we found at least one active clip in the tree
-