Class JointChannel
java.lang.Object
com.ardor3d.extension.animation.skeletal.clip.AbstractAnimationChannel
com.ardor3d.extension.animation.skeletal.clip.TransformChannel
com.ardor3d.extension.animation.skeletal.clip.JointChannel
- All Implemented Interfaces:
Savable
Transform animation channel, specifically geared towards describing the motion of skeleton joints.
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
A name prepended to joint indices to identify them as joint channels.Fields inherited from class com.ardor3d.extension.animation.skeletal.clip.AbstractAnimationChannel
_channelName, _times
-
Constructor Summary
ModifierConstructorDescriptionprotected
JointChannel
(Joint joint, float[] times, ReadOnlyQuaternion[] rotations, ReadOnlyVector3[] translations, ReadOnlyVector3[] scales) Construct a new JointChannel.JointChannel
(Joint joint, float[] times, ReadOnlyTransform[] transforms) Construct a new JointChannel.JointChannel
(String jointName, int jointIndex, float[] times, ReadOnlyQuaternion[] rotations, ReadOnlyVector3[] translations, ReadOnlyVector3[] scales) Construct a new JointChannel. -
Method Summary
Modifier and TypeMethodDescriptioncreateStateDataObject
(AnimationClipInstance instance) Class
<? extends JointChannel> getJointData
(int index, JointData store) int
static JointChannel
protected JointChannel
newChannel
(String name, float[] times, ReadOnlyQuaternion[] rotations, ReadOnlyVector3[] translations, ReadOnlyVector3[] scales) void
read
(InputCapsule capsule) void
setCurrentSample
(int sampleIndex, double progressPercent, Object applyTo) Sets data on the given applyTo Object for the given sampleIndex and a percent progress towards the sample following it.void
write
(OutputCapsule capsule) Methods inherited from class com.ardor3d.extension.animation.skeletal.clip.TransformChannel
getRotations, getScales, getSubchannelBySample, getSubchannelByTime, getTransformData, getTranslations
Methods inherited from class com.ardor3d.extension.animation.skeletal.clip.AbstractAnimationChannel
getChannelName, getMaxTime, getSampleCount, getSubchannelBySample, getSubchannelByTime, getTimes, updateSample
-
Field Details
-
JOINT_CHANNEL_NAME
A name prepended to joint indices to identify them as joint channels.- See Also:
-
-
Constructor Details
-
JointChannel
public JointChannel(Joint joint, float[] times, ReadOnlyQuaternion[] rotations, ReadOnlyVector3[] translations, ReadOnlyVector3[] scales) Construct a new JointChannel.- Parameters:
joint
- the joint to pull name and index from.times
- our time offset values.rotations
- the rotations to set on this channel at each time offset.translations
- the translations to set on this channel at each time offset.scales
- the scales to set on this channel at each time offset.
-
JointChannel
public JointChannel(String jointName, int jointIndex, float[] times, ReadOnlyQuaternion[] rotations, ReadOnlyVector3[] translations, ReadOnlyVector3[] scales) Construct a new JointChannel.- Parameters:
jointName
- the human readable name of the jointjointIndex
- the index of the joint.times
- our time offset values.rotations
- the rotations to set on this channel at each time offset.translations
- the translations to set on this channel at each time offset.scales
- the scales to set on this channel at each time offset.
-
JointChannel
Construct a new JointChannel.- Parameters:
joint
- the index of the joint.times
- our time offset values.transforms
- the transform to set on this channel at each time offset.
-
JointChannel
protected JointChannel()
-
-
Method Details
-
getJointName
- Returns:
- the human readable version of the associated joint's name.
-
getJointIndex
public int getJointIndex()- Returns:
- the joint index this channel targets.
-
newChannel
protected JointChannel newChannel(String name, float[] times, ReadOnlyQuaternion[] rotations, ReadOnlyVector3[] translations, ReadOnlyVector3[] scales) - Overrides:
newChannel
in classTransformChannel
-
setCurrentSample
Description copied from class:AbstractAnimationChannel
Sets data on the given applyTo Object for the given sampleIndex and a percent progress towards the sample following it.- Overrides:
setCurrentSample
in classTransformChannel
- Parameters:
sampleIndex
- the sample to pull information from.progressPercent
- a value [0.0, 1.0] representing progress from sampleIndex to sampleIndex+1applyTo
- the data object to apply this channel's information to.
-
createStateDataObject
- Overrides:
createStateDataObject
in classTransformChannel
- Parameters:
instance
- the instance creating and storing the state data object.- Returns:
- an Object suitable for storing information for this type of animation channel.
-
getJointData
-
getClassTag
- Specified by:
getClassTag
in interfaceSavable
- Overrides:
getClassTag
in classTransformChannel
-
write
- Specified by:
write
in interfaceSavable
- Overrides:
write
in classTransformChannel
- Throws:
IOException
-
read
- Specified by:
read
in interfaceSavable
- Overrides:
read
in classTransformChannel
- Throws:
IOException
-
initSavable
-