Package com.jme3.anim.tween.action
Class BlendableAction
java.lang.Object
com.jme3.anim.tween.action.Action
com.jme3.anim.tween.action.BlendableAction
- All Implemented Interfaces:
Tween,JmeCloneable,Cloneable
- Direct Known Subclasses:
BlendAction,ClipAction
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcloneFields(Cloner cloner, Object original) Callback fromClonerto convert this shallow-cloned action into a deep-cloned one, using the specified cloner and original to resolve copied fields.abstract voidcollectTransform(HasLocalTransform target, Transform t, float weight, BlendableAction source) protected abstract voiddoInterpolate(double t) doubleabstract Collection<HasLocalTransform>doubleprotected floatfloatbooleaninterpolate(double t) Sets the implementation specific interpolation to the specified 'tween' value as a value in the range from 0 to getLength().jmeClone()Create a shallow clone for the JME cloner.voidsetCollectTransformDelegate(BlendableAction delegate) voidsetMaxTransitionWeight(double maxTransitionWeight) voidsetTransitionLength(double transitionLength) voidsetWeight(float weight)
-
Field Details
-
collectTransformDelegate
-
-
Constructor Details
-
BlendableAction
-
-
Method Details
-
setCollectTransformDelegate
-
interpolate
public boolean interpolate(double t) Description copied from interface:TweenSets the implementation specific interpolation to the specified 'tween' value as a value in the range from 0 to getLength(). If the value is greater or equal to getLength() then it is internally clamped and the method returns false. If 't' is still in the tween's range then this method returns true.- Parameters:
t- animation time (in de-scaled seconds)- Returns:
- true if t>length(), otherwise false
-
getWeight
public float getWeight() -
setWeight
public void setWeight(float weight) -
doInterpolate
protected abstract void doInterpolate(double t) -
getTargets
-
collectTransform
public abstract void collectTransform(HasLocalTransform target, Transform t, float weight, BlendableAction source) -
getTransitionLength
public double getTransitionLength() -
setTransitionLength
public void setTransitionLength(double transitionLength) -
getTransitionWeight
protected float getTransitionWeight() -
setMaxTransitionWeight
public void setMaxTransitionWeight(double maxTransitionWeight) - Parameters:
maxTransitionWeight- The max transition weight. Must be >=0 and <=1 (default=1)- Throws:
IllegalArgumentException- If maxTransitionWeight is not between 0 and 1.
-
getMaxTransitionWeight
public double getMaxTransitionWeight()- Returns:
- The max transition weight (default=1)
-
jmeClone
Create a shallow clone for the JME cloner.- Specified by:
jmeClonein interfaceJmeCloneable- Overrides:
jmeClonein classAction- Returns:
- a new action (not null)
-
cloneFields
Callback fromClonerto convert this shallow-cloned action into a deep-cloned one, using the specified cloner and original to resolve copied fields.- Specified by:
cloneFieldsin interfaceJmeCloneable- Overrides:
cloneFieldsin classAction- Parameters:
cloner- the cloner that's cloning this action (not null)original- the action from which this action was shallow-cloned (unused)
-