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
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
cloneFields
(Cloner cloner, Object original) Callback fromCloner
to convert this shallow-cloned action into a deep-cloned one, using the specified cloner and original to resolve copied fields.abstract void
collectTransform
(HasLocalTransform target, Transform t, float weight, BlendableAction source) protected abstract void
doInterpolate
(double t) double
abstract Collection<HasLocalTransform>
double
protected float
float
boolean
interpolate
(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.void
setCollectTransformDelegate
(BlendableAction delegate) void
setMaxTransitionWeight
(double maxTransitionWeight) void
setTransitionLength
(double transitionLength) void
setWeight
(float weight)
-
Field Details
-
collectTransformDelegate
-
-
Constructor Details
-
BlendableAction
-
-
Method Details
-
setCollectTransformDelegate
-
interpolate
public boolean interpolate(double t) Description copied from interface:Tween
Sets 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:
jmeClone
in interfaceJmeCloneable
- Overrides:
jmeClone
in classAction
- Returns:
- a new action (not null)
-
cloneFields
Callback fromCloner
to convert this shallow-cloned action into a deep-cloned one, using the specified cloner and original to resolve copied fields.- Specified by:
cloneFields
in interfaceJmeCloneable
- Overrides:
cloneFields
in classAction
- Parameters:
cloner
- the cloner that's cloning this action (not null)original
- the action from which this action was shallow-cloned (unused)
-