|
libgdx API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.badlogic.gdx.graphics.g3d.Animator
public abstract class Animator
Abstract class for a single-track animation controller. Keeps track of the animation position and invokes interpolation on concrete classes.
Nested Class Summary | |
---|---|
static class |
Animator.WrapMode
|
Field Summary | |
---|---|
protected float |
mAnimLen
|
protected float |
mAnimPos
|
protected Animation |
mCurrentAnim
|
protected int |
mCurrentFrameIdx
|
protected float |
mFrameDelta
|
protected int |
mNextFrameIdx
|
protected Animator.WrapMode |
mWrapMode
|
Constructor Summary | |
---|---|
Animator()
|
Method Summary | |
---|---|
Animation |
getCurrentAnimation()
Gets the currently playing Animation . |
Animator.WrapMode |
getCurrentWrapMode()
Gets the current animation Animator.WrapMode . |
protected abstract void |
interpolate()
Implementations should interpolate between the 'current' and 'next' frames of animation. |
void |
setAnimation(Animation anim,
Animator.WrapMode mode)
Sets the currently playing Animation . |
protected abstract void |
setInterpolationFrames()
Implementations should set the 'current' and 'next' frames of animation that will be interpolated. |
void |
update(float dt)
Updates the controller. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected float mAnimPos
protected float mAnimLen
protected Animator.WrapMode mWrapMode
protected int mCurrentFrameIdx
protected int mNextFrameIdx
protected float mFrameDelta
protected Animation mCurrentAnim
Constructor Detail |
---|
public Animator()
Method Detail |
---|
public void setAnimation(Animation anim, Animator.WrapMode mode)
Animation
.
anim
- The animation to play.mode
- The animation's Animator.WrapMode
.public Animation getCurrentAnimation()
Animation
.
public Animator.WrapMode getCurrentWrapMode()
Animator.WrapMode
.
public void update(float dt)
dt
- Delta time since last frame.protected abstract void setInterpolationFrames()
protected abstract void interpolate()
|
libgdx API | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |