Animation Class Reference

#include <animation.h>

List of all members.


Detailed Description

An animation consists of several frames, each with their own delay and offset.

Definition at line 46 of file animation.h.


Public Member Functions

 Animation ()
void addFrame (Image *image, unsigned int delay, int offsetX, int offsetY)
 Appends a new animation at the end of the sequence.
void addTerminator ()
 Appends an animation terminator that states that the animation should not loop.
FramegetFrame (int index)
 Returns the frame at the specified index.
unsigned int getLength () const
 Returns the length of this animation in frames.
int getDuration () const
 Returns the duration of this animation.

Static Public Member Functions

static bool isTerminator (const Frame &phase)
 Determines whether the given animation frame is a terminator.

Protected Attributes

std::vector< FramemFrames
int mDuration

Constructor & Destructor Documentation

Animation::Animation (  ) 

Definition at line 26 of file animation.cpp.


Member Function Documentation

void Animation::addFrame ( Image image,
unsigned int  delay,
int  offsetX,
int  offsetY 
)

Appends a new animation at the end of the sequence.

Definition at line 31 of file animation.cpp.

void Animation::addTerminator (  ) 

Appends an animation terminator that states that the animation should not loop.

Definition at line 39 of file animation.cpp.

Frame* Animation::getFrame ( int  index  )  [inline]

Returns the frame at the specified index.

Definition at line 66 of file animation.h.

unsigned int Animation::getLength (  )  const [inline]

Returns the length of this animation in frames.

Definition at line 71 of file animation.h.

int Animation::getDuration (  )  const [inline]

Returns the duration of this animation.

Definition at line 76 of file animation.h.

bool Animation::isTerminator ( const Frame phase  )  [static]

Determines whether the given animation frame is a terminator.

Definition at line 44 of file animation.cpp.


Member Data Documentation

std::vector<Frame> Animation::mFrames [protected]

Definition at line 84 of file animation.h.

int Animation::mDuration [protected]

Definition at line 85 of file animation.h.


The documentation for this class was generated from the following files:

Generated on Sun Apr 26 17:30:43 2009 for The Mana World by  doxygen 1.5.5