|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectde.rico.engine.geometry.modelloader.Animation
public class Animation
This class encapsulates the metadata for an animation, but not the triangles itself.
| Constructor Summary | |
|---|---|
Animation(java.lang.String name,
int start,
int end,
int dur)
Creates a new animation with the specified data. |
|
Animation(java.lang.String name,
int start,
int end,
int dur,
Mp3Sound sound)
Creates a new animation with the specified data. |
|
| Method Summary | |
|---|---|
int |
getCurrentFrame()
|
int |
getDurPerFrame()
Returns the duration per frame of the animation in miliseconds. |
int |
getEndFrame()
Returns the last frame of the animation. |
java.lang.String |
getName()
Returns the name of the animation. |
Mp3Sound |
getSound()
Returns the mp3 sound that is assigned to the animation. if none was assigned the method returns null. |
int |
getStartFrame()
Returns the number of the first frame of the animation. |
void |
reset()
Resets the animation to its start frame. |
void |
setDurPerFrame(int durPerFrame)
Sets the duration per frame of the animation in miliseconds. |
void |
setEndFrame(int endFrame)
Sets the last frame of the animation. |
void |
setName(java.lang.String name)
Sets the name of the animation. |
void |
setStartFrame(int startFrame)
Sets the number of the first frame of the animation. |
void |
start()
Starts/resumes the animation (and possible sound file playing) again. |
void |
stop()
Stops the animation (and possible sound file playing) |
void |
update(long elapsedTime)
Updates the animation. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Animation(java.lang.String name,
int start,
int end,
int dur)
name - name of the animationstart - number of the animation's start frameend - number of the animation's end framedur - duration per frame
public Animation(java.lang.String name,
int start,
int end,
int dur,
Mp3Sound sound)
name - name of the animationstart - number of the animation's start frameend - number of the animation's end framedur - duration per framesound - possibly looped mp3 sound file| Method Detail |
|---|
public int getDurPerFrame()
public void setDurPerFrame(int durPerFrame)
durPerFrame - new duration per framepublic int getEndFrame()
public void setEndFrame(int endFrame)
endFrame - number of the last animation framepublic java.lang.String getName()
public void setName(java.lang.String name)
name - name of the animationpublic int getStartFrame()
public void setStartFrame(int startFrame)
startFrame - number of the animation's start framepublic Mp3Sound getSound()
null.
public void reset()
public void stop()
public void start()
public int getCurrentFrame()
public void update(long elapsedTime)
elapsedTime - time between two frames
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||