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
Modifier and TypeClassDescriptionstatic enum
Describes how blending should be applied over the span of the transition. -
Constructor Summary
ModifierConstructorDescriptionprotected
AbstractTwoStateLerpTransition
(String targetState, double fadeTime, AbstractTwoStateLerpTransition.BlendType type) Construct a new AbstractTwoStateLerpTransition. -
Method Summary
Modifier and TypeMethodDescriptiongetCurrentSourceData
(AnimationManager manager) double
protected double
protected double
getStart()
void
replaceState
(AbstractFiniteState currentState, AbstractFiniteState newState) Replace the given current state with the given new statevoid
void
setFadeTime
(double fadeTime) protected void
setPercent
(double percent) protected void
setStart
(double start) void
setStateA
(AbstractFiniteState stateA) void
setStateB
(AbstractFiniteState stateB) void
update
(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, setStartWindow
Methods 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: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.
-
getCurrentSourceData
- Specified by:
getCurrentSourceData
in classAbstractFiniteState
- Parameters:
manager
- animation manager- Returns:
- the current map of source channel data for this layer.
-
replaceState
Description copied from interface:StateOwner
Replace the given current state with the given new state- Specified by:
replaceState
in interfaceStateOwner
- Parameters:
currentState
- the state to replacenewState
- the state to replace it with.
-