FIFE  2008.0
 All Classes Namespaces Functions Variables Enumerations Enumerator Pages
FIFE::ObjectVisual Class Reference

#include <visual.h>

Inheritance diagram for FIFE::ObjectVisual:
Inheritance graph
Collaboration diagram for FIFE::ObjectVisual:
Collaboration graph

Public Member Functions

virtual ~ObjectVisual ()
void addStaticImage (uint32_t angle, int32_t image_index)
int32_t getStaticImageIndexByAngle (int32_t angle)
int32_t getClosestMatchingAngle (int32_t angle)
void getStaticImageAngles (std::vector< int32_t > &angles)
- Public Member Functions inherited from FIFE::Visual2DGfx
virtual ~Visual2DGfx ()
void setTransparency (uint8_t transparency)
uint32_t getTransparency ()
void setVisible (bool visible)
uint32_t isVisible ()

Static Public Member Functions

static ObjectVisualcreate (Object *object)

Additional Inherited Members

- Protected Member Functions inherited from FIFE::Visual2DGfx
 Visual2DGfx ()

Detailed Description

Object visual contains data that is needed for visualizing objects

Definition at line 89 of file visual.h.

Constructor & Destructor Documentation

FIFE::ObjectVisual::~ObjectVisual ( )
virtual

Destructor

Definition at line 62 of file visual.cpp.

Member Function Documentation

void FIFE::ObjectVisual::addStaticImage ( uint32_t  angle,
int32_t  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

Parameters
angleangle for image. 0 degrees starts from right and turns counter-clockwise (normal math notation)
image_indexindex 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().

int32_t FIFE::ObjectVisual::getClosestMatchingAngle ( int32_t  angle)

Returns closest matching image angle for given angle

Returns
closest matching angle

Definition at line 74 of file visual.cpp.

References FIFE::getIndexByAngle().

void FIFE::ObjectVisual::getStaticImageAngles ( std::vector< int32_t > &  angles)

Returns list of available static image angles for this object

Definition at line 80 of file visual.cpp.

int32_t FIFE::ObjectVisual::getStaticImageIndexByAngle ( int32_t  angle)

Returns closest matching static image for given angle

Returns
id for static image

Definition at line 69 of file visual.cpp.

References FIFE::getIndexByAngle().


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