CrystalSpace

Public API Reference

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

iSprite2DUVAnimation Struct Reference

The animation works by having all frames of an animation sequence in a texture at different (u,v) locations, hence the name. More...

#include <sprite2d.h>

Inheritance diagram for iSprite2DUVAnimation:

iBase List of all members.

Public Methods

virtual void SetName (const char *name)=0
 Give this sequence a name. More...

virtual const char * GetName ()=0
 return the name of this sequence. More...

virtual int GetFrameCount ()=0
 Retrieve the number of frames in this animation. More...

virtual iSprite2DUVAnimationFrameGetFrame (int idx)=0
 Get the <idx>-th frame in the animation. More...

virtual iSprite2DUVAnimationFrameGetFrame (const char *name)=0
 Get the frame <name> in the animation. More...

virtual iSprite2DUVAnimationFrameCreateFrame (int idx)=0
 Create a new frame that will be inserted before the <idx> frame. More...

virtual void MoveFrame (int frame, int idx)=0
 Move the <frame>-th frame before the <idx>-th frame. More...

virtual void RemoveFrame (int idx)=0
 Remove the <idx>-th from the animation. More...


Detailed Description

The animation works by having all frames of an animation sequence in a texture at different (u,v) locations, hence the name.

So it is basically a set of (u,v) coordinates plus a duration number. for every frame.

Definition at line 107 of file sprite2d.h.


Member Function Documentation

virtual iSprite2DUVAnimationFrame* iSprite2DUVAnimation::CreateFrame int    idx [pure virtual]
 

Create a new frame that will be inserted before the <idx> frame.

Set <idx> to -1 to append the frame to the sequence.

virtual iSprite2DUVAnimationFrame* iSprite2DUVAnimation::GetFrame const char *    name [pure virtual]
 

Get the frame <name> in the animation.

virtual iSprite2DUVAnimationFrame* iSprite2DUVAnimation::GetFrame int    idx [pure virtual]
 

Get the <idx>-th frame in the animation.

Set idx to -1 to get the current to be played.

virtual int iSprite2DUVAnimation::GetFrameCount   [pure virtual]
 

Retrieve the number of frames in this animation.

virtual const char* iSprite2DUVAnimation::GetName   [pure virtual]
 

return the name of this sequence.

virtual void iSprite2DUVAnimation::MoveFrame int    frame,
int    idx
[pure virtual]
 

Move the <frame>-th frame before the <idx>-th frame.

Set idx to -1 to move the frame to the end of the sequence.

virtual void iSprite2DUVAnimation::RemoveFrame int    idx [pure virtual]
 

Remove the <idx>-th from the animation.

virtual void iSprite2DUVAnimation::SetName const char *    name [pure virtual]
 

Give this sequence a name.


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