FIFE
2008.0
|
#include <visual.h>
Public Member Functions | |
virtual | ~ObjectVisual () |
void | addStaticImage (unsigned int angle, int image_index) |
int | getStaticImageIndexByAngle (int angle) |
int | getClosestMatchingAngle (int angle) |
void | getStaticImageAngles (std::vector< int > &angles) |
Static Public Member Functions | |
static ObjectVisual * | create (Object *object) |
Object visual contains data that is needed for visualizing objects
FIFE::ObjectVisual::~ObjectVisual | ( | ) | [virtual] |
Destructor
Definition at line 62 of file visual.cpp.
void FIFE::ObjectVisual::addStaticImage | ( | unsigned int | angle, |
int | image_index | ||
) |
Adds new static image with given angle (degrees) Static images are used in case there are no actions active in the instance There can be several static images for different angles, that are used in case view / layer is rotated In case there are no exact matches for current view angles, closest one is used
angle | angle for image. 0 degrees starts from right and turns counter-clockwise (normal math notation) |
image_index | index of image to use for given degress |
Definition at line 65 of file visual.cpp.
ObjectVisual * FIFE::ObjectVisual::create | ( | Object * | object | ) | [static] |
Constructs and assigns it to the passed item
Definition at line 53 of file visual.cpp.
References FIFE::Object::getVisual().
int FIFE::ObjectVisual::getClosestMatchingAngle | ( | int | angle | ) |
Returns closest matching image angle for given angle
Definition at line 74 of file visual.cpp.
References FIFE::getIndexByAngle().
void FIFE::ObjectVisual::getStaticImageAngles | ( | std::vector< int > & | angles | ) |
Returns list of available static image angles for this object
Definition at line 80 of file visual.cpp.
int FIFE::ObjectVisual::getStaticImageIndexByAngle | ( | int | angle | ) |
Returns closest matching static image for given angle
Definition at line 69 of file visual.cpp.
References FIFE::getIndexByAngle().