Package com.jme3.anim.tween.action
Interface BlendSpace
- All Known Implementing Classes:
LinearBlendSpace
public interface BlendSpace
A provider interface which provides a value
getWeight()
to control the blending between 2 successive actions in a BlendAction
.
The blending weight is a read-only value, and it can be manipulated using the arbitrary value setValue(float)
during the application runtime.
Notes about the blending action and its relations with the blending weight:
- Blending is the action of mixing between 2 successive animation
BlendableAction
s by interpolating their transforms and then applying the result on the assignedinvalid reference
HasLocalTransform
BlendSpace
provides this blending action with a blend weight value. - The blend weight is the value for the interpolation for the target transforms.
- The blend weight value must be in this interval [0, 1].
Different blending weight case scenarios managed by BlendAction
internally:
- In case of (0 invalid input: '<' Blending weight invalid input: '<' 1), the blending is executed each update among 2 actions, the first action will use a blend value of 1 and the second action will use the blend space weight as a value for the interpolation.
- In case of (Blending weight = 0), the blending hasn't started yet, only the first action will be interpolated at (weight = 1).
- In case of (Blending weight = 1), the blending is finished and only the second action will continue to run at (weight = 1).
Notes about the blending weight value:
- Negative values and values greater than 1 aren't allowed (i.e., extrapolations aren't allowed).
- For more details, see
BlendAction.doInterpolate(double)
andBlendAction.collectTransform(HasLocalTransform, Transform, float, BlendableAction)
.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionfloat
Provides the blend weight value to the assignedBlendAction
instance, this value will be used for interpolating a collection of actions' transformations (i.e., keyframes).void
setBlendAction
(BlendAction action) Adjusts the target blend action instance that will utilize the blend weight value provided by this blend-space implementation.void
setValue
(float value) An arbitrary value used for adjusting the blending weight value.
-
Method Details
-
setBlendAction
Adjusts the target blend action instance that will utilize the blend weight value provided by this blend-space implementation.- Parameters:
action
- the blend action instance that will utilize this blend-space (not null).
-
getWeight
float getWeight()Provides the blend weight value to the assignedBlendAction
instance, this value will be used for interpolating a collection of actions' transformations (i.e., keyframes).- Returns:
- the blending weight value in the range from 0 to 1, negative values and values above 1 aren't allowed.
- See Also:
-
setValue
void setValue(float value) An arbitrary value used for adjusting the blending weight value.- Parameters:
value
- the value in floats.- See Also:
-