Class AnimationClip
java.lang.Object
com.ardor3d.extension.animation.skeletal.clip.AnimationClip
- All Implemented Interfaces:
Savable
AnimationClip manages a set of animation channels as a single clip entity.
-
Constructor Summary
ConstructorDescriptionAnimationClip
(String name) Construct a new animation clip with no channels.AnimationClip
(String name, List<AbstractAnimationChannel> channels) Construct a new animation clip, copying in a given list of channels. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addChannel
(AbstractAnimationChannel channel) Add a channel to this clip.findChannelByName
(String channelName) Locate a channel in this clip using its channel name.Class
<? extends AnimationClip> float
getName()
static AnimationClip
void
read
(InputCapsule capsule) boolean
removeChannel
(AbstractAnimationChannel channel) Remove a given channel from this clip.toString()
void
update
(double clockTime, AnimationClipInstance instance) Update an instance of this clip.void
write
(OutputCapsule capsule)
-
Constructor Details
-
AnimationClip
Construct a new animation clip with no channels.- Parameters:
name
- clip's name, should be unique
-
AnimationClip
Construct a new animation clip, copying in a given list of channels.- Parameters:
name
- clip's name, should be uniquechannels
- a list of channels to shallow copy locally.
-
-
Method Details
-
getName
- Returns:
- the referenceable name for this clip. In general, this should be unique.
-
update
Update an instance of this clip.- Parameters:
clockTime
- the current local clip time (where 0 == start of clip)instance
- the instance record to update.
-
addChannel
Add a channel to this clip.- Parameters:
channel
- the channel to add.
-
findChannelByName
Locate a channel in this clip using its channel name.- Parameters:
channelName
- the name to match against.- Returns:
- the first channel with a name matching the given channelName, or null if no matches are found.
-
removeChannel
Remove a given channel from this clip.- Parameters:
channel
- the channel to remove.- Returns:
- true if this clip had the given channel and it was removed.
-
getChannels
- Returns:
- an immutable copy of the channels in this clip.
-
getMaxTimeIndex
public float getMaxTimeIndex()- Returns:
- the maximum (local) time value of this clip, as described by the channels it manages.
-
toString
-
getClassTag
- Specified by:
getClassTag
in interfaceSavable
-
write
- Specified by:
write
in interfaceSavable
- Throws:
IOException
-
read
- Specified by:
read
in interfaceSavable
- Throws:
IOException
-
initSavable
-