Package com.jme3.anim.tween.action
Class BlendAction
java.lang.Object
com.jme3.anim.tween.action.Action
com.jme3.anim.tween.action.BlendableAction
com.jme3.anim.tween.action.BlendAction
- All Implemented Interfaces:
Tween
,JmeCloneable
,Cloneable
-
Field Summary
Fields inherited from class com.jme3.anim.tween.action.BlendableAction
collectTransformDelegate
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
BlendAction will stretch it's child actions if they don't have the same length.void
void
collectTransform
(HasLocalTransform target, Transform t, float weight, BlendableAction source) void
doInterpolate
(double t) protected Action[]
double
getSpeed()
double[]
protected void
setFirstActiveIndex
(int index) protected void
setSecondActiveIndex
(int index) void
setSpeedFactors
(double... speedFactors) Used to resolve the slow motion side effect caused by stretching actions that doesn't have the same length.Methods inherited from class com.jme3.anim.tween.action.BlendableAction
cloneFields, getMaxTransitionWeight, getTransitionLength, getTransitionWeight, getWeight, interpolate, jmeClone, setCollectTransformDelegate, setMaxTransitionWeight, setTransitionLength, setWeight
-
Constructor Details
-
BlendAction
-
-
Method Details
-
doInterpolate
public void doInterpolate(double t) - Specified by:
doInterpolate
in classBlendableAction
-
getActions
-
getBlendSpace
-
getSpeed
public double getSpeed() -
getSpeedFactors
public double[] getSpeedFactors()- Returns:
- The speed factor or null if there is none
-
setSpeedFactors
public void setSpeedFactors(double... speedFactors) Used to resolve the slow motion side effect caused by stretching actions that doesn't have the same length.- Parameters:
speedFactors
- The speed factors for each child action. BlendAction will interpolate factor for current frame based on blend weight and will multiply it to speed.
-
clearSpeedFactors
public void clearSpeedFactors() -
applyDefaultSpeedFactors
public void applyDefaultSpeedFactors()BlendAction will stretch it's child actions if they don't have the same length. This might cause stretched animations to run slowly. This method generates factors based on how much actions are stretched. Multiplying this factor to base speed will resolve the slow-motion side effect caused by stretching. BlendAction will use the blend weight taken from BlendSpace to interpolate the speed factor for current frame. -
setFirstActiveIndex
protected void setFirstActiveIndex(int index) -
setSecondActiveIndex
protected void setSecondActiveIndex(int index) -
getTargets
- Specified by:
getTargets
in classBlendableAction
-
collectTransform
public void collectTransform(HasLocalTransform target, Transform t, float weight, BlendableAction source) - Specified by:
collectTransform
in classBlendableAction
-