Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## simogl.model.animation
Class Animation

    java.lang.Object
      simogl.model.animation.Animation

    public class Animation

extends java.lang.Object

This class represents an animation of a md2 model

Author:
  Frank Bruns

Constructor Summary
`Animation()` Creates a new Animation object

Method Summary
`void` | `addAnimFrame(AbstractMesh frame, long duration)` Adds a frame to the animation
`AnimationFrame` | `getAnimFrame(int index)` Returns the animation frame with the specified index in the animation
`java.util.ArrayList<AnimationFrame>` | `getAnimFrames()` Returns the ArrayList of animation frames that form the animation
`AnimationFrame` | `getCurrentFrame()` Returns the current frame of the animation
`void` | `play(javax.media.opengl.GL gl)` Runs the current animation
`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

### Animation

    public Animation()

  Creates a new Animation object

Method Detail

### addAnimFrame

    public void addAnimFrame(AbstractMesh frame,
                             long duration)

  Adds a frame to the animation

  Parameters:
    `frame` - frame to add to the animation
    `duration` - time in miliseconds this frame shall show up

### getAnimFrame

    public AnimationFrame getAnimFrame(int index)

  Returns the animation frame with the specified index in the animation

  Parameters:
    `index` - index of the animation's frame
  Returns:
    frame with the specified index in the animation

### getCurrentFrame

    public AnimationFrame getCurrentFrame()

  Returns the current frame of the animation

  Returns:
    current frame of the animation

### getAnimFrames

    public java.util.ArrayList<AnimationFrame> getAnimFrames()

  Returns the ArrayList of animation frames that form the animation

  Returns:
    arraylist of animation frames

### play

    public void play(javax.media.opengl.GL gl)

  Runs the current animation

  Parameters:
    `gl` -

### update

    public void update(long elapsedTime)

  Updates the animation

  Parameters:
    `elapsedTime` - time between two frames

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD