/** Set the active animation, replacing any current animation. * @param id The ID of the {@link Animation} within the {@link ModelInstance}. * @param loopCount The number of times to loop the animation, zero to play the animation only once, negative to continuously * loop the animation. * @return The {@link AnimationDesc} which can be read to get the progress of the animation. Will be invalid when the animation * is completed. */ public AnimationDesc setAnimation (final String id, int loopCount) { return setAnimation(id, loopCount, 1.0f, null); }
/** Set the active animation, replacing any current animation. * @param id The ID of the {@link Animation} within the {@link ModelInstance}. * @param loopCount The number of times to loop the animation, zero to play the animation only once, negative to continuously * loop the animation. * @param listener The {@link AnimationListener} which will be informed when the animation is looped or completed. * @return The {@link AnimationDesc} which can be read to get the progress of the animation. Will be invalid when the animation * is completed. */ public AnimationDesc setAnimation (final String id, int loopCount, final AnimationListener listener) { return setAnimation(id, loopCount, 1.0f, listener); }
/** Set the active animation, replacing any current animation. * @param id The ID of the {@link Animation} within the {@link ModelInstance}. * @param loopCount The number of times to loop the animation, zero to play the animation only once, negative to continuously * loop the animation. * @param speed The speed at which the animation should be played. Default is 1.0f. A value of 2.0f will play the animation at * twice the normal speed, a value of 0.5f will play the animation at half the normal speed, etc. This value can be * negative, causing the animation to played in reverse. This value cannot be zero. * @param listener The {@link AnimationListener} which will be informed when the animation is looped or completed. * @return The {@link AnimationDesc} which can be read to get the progress of the animation. Will be invalid when the animation * is completed. */ public AnimationDesc setAnimation (final String id, int loopCount, float speed, final AnimationListener listener) { return setAnimation(id, 0f, -1f, loopCount, speed, listener); }
/** Set the active animation, replacing any current animation. * @param id The ID of the {@link Animation} within the {@link ModelInstance}. * @param loopCount The number of times to loop the animation, zero to play the animation only once, negative to continuously * loop the animation. * @param listener The {@link AnimationListener} which will be informed when the animation is looped or completed. * @return The {@link AnimationDesc} which can be read to get the progress of the animation. Will be invalid when the animation * is completed. */ public AnimationDesc setAnimation (final String id, int loopCount, final AnimationListener listener) { return setAnimation(id, loopCount, 1.0f, listener); }
/** Set the active animation, replacing any current animation. * @param id The ID of the {@link Animation} within the {@link ModelInstance}. * @param loopCount The number of times to loop the animation, zero to play the animation only once, negative to continuously * loop the animation. * @param speed The speed at which the animation should be played. Default is 1.0f. A value of 2.0f will play the animation at * twice the normal speed, a value of 0.5f will play the animation at half the normal speed, etc. This value can be * negative, causing the animation to played in reverse. This value cannot be zero. * @param listener The {@link AnimationListener} which will be informed when the animation is looped or completed. * @return The {@link AnimationDesc} which can be read to get the progress of the animation. Will be invalid when the animation * is completed. */ public AnimationDesc setAnimation (final String id, int loopCount, float speed, final AnimationListener listener) { return setAnimation(id, 0f, -1f, loopCount, speed, listener); }
/** Set the active animation, replacing any current animation. * @param id The ID of the {@link Animation} within the {@link ModelInstance}. * @return The {@link AnimationDesc} which can be read to get the progress of the animation. Will be invalid when the animation * is completed. */ public AnimationDesc setAnimation (final String id) { return setAnimation(id, 1, 1.0f, null); }
/** Set the active animation, replacing any current animation. * @param id The ID of the {@link Animation} within the {@link ModelInstance}. * @param listener The {@link AnimationListener} which will be informed when the animation is looped or completed. * @return The {@link AnimationDesc} which can be read to get the progress of the animation. Will be invalid when the animation * is completed. */ public AnimationDesc setAnimation (final String id, final AnimationListener listener) { return setAnimation(id, 1, 1.0f, listener); }
/** Set the active animation, replacing any current animation. * @param id The ID of the {@link Animation} within the {@link ModelInstance}. * @return The {@link AnimationDesc} which can be read to get the progress of the animation. Will be invalid when the animation * is completed. */ public AnimationDesc setAnimation (final String id) { return setAnimation(id, 1, 1.0f, null); }
/** Set the active animation, replacing any current animation. * @param id The ID of the {@link Animation} within the {@link ModelInstance}. * @param loopCount The number of times to loop the animation, zero to play the animation only once, negative to continuously * loop the animation. * @return The {@link AnimationDesc} which can be read to get the progress of the animation. Will be invalid when the animation * is completed. */ public AnimationDesc setAnimation (final String id, int loopCount) { return setAnimation(id, loopCount, 1.0f, null); }
/** Set the active animation, replacing any current animation. * @param id The ID of the {@link Animation} within the {@link ModelInstance}. * @param listener The {@link AnimationListener} which will be informed when the animation is looped or completed. * @return The {@link AnimationDesc} which can be read to get the progress of the animation. Will be invalid when the animation * is completed. */ public AnimationDesc setAnimation (final String id, final AnimationListener listener) { return setAnimation(id, 1, 1.0f, listener); }
/** Set the active animation, replacing any current animation. */ protected AnimationDesc setAnimation (final Animation anim, float offset, float duration, int loopCount, float speed, final AnimationListener listener) { return setAnimation(obtain(anim, offset, duration, loopCount, speed, listener)); }
/** Set the active animation, replacing any current animation. */ protected AnimationDesc setAnimation (final Animation anim, float offset, float duration, int loopCount, float speed, final AnimationListener listener) { return setAnimation(obtain(anim, offset, duration, loopCount, speed, listener)); }
/** Set the active animation, replacing any current animation. * @param id The ID of the {@link Animation} within the {@link ModelInstance}. * @param offset The offset in seconds to the start of the animation. * @param duration The duration in seconds of the animation (or negative to play till the end of the animation). * @param loopCount The number of times to loop the animation, zero to play the animation only once, negative to continuously * loop the animation. * @param speed The speed at which the animation should be played. Default is 1.0f. A value of 2.0f will play the animation at * twice the normal speed, a value of 0.5f will play the animation at half the normal speed, etc. This value can be * negative, causing the animation to played in reverse. This value cannot be zero. * @param listener The {@link AnimationListener} which will be informed when the animation is looped or completed. * @return The {@link AnimationDesc} which can be read to get the progress of the animation. Will be invalid when the animation * is completed. */ public AnimationDesc setAnimation (final String id, float offset, float duration, int loopCount, float speed, final AnimationListener listener) { return setAnimation(obtain(id, offset, duration, loopCount, speed, listener)); }
/** Set the active animation, replacing any current animation. * @param id The ID of the {@link Animation} within the {@link ModelInstance}. * @param offset The offset in seconds to the start of the animation. * @param duration The duration in seconds of the animation (or negative to play till the end of the animation). * @param loopCount The number of times to loop the animation, zero to play the animation only once, negative to continuously * loop the animation. * @param speed The speed at which the animation should be played. Default is 1.0f. A value of 2.0f will play the animation at * twice the normal speed, a value of 0.5f will play the animation at half the normal speed, etc. This value can be * negative, causing the animation to played in reverse. This value cannot be zero. * @param listener The {@link AnimationListener} which will be informed when the animation is looped or completed. * @return The {@link AnimationDesc} which can be read to get the progress of the animation. Will be invalid when the animation * is completed. */ public AnimationDesc setAnimation (final String id, float offset, float duration, int loopCount, float speed, final AnimationListener listener) { return setAnimation(obtain(id, offset, duration, loopCount, speed, listener)); }
/** Set the active animation, replacing any current animation. * @param id The ID of the {@link Animation} within the {@link ModelInstance}. * @param loopCount The number of times to loop the animation, zero to play the animation only once, negative to continuously * loop the animation. * @return The {@link AnimationDesc} which can be read to get the progress of the animation. Will be invalid when the animation * is completed. */ public AnimationDesc setAnimation (final String id, int loopCount) { return setAnimation(id, loopCount, 1.0f, null); }
/** Set the active animation, replacing any current animation. * @param id The ID of the {@link Animation} within the {@link ModelInstance}. * @param listener The {@link AnimationListener} which will be informed when the animation is looped or completed. * @return The {@link AnimationDesc} which can be read to get the progress of the animation. Will be invalid when the animation * is completed. */ public AnimationDesc setAnimation (final String id, final AnimationListener listener) { return setAnimation(id, 1, 1.0f, listener); }
/** Set the active animation, replacing any current animation. * @param id The ID of the {@link Animation} within the {@link ModelInstance}. * @param loopCount The number of times to loop the animation, zero to play the animation only once, negative to continuously * loop the animation. * @param listener The {@link AnimationListener} which will be informed when the animation is looped or completed. * @return The {@link AnimationDesc} which can be read to get the progress of the animation. Will be invalid when the animation * is completed. */ public AnimationDesc setAnimation (final String id, int loopCount, final AnimationListener listener) { return setAnimation(id, loopCount, 1.0f, listener); }
/** Set the active animation, replacing any current animation. * @param id The ID of the {@link Animation} within the {@link ModelInstance}. * @return The {@link AnimationDesc} which can be read to get the progress of the animation. Will be invalid when the animation * is completed. */ public AnimationDesc setAnimation (final String id) { return setAnimation(id, 1, 1.0f, null); }
/** Set the active animation, replacing any current animation. * @param id The ID of the {@link Animation} within the {@link ModelInstance}. * @param loopCount The number of times to loop the animation, zero to play the animation only once, negative to continuously * loop the animation. * @param speed The speed at which the animation should be played. Default is 1.0f. A value of 2.0f will play the animation at * twice the normal speed, a value of 0.5f will play the animation at half the normal speed, etc. This value can be * negative, causing the animation to played in reverse. This value cannot be zero. * @param listener The {@link AnimationListener} which will be informed when the animation is looped or completed. * @return The {@link AnimationDesc} which can be read to get the progress of the animation. Will be invalid when the animation * is completed. */ public AnimationDesc setAnimation (final String id, int loopCount, float speed, final AnimationListener listener) { return setAnimation(id, 0f, -1f, loopCount, speed, listener); }
/** Set the active animation, replacing any current animation. */ protected AnimationDesc setAnimation (final Animation anim, float offset, float duration, int loopCount, float speed, final AnimationListener listener) { return setAnimation(obtain(anim, offset, duration, loopCount, speed, listener)); }