Class ManagedTransformSource
java.lang.Object
com.ardor3d.extension.animation.skeletal.blendtree.ManagedTransformSource
- All Implemented Interfaces:
BlendTreeSource
This tree source maintains its own source data, which can be modified directly using setJointXXX. This source is
meant to be used for controlling a particular joint or set of joints programatically.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetSourceData
(AnimationManager manager) Returns an immutable COPY of our local source data.void
initJointsById
(AnimationClip clip, int... jointIndices) Setup transform data for specific joints on this source, using the first frame from a given clip.void
initJointsByName
(SkeletonPose pose, AnimationClip clip, String... jointNames) Setup transform data on this source, using the first frame from a specific clip and jointNames from a specific pose.boolean
isActive
(AnimationManager manager) Does nothing.void
resetClips
(AnimationManager manager, double globalStartTime) Does nothing.void
setJointRotation
(int jointIndex, ReadOnlyQuaternion rotation) Sets a rotation to the local transformdata for a given joint index.void
setJointScale
(int jointIndex, ReadOnlyVector3 scale) Sets a scale to the local transformdata for a given joint index.void
setJointTransformData
(int jointIndex, JointData jointData) Set the local source transform data for a given joint index.void
setJointTranslation
(int jointIndex, ReadOnlyVector3 translation) Sets a translation to the local transformdata for a given joint index.void
setSourceName
(String name) boolean
setTime
(double globalTime, AnimationManager manager) Does nothing.
-
Constructor Details
-
ManagedTransformSource
public ManagedTransformSource()
-
-
Method Details
-
setJointTransformData
Set the local source transform data for a given joint index.- Parameters:
jointIndex
- our joint index value.jointData
- the joint transform data. This object is copied into the local store.
-
setJointTranslation
Sets a translation to the local transformdata for a given joint index.- Parameters:
jointIndex
- our joint index value.translation
- the translation to set
-
setJointScale
Sets a scale to the local transformdata for a given joint index.- Parameters:
jointIndex
- our joint index value.scale
- the scale to set
-
setJointRotation
Sets a rotation to the local transformdata for a given joint index.- Parameters:
jointIndex
- our joint index value.rotation
- the rotation to set
-
getSourceData
Returns an immutable COPY of our local source data.- 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
Does nothing.- 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
Does nothing.- Specified by:
resetClips
in interfaceBlendTreeSource
- Parameters:
manager
- the manager to use in resetting the clips.globalStartTime
- the new start time to use.
-
isActive
Does nothing.- 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
-
initJointsByName
Setup transform data on this source, using the first frame from a specific clip and jointNames from a specific pose.- Parameters:
pose
- the pose to sample joints fromclip
- the animation clip to pull data fromjointNames
- the names of the joints to find indices of.
-
initJointsById
Setup transform data for specific joints on this source, using the first frame from a given clip.- Parameters:
clip
- the animation clip to pull data fromjointIndices
- the indices of the joints to initialize data for.
-
getSourceName
-
setSourceName
-