CAnimation Class Reference

#include <CAnimation.h>

List of all members.


Detailed Description

This class holds a list of OpenGL texture handles, representing consecutive frames of animation. It also holds a number representing the total number of frames in the animation.

Definition at line 29 of file CAnimation.h.

Public Member Functions

 CAnimation (void)
 default constructor
 CAnimation (float fScale, int frames, bool loop)
 constructor
int GetTotalFrames (void)
 get number of frames in an animation
GLuint GetFrame (int frame)
 get texture ID of a frame

Public Attributes

float fScale
bool bLooping
int iTotalFrames
GLuint * ipFrameTex


Constructor & Destructor Documentation

CAnimation::CAnimation ( void   ) 

Create a CAnimation class object with default parameters.

Definition at line 31 of file CAnimation.cpp.

References bLooping, fScale, ipFrameTex, and iTotalFrames.

CAnimation::CAnimation ( float  scale,
int  frames,
bool  loop 
)

Create a CAnimation class object with a specified number of frames.

Definition at line 44 of file CAnimation.cpp.

References bLooping, fScale, ipFrameTex, and iTotalFrames.


Member Function Documentation

int CAnimation::GetTotalFrames ( void   ) 

Return an integer value representing the total number of frames in an animation.

Definition at line 58 of file CAnimation.cpp.

References iTotalFrames.

GLuint CAnimation::GetFrame ( int  frame  ) 

Return the OpenGL texture handle cooresponding to the specified frame of animation.

Definition at line 69 of file CAnimation.cpp.

References ipFrameTex.


Member Data Documentation

float CAnimation::fScale

Definition at line 32 of file CAnimation.h.

Referenced by CAnimation().

bool CAnimation::bLooping

Definition at line 33 of file CAnimation.h.

Referenced by CAnimation().

int CAnimation::iTotalFrames

Definition at line 34 of file CAnimation.h.

Referenced by CAnimation(), GetTotalFrames(), GetTotalFrames(), TileAnim::Step(), and UpdateAnimation().

GLuint* CAnimation::ipFrameTex

Definition at line 35 of file CAnimation.h.

Referenced by CAnimation(), GetFrame(), GetFrame(), and InitTextures().

 

Copyright Windsor Schmidt 2006 - All rights reserved.