Package gaiasky.util.gdx.model
Class BaseIntAnimationController
java.lang.Object
gaiasky.util.gdx.model.BaseIntAnimationController
- Direct Known Subclasses:
IntAnimationController
-
Nested Class Summary
-
Field Summary
Modifier and TypeFieldDescriptionfinal IntModelInstance
TheIntModelInstance
on which the animations are being performed. -
Constructor Summary
ConstructorDescriptionConstruct a new BaseAnimationController. -
Method Summary
Modifier and TypeMethodDescriptionprotected void
apply
(IntAnimation animation, float time, float weight) protected static void
applyAnimation
(com.badlogic.gdx.utils.ObjectMap<IntNode, BaseIntAnimationController.Transform> out, com.badlogic.gdx.utils.Pool<BaseIntAnimationController.Transform> pool, float alpha, IntAnimation animation, float time) Helper method to apply one animation to either an objectmap for blending or directly to the bones.protected void
applyAnimation
(IntAnimation animation, float time) Apply a single animation to theIntModelInstance
and update the it to reflect the changes.protected void
applyAnimations
(IntAnimation anim1, float time1, IntAnimation 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(IntAnimation, 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
(IntAnimation animation) Remove the specified animation, by marking the affected nodes as not animated.
-
Field Details
-
target
TheIntModelInstance
on which the animations are being performed.
-
-
Constructor Details
-
BaseIntAnimationController
Construct a new BaseAnimationController.- Parameters:
target
- TheIntModelInstance
on which the animations are being performed.
-
-
Method Details
-
begin
protected void begin()Begin applying multiple animations to the instance, must followed by one or more calls to {apply(IntAnimation, float, float)
and finally {end()
. -
apply
- Parameters:
weight
- The blend weight of this animation relative to the previous applied animations.
-
end
protected void end()End applying multiple animations to the instance and update it to reflect the changes. -
applyAnimation
Apply a single animation to theIntModelInstance
and update the it to reflect the changes. -
applyAnimations
protected void applyAnimations(IntAnimation anim1, float time1, IntAnimation anim2, float time2, float weight) Apply two animations, blending the second onto to first using weight. -
applyAnimation
protected static void applyAnimation(com.badlogic.gdx.utils.ObjectMap<IntNode, BaseIntAnimationController.Transform> out, com.badlogic.gdx.utils.Pool<BaseIntAnimationController.Transform> pool, float alpha, IntAnimation animation, float time) Helper method to apply one animation to either an objectmap for blending or directly to the bones. -
removeAnimation
Remove the specified animation, by marking the affected nodes as not animated. When switching animation, this should be call prior to applyAnimation(s).
-