FIFE
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
FIFE::ActionVisual Class Reference

Action visual contains data that is needed to visualize different actions on screen. More...

#include <visual.h>

+ Inheritance diagram for FIFE::ActionVisual:
+ Collaboration diagram for FIFE::ActionVisual:

Public Member Functions

virtual ~ActionVisual ()
 Destructor. More...
 
void addAnimation (uint32_t angle, AnimationPtr animationptr)
 Adds new animation with given angle (degrees) More...
 
AnimationPtr getAnimationByAngle (int32_t angle)
 Gets index to animation closest to given angle. More...
 
void getActionImageAngles (std::vector< int32_t > &angles)
 Returns list of available angles for this Action. More...
 
- Public Member Functions inherited from FIFE::Visual2DGfx
virtual ~Visual2DGfx ()
 Destructor. More...
 
- Public Member Functions inherited from FIFE::IVisual
virtual ~IVisual ()
 

Static Public Member Functions

static ActionVisualcreate (Action *action)
 Constructs and assigns it to the passed item. More...
 

Private Types

typedef std::map< uint32_t,
AnimationPtr
AngleAnimationMap
 

Private Member Functions

 ActionVisual ()
 Constructor. More...
 

Private Attributes

AngleAnimationMap m_animation_map
 
type_angle2id m_map
 

Additional Inherited Members

- Protected Member Functions inherited from FIFE::Visual2DGfx
 Visual2DGfx ()
 Constructor. More...
 

Detailed Description

Action visual contains data that is needed to visualize different actions on screen.

Definition at line 165 of file visual.h.

Member Typedef Documentation

typedef std::map<uint32_t, AnimationPtr> FIFE::ActionVisual::AngleAnimationMap
private

Definition at line 194 of file visual.h.

Constructor & Destructor Documentation

FIFE::ActionVisual::~ActionVisual ( )
virtual

Destructor.

Definition at line 156 of file visual.cpp.

FIFE::ActionVisual::ActionVisual ( )
private

Constructor.

Definition at line 144 of file visual.cpp.

Referenced by create().

+ Here is the caller graph for this function:

Member Function Documentation

void FIFE::ActionVisual::addAnimation ( uint32_t  angle,
AnimationPtr  animationptr 
)

Adds new animation with given angle (degrees)

Definition at line 159 of file visual.cpp.

References m_animation_map, and m_map.

Referenced by FIFE::ObjectLoader::load().

+ Here is the caller graph for this function:

ActionVisual * FIFE::ActionVisual::create ( Action action)
static

Constructs and assigns it to the passed item.

Definition at line 147 of file visual.cpp.

References ActionVisual(), FIFE::Action::adoptVisual(), and FIFE::Action::getVisual().

Referenced by FIFE::ObjectLoader::load().

+ Here is the caller graph for this function:

void FIFE::ActionVisual::getActionImageAngles ( std::vector< int32_t > &  angles)

Returns list of available angles for this Action.

Definition at line 169 of file visual.cpp.

References m_animation_map.

AnimationPtr FIFE::ActionVisual::getAnimationByAngle ( int32_t  angle)

Gets index to animation closest to given angle.

Returns
animation index, -1 if no animations available

Definition at line 164 of file visual.cpp.

References FIFE::getIndexByAngle(), m_animation_map, and m_map.

Member Data Documentation

AngleAnimationMap FIFE::ActionVisual::m_animation_map
private

Definition at line 195 of file visual.h.

Referenced by addAnimation(), getActionImageAngles(), and getAnimationByAngle().

type_angle2id FIFE::ActionVisual::m_map
private

Definition at line 199 of file visual.h.

Referenced by addAnimation(), and getAnimationByAngle().


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