Athena IO Library
athena::Sakura::Sprite Class Reference
Collaboration diagram for athena::Sakura::Sprite:
Collaboration graph

Public Member Functions

 Sprite (SpriteFile *root)
 
 Sprite (SpriteFile *root, const std::string &name)
 
virtual void setPosition (const float x, const float y)
 
virtual void setPosition (const Vector2Df &pos)
 
virtual Vector2Df position () const
 
void setName (const std::string &name)
 
std::string name () const
 
void addStateId (int id)
 
int stateId (int index) const
 Returns the texture id of a given state. More...
 
void setStateIds (std::vector< int > ids)
 
std::vector< int > stateIds () const
 
atUint32 stateCount () const
 
void setCurrentState (atUint32 id)
 
atUint32 currentState () const
 
bool addFrame (SpriteFrame *Frame)
 
bool removeFrame (SpriteFrame *Frame)
 
SpriteFrameFrame (atUint32 id)
 
void setFrame (atUint32 id)
 
void setFrames (std::vector< SpriteFrame * > frames)
 
atUint32 frameCount () const
 
std::vector< SpriteFrame * > frames () const
 
SpriteFilecontainer () const
 
void setCurrentFrame (SpriteFrame *frame)
 
void setCurrentFrame (atUint32 id)
 
SpriteFramecurrentFrame () const
 
void advanceFrame ()
 
void retreatFrame ()
 
void setRoot (SpriteFile *root)
 
SpriteFileroot () const
 

Detailed Description

Definition at line 23 of file Sprite.hpp.

Member Function Documentation

int athena::Sakura::Sprite::stateId ( int  index) const

Returns the texture id of a given state.

Parameters
indexThe index of the id.
Returns
return the state id if it exists, -1 otherwise

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