CrystalSpace

Public API Reference

Main Page   Modules   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

csAnimationTemplate Class Reference

A 2d animation template. This class is used to create animated pixmaps. More...

#include <csanim2d.h>

List of all members.

Public Methods

 csAnimationTemplate ()
 build a new animation. More...

 ~csAnimationTemplate ()
 destructor. More...

int GetFrameCount () const
 get number of frames. More...

csTicks GetLength () const
 get total length of animation (all delays added together). More...

void AddFrame (csTicks Delay, csPixmap *s)
 add a frame. (giving the length of this frame). More...

void AddFrame (csTicks Delay, iTextureHandle *Tex)
 add a frame (giving the length of this frame). More...

void AddFrame (csTicks Delay, iTextureHandle *Tex, int x, int y, int w, int h)
 add a frame (giving the length of this frame). More...

csPixmap * GetFrame (int n) const
 get a frame by number. More...

csPixmap * GetFrameByTime (csTicks Time)
 get a frame by time. More...

csAnimatedPixmap * CreateInstance ()
 create an instance of this animation. More...


Detailed Description

A 2d animation template. This class is used to create animated pixmaps.

Definition at line 32 of file csanim2d.h.


Constructor & Destructor Documentation

csAnimationTemplate::csAnimationTemplate (    ) 
 

build a new animation.

csAnimationTemplate::~csAnimationTemplate (    ) 
 

destructor.


Member Function Documentation

void csAnimationTemplate::AddFrame (  csTicks    Delay,
iTextureHandle *    Tex,
int    x,
int    y,
int    w,
int    h
)  [inline]
 

add a frame (giving the length of this frame).

Definition at line 62 of file csanim2d.h.

References AddFrame, and csTicks.

void csAnimationTemplate::AddFrame (  csTicks    Delay,
iTextureHandle *    Tex
)  [inline]
 

add a frame (giving the length of this frame).

Definition at line 59 of file csanim2d.h.

References AddFrame, and csTicks.

void csAnimationTemplate::AddFrame (  csTicks    Delay,
csPixmap *    s
)  [inline]
 

add a frame. (giving the length of this frame).

Definition at line 56 of file csanim2d.h.

References csTicks, GetLength, csPDelArray::Push, and csBasicVector::Push.

Referenced by AddFrame.

csAnimatedPixmap* csAnimationTemplate::CreateInstance (    ) 
 

create an instance of this animation.

csPixmap* csAnimationTemplate::GetFrame (  int    n )  const [inline]
 

get a frame by number.

Definition at line 66 of file csanim2d.h.

References csPDelArray::Get.

csPixmap* csAnimationTemplate::GetFrameByTime (  csTicks    Time ) 
 

get a frame by time.

int csAnimationTemplate::GetFrameCount (    )  const [inline]
 

get number of frames.

Definition at line 50 of file csanim2d.h.

References csPDelArray::Length.

Referenced by GetLength.

csTicks csAnimationTemplate::GetLength (    )  const [inline]
 

get total length of animation (all delays added together).

Definition at line 53 of file csanim2d.h.

References csTicks, csBasicVector::Get, and GetFrameCount.

Referenced by AddFrame.


The documentation for this class was generated from the following file:
Generated for Crystal Space by doxygen 1.2.14