Class AbstractTwoStateLerpTransition
java.lang.Object
com.ardor3d.extension.animation.skeletal.state.AbstractFiniteState
com.ardor3d.extension.animation.skeletal.state.AbstractTransitionState
com.ardor3d.extension.animation.skeletal.state.AbstractTwoStateLerpTransition
- All Implemented Interfaces:
StateOwner
- Direct Known Subclasses:
FadeTransitionState,FrozenTransitionState
public abstract class AbstractTwoStateLerpTransition
extends AbstractTransitionState
implements StateOwner
An abstract transition state that blends between two other states.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumDescribes how blending should be applied over the span of the transition. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractTwoStateLerpTransition(String targetState, double fadeTime, AbstractTwoStateLerpTransition.BlendType type) Construct a new AbstractTwoStateLerpTransition. -
Method Summary
Modifier and TypeMethodDescriptiongetCurrentSourceData(AnimationManager manager) doubleprotected doubleprotected doublegetStart()voidreplaceState(AbstractFiniteState currentState, AbstractFiniteState newState) Replace the given current state with the given new statevoidvoidsetFadeTime(double fadeTime) protected voidsetPercent(double percent) protected voidsetStart(double start) voidsetStateA(AbstractFiniteState stateA) voidsetStateB(AbstractFiniteState stateB) voidupdate(double globalTime, AnimationLayer layer) Update this state using the current global time.Methods inherited from class com.ardor3d.extension.animation.skeletal.state.AbstractTransitionState
doTransition, getEndWindow, getStartWindow, getTargetState, setEndWindow, setStartWindowMethods inherited from class com.ardor3d.extension.animation.skeletal.state.AbstractFiniteState
getGlobalStartTime, getLastStateOwner, postUpdate, resetClips, resetClips, setLastStateOwner
-
Constructor Details
-
AbstractTwoStateLerpTransition
protected AbstractTwoStateLerpTransition(String targetState, double fadeTime, AbstractTwoStateLerpTransition.BlendType type) Construct a new AbstractTwoStateLerpTransition.- Parameters:
targetState- the name of the steady state we want the Animation Layer to be in at the end of the transition.fadeTime- the amount of time we should take to do the transition.type- the way we should interpolate the weighting during the transition.
-
-
Method Details
-
getStateA
-
setStateA
- Parameters:
stateA- sets the start state. Updates the state's owner to point to this transition.
-
getStateB
-
setStateB
- Parameters:
stateB- sets the end state. Updates the state's owner to point to this transition.
-
setFadeTime
public void setFadeTime(double fadeTime) -
getFadeTime
public double getFadeTime() -
setBlendType
-
getBlendType
-
setStart
protected void setStart(double start) -
getStart
protected double getStart() -
setPercent
protected void setPercent(double percent) -
getPercent
protected double getPercent() -
update
Description copied from class:AbstractFiniteStateUpdate this state using the current global time.- Specified by:
updatein classAbstractFiniteState- Parameters:
globalTime- the current global time.layer- the layer this state belongs to.
-
getCurrentSourceData
- Specified by:
getCurrentSourceDatain classAbstractFiniteState- Parameters:
manager- animation manager- Returns:
- the current map of source channel data for this layer.
-
replaceState
Description copied from interface:StateOwnerReplace the given current state with the given new state- Specified by:
replaceStatein interfaceStateOwner- Parameters:
currentState- the state to replacenewState- the state to replace it with.
-