Main Page | Class Hierarchy | Class List | File List | Class Members | Related Pages

CAnimation Class Reference

Animation class. More...

#include <Animation.h>

Inheritance diagram for CAnimation:

CXMLResource CResource CEntity CFrameAnimation< TAnimation > CFrameAnimation< tRect > CTextureFrameAnimation List of all members.

Public Member Functions

virtual int Animate (double fTimePerFrame)
virtual int Pause (double fPauseTime=INFINITE)
virtual int Resume (double fTimeToWait=0)
virtual int Stop ()
virtual void Destroy ()
virtual int LoadXML (TiXmlNode *pDataNode, CString strFilename)
virtual int SaveXML (TiXmlNode *pDataNode, CString strFilename)
virtual bool IsOfType (eEntityType eType)

Detailed Description

Animation class.

This class provides an interface for derived animation classes to use as well as loading/saving it in XML.

Definition at line 11 of file Animation.h.


Member Function Documentation

int CAnimation::Animate double  fTimePerFrame  )  [virtual]
 

Method details:

Parameters:
fTimePerFrame - Amount of time for the frame to wait before advancing to next
Returns:
1 If animation is complete, 0 otherwise

Reimplemented in CFrameAnimation< TAnimation >, CTextureFrameAnimation, and CFrameAnimation< tRect >.

Definition at line 14 of file Animation.cpp.

void CAnimation::Destroy  )  [virtual]
 

Method details: Clean-up method

Reimplemented from CXMLResource.

Reimplemented in CFrameAnimation< TAnimation >, CTextureFrameAnimation, and CFrameAnimation< tRect >.

Definition at line 69 of file Animation.cpp.

References CXMLResource::Destroy().

Referenced by CFrameAnimation< tRect >::Destroy().

bool CAnimation::IsOfType eEntityType  eType  )  [virtual]
 

Method details: This is an implementation of Custom RTTI

Reimplemented from CXMLResource.

Reimplemented in CFrameAnimation< TAnimation >, CTextureFrameAnimation, and CFrameAnimation< tRect >.

Definition at line 74 of file Animation.cpp.

References CXMLResource::IsOfType().

Referenced by CFrameAnimation< tRect >::IsOfType().

int CAnimation::LoadXML TiXmlNode pDataNode,
CString  strFilename
[virtual]
 

Method details:

Parameters:
pDataNode - Pointer to XML Node that holds data for the animation
strFilename - String containing filename where the data for the animation is stored

Reimplemented from CXMLResource.

Reimplemented in CFrameAnimation< TAnimation >, CTextureFrameAnimation, and CFrameAnimation< tRect >.

Definition at line 39 of file Animation.cpp.

References TiXmlElement::Attribute(), CXMLResource::LoadXML(), and TiXmlNode::pcValue().

Referenced by CAnimationManager::LoadResource(), and CFrameAnimation< tRect >::LoadXML().

int CAnimation::Pause double  fPauseTime = INFINITE  )  [virtual]
 

Method details:

Parameters:
fPauseTime - Pause for infinite amount of time or one specified by user
Returns:
1 If animation is paused, 0 otherwise

Reimplemented in CFrameAnimation< TAnimation >, CTextureFrameAnimation, and CFrameAnimation< tRect >.

Definition at line 20 of file Animation.cpp.

int CAnimation::Resume double  fTimeToWait = 0  )  [virtual]
 

Method details:

Parameters:
fTimeToWait - Time to wait before resuming the animation
Returns:
1 If it is still waiting, 0 otherwise

Reimplemented in CFrameAnimation< TAnimation >, CTextureFrameAnimation, and CFrameAnimation< tRect >.

Definition at line 26 of file Animation.cpp.

int CAnimation::SaveXML TiXmlNode pDataNode,
CString  strFilename
[virtual]
 

Method details:

Parameters:
pDataNode - Pointer to XML Node that will be the parent hold the data for this animation
strFilename - String containing filename where the data for the animation is stored

Reimplemented from CXMLResource.

Reimplemented in CFrameAnimation< TAnimation >, CTextureFrameAnimation, and CFrameAnimation< tRect >.

Definition at line 63 of file Animation.cpp.

Referenced by CFrameAnimation< tRect >::SaveXML(), and CAnimationManager::SaveXML().

int CAnimation::Stop  )  [virtual]
 

Method details:

Returns:
1 If animation has been stopped, 0 otherwise

Reimplemented in CFrameAnimation< TAnimation >, CTextureFrameAnimation, and CFrameAnimation< tRect >.

Definition at line 32 of file Animation.cpp.


The documentation for this class was generated from the following files:
Generated on Sun Jul 17 21:34:28 2005 for OpenGL GUI by doxygen 1.3.8