|
FIFE
|
Object visual contains data that is needed for visualizing objects. More...
#include <visual.h>
Inheritance diagram for FIFE::ObjectVisual:
Collaboration diagram for FIFE::ObjectVisual:Public Member Functions | |
| virtual | ~ObjectVisual () |
| Destructor. More... | |
| void | 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. More... | |
| int32_t | getStaticImageIndexByAngle (int32_t angle) |
| Returns closest matching static image for given angle. More... | |
| void | addStaticColorOverlay (uint32_t angle, const OverlayColors &colors) |
| Adds new static color overlay with given angle (degrees). More... | |
| OverlayColors * | getStaticColorOverlay (int32_t angle) |
| Returns closest matching static color overlay for given angle. More... | |
| void | removeStaticColorOverlay (int32_t angle) |
| Removes a static color overlay with given angle (degrees). More... | |
| int32_t | getClosestMatchingAngle (int32_t angle) |
| Returns closest matching image angle for given angle. More... | |
| void | getStaticImageAngles (std::vector< int32_t > &angles) |
| Returns list of available static image angles for this object. More... | |
| bool | isColorOverlay () |
| Indicates if there exists a color overlay. 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 ObjectVisual * | create (Object *object) |
| Constructs and assigns it to the passed item. More... | |
Private Types | |
| typedef std::map< uint32_t, OverlayColors > | AngleColorOverlayMap |
Private Member Functions | |
| ObjectVisual () | |
| Constructor. More... | |
Private Attributes | |
| type_angle2id | m_angle2img |
| AngleColorOverlayMap | m_colorOverlayMap |
| type_angle2id | m_map |
Additional Inherited Members | |
Protected Member Functions inherited from FIFE::Visual2DGfx | |
| Visual2DGfx () | |
| Constructor. More... | |
Object visual contains data that is needed for visualizing objects.
|
private |
|
virtual |
Destructor.
Definition at line 110 of file visual.cpp.
|
private |
Constructor.
Definition at line 98 of file visual.cpp.
Referenced by create().
Here is the caller graph for this function:| void FIFE::ObjectVisual::addStaticColorOverlay | ( | uint32_t | angle, |
| const OverlayColors & | colors | ||
| ) |
Adds new static color overlay with given angle (degrees).
Definition at line 122 of file visual.cpp.
References FIFE::OverlayColors::changeColor(), FIFE::OverlayColors::getColorOverlayImage(), FIFE::OverlayColors::getColors(), m_colorOverlayMap, m_map, and FIFE::OverlayColors::setColorOverlayImage().
Referenced by FIFE::Instance::addStaticColorOverlay().
Here is the caller graph for this function:| 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.
| 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 113 of file visual.cpp.
References m_angle2img.
Referenced by FIFE::ObjectLoader::load(), and FIFE::AtlasLoader::parseObject().
Here is the caller graph for this function:
|
static |
Constructs and assigns it to the passed item.
Definition at line 101 of file visual.cpp.
References FIFE::Object::getVisual(), and ObjectVisual().
Referenced by FIFE::Instance::createOwnObject(), FIFE::ObjectLoader::load(), and FIFE::AtlasLoader::parseObject().
Here is the caller graph for this function:| int32_t FIFE::ObjectVisual::getClosestMatchingAngle | ( | int32_t | angle | ) |
Returns closest matching image angle for given angle.
Definition at line 157 of file visual.cpp.
References FIFE::getIndexByAngle(), and m_angle2img.
| OverlayColors * FIFE::ObjectVisual::getStaticColorOverlay | ( | int32_t | angle | ) |
Returns closest matching static color overlay for given angle.
Definition at line 139 of file visual.cpp.
References FIFE::getIndexByAngle(), m_colorOverlayMap, and m_map.
Referenced by FIFE::Instance::getStaticColorOverlay(), and FIFE::RenderItem::getStaticImageIndexByAngle().
Here is the caller graph for this function:| void FIFE::ObjectVisual::getStaticImageAngles | ( | std::vector< int32_t > & | angles | ) |
Returns list of available static image angles for this object.
Definition at line 163 of file visual.cpp.
References m_angle2img.
Referenced by FIFE::MapLoader::load().
Here is the caller graph for this function:| int32_t FIFE::ObjectVisual::getStaticImageIndexByAngle | ( | int32_t | angle | ) |
Returns closest matching static image for given angle.
Definition at line 117 of file visual.cpp.
References FIFE::getIndexByAngle(), and m_angle2img.
Referenced by FIFE::RenderItem::getStaticImageIndexByAngle().
Here is the caller graph for this function:
|
inline |
Indicates if there exists a color overlay.
Definition at line 141 of file visual.h.
References m_colorOverlayMap.
Referenced by FIFE::RenderItem::getStaticImageIndexByAngle(), and FIFE::Instance::isStaticColorOverlay().
Here is the caller graph for this function:| void FIFE::ObjectVisual::removeStaticColorOverlay | ( | int32_t | angle | ) |
Removes a static color overlay with given angle (degrees).
Definition at line 147 of file visual.cpp.
References FIFE::getIndexByAngle(), m_colorOverlayMap, and m_map.
Referenced by FIFE::Instance::removeStaticColorOverlay().
Here is the caller graph for this function:
|
private |
Definition at line 148 of file visual.h.
Referenced by addStaticImage(), getClosestMatchingAngle(), getStaticImageAngles(), and getStaticImageIndexByAngle().
|
private |
Definition at line 151 of file visual.h.
Referenced by addStaticColorOverlay(), getStaticColorOverlay(), isColorOverlay(), and removeStaticColorOverlay().
|
private |
Definition at line 152 of file visual.h.
Referenced by addStaticColorOverlay(), getStaticColorOverlay(), and removeStaticColorOverlay().