Class SteadyState
java.lang.Object
com.ardor3d.extension.animation.skeletal.state.AbstractFiniteState
com.ardor3d.extension.animation.skeletal.state.SteadyState
A "steady" state is an animation state that is concrete and stand-alone (vs. a state that handles transitioning
between two states, for example.)
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addTransition
(String keyword, AbstractTransitionState state) Add a new possible transition to this state.doTransition
(String key, AnimationLayer layer) Request that this state transition to another.getCurrentSourceData
(AnimationManager manager) getName()
getTransition
(String keyword) void
postUpdate
(AnimationLayer layer) Post update.boolean
removeTransition
(AbstractTransitionState transition) Remove the first instance of a specific transition state from this steady state.removeTransition
(String keyword) Remove a transition state by keyword.void
resetClips
(AnimationManager manager, double globalStartTime) Reset the clip instances held by this state's blend tree (or other leaf nodes in our blend tree) to given start time.void
setEndTransition
(AbstractTransitionState endTransition) void
setSourceTree
(BlendTreeSource tree) void
update
(double globalTime, AnimationLayer layer) Update this state using the current global time.Methods inherited from class com.ardor3d.extension.animation.skeletal.state.AbstractFiniteState
getGlobalStartTime, getLastStateOwner, resetClips, setLastStateOwner
-
Constructor Details
-
SteadyState
Create a new steady state.- Parameters:
name
- the name of our new state. Immutable.
-
-
Method Details
-
getName
- Returns:
- the name of this state.
-
getEndTransition
- Returns:
- the transition to use if we reach the end of this state. May be null.
-
setEndTransition
- Parameters:
endTransition
- a transition to use if we reach the end of this state. May be null.
-
getSourceTree
- Returns:
- the root of our blend tree
-
setSourceTree
- Parameters:
tree
- the new root of our blend tree
-
addTransition
Add a new possible transition to this state.- Parameters:
keyword
- the reference key for the added transition.state
- the transition state to add.- Throws:
IllegalArgumentException
- if keyword or state are null.
-
getTransition
- Parameters:
keyword
- the reference key for the transition state we wish to pull from this steady state.- Returns:
- the transition related to the given keyword, or null if none are found.
- Throws:
IllegalArgumentException
- if keyword is null.
-
getTransitionKeywords
- Returns:
- a Set of the transition state keywords used by this steady state.
-
removeTransition
Remove a transition state by keyword.- Parameters:
keyword
- the reference key for the transition state we wish to remove from this steady state.- Returns:
- the removed transition, or null if none was found by the given keyword.
- Throws:
IllegalArgumentException
- if keyword is null.
-
removeTransition
Remove the first instance of a specific transition state from this steady state.- Parameters:
transition
- the transition state we wish to remove from this steady state.- Returns:
- true if we found and removed the given transition.
- Throws:
IllegalArgumentException
- if transition is null.
-
doTransition
Request that this state transition to another.- Parameters:
key
- a key to match against a map of possible transitions.layer
- the layer our state belongs to.- Returns:
- the new state to transition to. May be null if the transition was not possible or was ignored for some reason.
-
update
Description copied from class:AbstractFiniteState
Update this state using the current global time.- Specified by:
update
in classAbstractFiniteState
- Parameters:
globalTime
- the current global time.layer
- the layer this state belongs to.
-
postUpdate
Description copied from class:AbstractFiniteState
Post update. If the state has no more clips and no end transition, this will clear this state from the layer.- Specified by:
postUpdate
in classAbstractFiniteState
- Parameters:
layer
- the layer this state belongs to.
-
getCurrentSourceData
- Specified by:
getCurrentSourceData
in classAbstractFiniteState
- Parameters:
manager
- animation manager- Returns:
- the current map of source channel data for this layer.
-
resetClips
Description copied from class:AbstractFiniteState
Reset the clip instances held by this state's blend tree (or other leaf nodes in our blend tree) to given start time.- Overrides:
resetClips
in classAbstractFiniteState
- Parameters:
manager
- our manager.globalStartTime
- the new start time to use.
-