Class AnimationControllerHack
java.lang.Object
gaiasky.util.gdx.model.BaseIntAnimationController
gaiasky.util.gdx.model.IntAnimationController
gaiasky.util.gdx.model.gltf.scene3d.animation.AnimationControllerHack
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class IntAnimationController
IntAnimationController.AnimationDesc, IntAnimationController.AnimationListenerModifier and TypeClassDescriptionstatic classClass describing how to play andAnimation.static interfaceListener that will be informed when an animation is looped or completed. -
Field Summary
FieldsFields inherited from class IntAnimationController
allowSameAnimation, animationPool, current, inAction, paused, previous, queued, queuedTransitionTime, transitionCurrentTime, transitionTargetTimeModifier and TypeFieldDescriptionbooleanWhether to allow the same animation to be played while playing that animation.protected final com.badlogic.gdx.utils.Pool<IntAnimationController.AnimationDesc> The animation currently playing.booleanWhether an action is being performed.booleanWhen true a call toIntAnimationController.update(float)will not be processed.The animation which previously played.The animation queued to be played when theIntAnimationController.currentanimation is completed.floatThe transition time which should be applied to the queued animation.floatThe current transition time.floatThe target transition time.Fields inherited from class BaseIntAnimationController
targetModifier and TypeFieldDescriptionfinal IntModelInstanceTheIntModelInstanceon which the animations are being performed. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidapply(IntAnimation animation, float time, float weight) protected voidapplyAnimation(IntAnimation animation, float time) Apply a single animation to theModelInstanceand update the it to reflect the changes.protected static voidapplyAnimationPlus(com.badlogic.gdx.utils.ObjectMap<IntNode, AnimationControllerHack.Transform> out, com.badlogic.gdx.utils.Pool<AnimationControllerHack.Transform> pool, float alpha, IntAnimation animation, float time) Helper method to apply one animation to either an object map for blending or directly to the bones.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.voidsetAnimation(IntAnimation animation) voidsetAnimation(IntAnimation animation, int loopCount) voidMethods inherited from class IntAnimationController
action, action, action, action, animate, animate, animate, animate, animate, animate, animate, queue, queue, queue, queue, setAnimation, setAnimation, setAnimation, setAnimation, setAnimation, setAnimation, setAnimation, setAnimation, updateModifier and TypeMethodDescriptionprotected IntAnimationController.AnimationDescaction(IntAnimationController.AnimationDesc anim, float transitionTime) Apply an action animation on top of the current animation.protected IntAnimationController.AnimationDescaction(IntAnimation anim, float offset, float duration, int loopCount, float speed, IntAnimationController.AnimationListener listener, float transitionTime) Apply an action animation on top of the current animation.action(String id, float offset, float duration, int loopCount, float speed, IntAnimationController.AnimationListener listener, float transitionTime) Apply an action animation on top of the current animation.action(String id, int loopCount, float speed, IntAnimationController.AnimationListener listener, float transitionTime) Apply an action animation on top of the current animation.protected IntAnimationController.AnimationDescanimate(IntAnimationController.AnimationDesc anim, float transitionTime) Changes the current animation by blending the new on top of the old during the transition time.protected IntAnimationController.AnimationDescanimate(IntAnimation anim, float offset, float duration, int loopCount, float speed, IntAnimationController.AnimationListener listener, float transitionTime) Changes the current animation by blending the new on top of the old during the transition time.Changes the current animation by blending the new on top of the old during the transition time.animate(String id, float offset, float duration, int loopCount, float speed, IntAnimationController.AnimationListener listener, float transitionTime) Changes the current animation by blending the new on top of the old during the transition time.animate(String id, int loopCount, float speed, IntAnimationController.AnimationListener listener, float transitionTime) Changes the current animation by blending the new on top of the old during the transition time.animate(String id, int loopCount, IntAnimationController.AnimationListener listener, float transitionTime) Changes the current animation by blending the new on top of the old during the transition time.animate(String id, IntAnimationController.AnimationListener listener, float transitionTime) Changes the current animation by blending the new on top of the old during the transition time.protected IntAnimationController.AnimationDescqueue(IntAnimationController.AnimationDesc anim, float transitionTime) Queue an animation to be applied when the current is finished.protected IntAnimationController.AnimationDescqueue(IntAnimation anim, float offset, float duration, int loopCount, float speed, IntAnimationController.AnimationListener listener, float transitionTime) Queue an animation to be applied when the current is finished.queue(String id, float offset, float duration, int loopCount, float speed, IntAnimationController.AnimationListener listener, float transitionTime) Queue an animation to be applied when theIntAnimationController.currentanimation is finished.queue(String id, int loopCount, float speed, IntAnimationController.AnimationListener listener, float transitionTime) Queue an animation to be applied when theIntAnimationController.currentanimation is finished.protected IntAnimationController.AnimationDescSet the active animation, replacing any current animation.protected IntAnimationController.AnimationDescsetAnimation(IntAnimation anim, float offset, float duration, int loopCount, float speed, IntAnimationController.AnimationListener listener) Set the active animation, replacing any current animation.setAnimation(String id) Set the active animation, replacing any current animation.setAnimation(String id, float offset, float duration, int loopCount, float speed, IntAnimationController.AnimationListener listener) Set the active animation, replacing any current animation.setAnimation(String id, int loopCount) Set the active animation, replacing any current animation.setAnimation(String id, int loopCount, float speed, IntAnimationController.AnimationListener listener) Set the active animation, replacing any current animation.setAnimation(String id, int loopCount, IntAnimationController.AnimationListener listener) Set the active animation, replacing any current animation.setAnimation(String id, IntAnimationController.AnimationListener listener) Set the active animation, replacing any current animation.voidupdate(float delta) Update any animations currently being played.Methods inherited from class BaseIntAnimationController
applyAnimation, removeAnimationModifier and TypeMethodDescriptionprotected 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 voidremoveAnimation(IntAnimation animation) Remove the specified animation, by marking the affected nodes as not animated.
-
Field Details
-
calculateTransforms
public boolean calculateTransforms
-
-
Constructor Details
-
AnimationControllerHack
-
-
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().- Overrides:
beginin classBaseIntAnimationController
-
apply
- Overrides:
applyin classBaseIntAnimationController- 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.- Overrides:
endin classBaseIntAnimationController
-
applyAnimation
Apply a single animation to theModelInstanceand update the it to reflect the changes.- Overrides:
applyAnimationin classBaseIntAnimationController
-
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.- Overrides:
applyAnimationsin classBaseIntAnimationController
-
applyAnimationPlus
protected static void applyAnimationPlus(com.badlogic.gdx.utils.ObjectMap<IntNode, AnimationControllerHack.Transform> out, com.badlogic.gdx.utils.Pool<AnimationControllerHack.Transform> pool, float alpha, IntAnimation animation, float time) Helper method to apply one animation to either an object map for blending or directly to the bones. -
setAnimationDesc
-
setAnimation
-
setAnimation
- Parameters:
animation- animation to playloopCount- loop count : 0 paused, -1 infinite, n for n loops
-