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
FieldsModifier and TypeFieldDescriptionstatic final StringA 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
ConstructorsModifierConstructorDescriptionprotectedJointChannel(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) intstatic JointChannelprotected JointChannelnewChannel(String name, float[] times, ReadOnlyQuaternion[] rotations, ReadOnlyVector3[] translations, ReadOnlyVector3[] scales) voidread(InputCapsule capsule) voidsetCurrentSample(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.voidwrite(OutputCapsule capsule) Methods inherited from class com.ardor3d.extension.animation.skeletal.clip.TransformChannel
getRotations, getScales, getSubchannelBySample, getSubchannelByTime, getTransformData, getTranslationsMethods 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:
newChannelin classTransformChannel
-
setCurrentSample
Description copied from class:AbstractAnimationChannelSets data on the given applyTo Object for the given sampleIndex and a percent progress towards the sample following it.- Overrides:
setCurrentSamplein 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:
createStateDataObjectin 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:
getClassTagin interfaceSavable- Overrides:
getClassTagin classTransformChannel
-
write
- Specified by:
writein interfaceSavable- Overrides:
writein classTransformChannel- Throws:
IOException
-
read
- Specified by:
readin interfaceSavable- Overrides:
readin classTransformChannel- Throws:
IOException
-
initSavable
-