Class BaseIntAnimationController
java.lang.Object
gaiasky.util.gdx.model.BaseIntAnimationController
- Direct Known Subclasses:
IntAnimationController
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionfinal IntModelInstanceTheIntModelInstanceon which the animations are being performed. -
Constructor Summary
ConstructorsConstructorDescriptionConstruct a new BaseAnimationController. -
Method Summary
Modifier and TypeMethodDescriptionprotected voidapply(IntAnimation animation, float time, float weight) protected static voidapplyAnimation(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 voidapplyAnimation(IntAnimation animation, float time) Apply a single animation to theIntModelInstanceand update the it to reflect the changes.protected voidapplyAnimations(IntAnimation anim1, float time1, IntAnimation anim2, float time2, float weight) Apply two animations, blending the second onto to first using weight.protected voidbegin()Begin applying multiple animations to the instance, must followed by one or more calls to {apply(IntAnimation, float, float)and finally {end().protected voidend()End applying multiple animations to the instance and update it to reflect the changes.protected voidremoveAnimation(IntAnimation animation) Remove the specified animation, by marking the affected nodes as not animated.
-
Field Details
-
target
TheIntModelInstanceon which the animations are being performed.
-
-
Constructor Details
-
BaseIntAnimationController
Construct a new BaseAnimationController.- Parameters:
target- TheIntModelInstanceon 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 theIntModelInstanceand 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).
-