public class BaseAnimationController
extends java.lang.Object
Animation
s to a ModelInstance
.
This class only applies the actual Node
transformations,
it does not manage animations or keep track of animation states. See AnimationController
for an implementation of this class which does manage animations.Modifier and Type | Class and Description |
---|---|
static class |
BaseAnimationController.Transform |
Modifier and Type | Field and Description |
---|---|
ModelInstance |
target
The
ModelInstance on which the animations are being performed. |
Constructor and Description |
---|
BaseAnimationController(ModelInstance target)
Construct a new BaseAnimationController.
|
Modifier and Type | Method and Description |
---|---|
protected void |
apply(Animation animation,
float time,
float weight)
|
protected void |
applyAnimation(Animation animation,
float time)
Apply a single animation to the
ModelInstance and update the it to reflect the changes. |
protected static void |
applyAnimation(ObjectMap<Node,BaseAnimationController.Transform> out,
Pool<BaseAnimationController.Transform> pool,
float alpha,
Animation animation,
float time)
Helper method to apply one animation to either an objectmap for blending or directly to the bones.
|
protected void |
applyAnimations(Animation anim1,
float time1,
Animation anim2,
float time2,
float weight)
Apply two animations, blending the second onto to first using weight.
|
protected void |
begin()
Begin applying multiple animations to the instance,
must followed by one or more calls to {
apply(Animation, float, float) and finally {end() . |
protected void |
end()
End applying multiple animations to the instance and update it to reflect the changes.
|
protected void |
removeAnimation(Animation animation)
Remove the specified animation, by marking the affected nodes as not animated.
|
public final ModelInstance target
ModelInstance
on which the animations are being performed.public BaseAnimationController(ModelInstance target)
target
- The ModelInstance
on which the animations are being performed.protected void begin()
apply(Animation, float, float)
and finally {end()
.protected void apply(Animation animation, float time, float weight)
weight
- The blend weight of this animation relative to the previous applied animations.protected void end()
protected void applyAnimation(Animation animation, float time)
ModelInstance
and update the it to reflect the changes.protected void applyAnimations(Animation anim1, float time1, Animation anim2, float time2, float weight)
protected static void applyAnimation(ObjectMap<Node,BaseAnimationController.Transform> out, Pool<BaseAnimationController.Transform> pool, float alpha, Animation animation, float time)
protected void removeAnimation(Animation animation)