FIFE  6e1afdbeda11afe9ac53e6023a4be96ef88f1dc6
FIFE::InstanceVisual Class Reference

Instance visual contains data that is needed to visualize the instance on screen. More...

#include <visual.h>

+ Inheritance diagram for FIFE::InstanceVisual:
+ Collaboration diagram for FIFE::InstanceVisual:

Public Member Functions

virtual ~InstanceVisual ()
 Destructor. More...
 
void setTransparency (uint8_t transparency)
 Sets transparency value for object to be visualized. More...
 
uint8_t getTransparency ()
 Gets current transparency value (0-255) More...
 
void setVisible (bool visible)
 Sets visibility value for object to be visualized. More...
 
bool isVisible ()
 Is instance visible or not. More...
 
void setStackPosition (int32_t stackposition)
 Sets stack position of the instance Stack position is used to define the order in which instances residing in the same location are drawn. More...
 
int32_t getStackPosition ()
 Gets current stack position of instance. 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 InstanceVisualcreate (Instance *instance)
 Constructs and assigns it to the passed item. More...
 

Private Member Functions

 InstanceVisual ()
 Constructor. More...
 

Private Attributes

uint8_t m_transparency
 
bool m_visible
 
int32_t m_stackposition
 
Instancem_instance
 

Additional Inherited Members

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

Detailed Description

Instance visual contains data that is needed to visualize the instance on screen.

Definition at line 158 of file visual.h.

Constructor & Destructor Documentation

FIFE::InstanceVisual::~InstanceVisual ( )
virtual

Destructor.

Definition at line 189 of file visual.cpp.

FIFE::InstanceVisual::InstanceVisual ( )
private

Constructor.

Definition at line 172 of file visual.cpp.

Referenced by create().

+ Here is the caller graph for this function:

Member Function Documentation

InstanceVisual * FIFE::InstanceVisual::create ( Instance instance)
static

Constructs and assigns it to the passed item.

Definition at line 179 of file visual.cpp.

References FIFE::Instance::getVisual(), InstanceVisual(), m_instance, and FIFE::Instance::setVisual().

Referenced by FIFE::Instance::Instance(), and FIFE::MapLoader::load().

+ Here is the caller graph for this function:

int32_t FIFE::InstanceVisual::getStackPosition ( )

Gets current stack position of instance.

Returns
current stack position

Definition at line 221 of file visual.cpp.

References m_stackposition.

Referenced by FIFE::InstanceDistanceSortCamera::operator()(), FIFE::InstanceDistanceSortLocation::operator()(), FIFE::InstanceDistanceSortCameraAndLocation::operator()(), FIFE::MapSaver::save(), and FIFE::LayerCache::sortRenderList().

+ Here is the caller graph for this function:

uint8_t FIFE::InstanceVisual::getTransparency ( )

Gets current transparency value (0-255)

Returns
current transparency value

Definition at line 199 of file visual.cpp.

References m_transparency.

Referenced by FIFE::LayerCache::updateVisual().

+ Here is the caller graph for this function:

bool FIFE::InstanceVisual::isVisible ( )

Is instance visible or not.

Returns
is instance visible or not

Definition at line 210 of file visual.cpp.

References m_visible.

Referenced by FIFE::InstanceRenderer::renderAlreadySorted(), FIFE::InstanceRenderer::renderUnsorted(), and FIFE::LayerCache::updateVisual().

+ Here is the caller graph for this function:

void FIFE::InstanceVisual::setStackPosition ( int32_t  stackposition)

Sets stack position of the instance Stack position is used to define the order in which instances residing in the same location are drawn.

Parameters
stackpositionnew stack position

Definition at line 214 of file visual.cpp.

References FIFE::Instance::callOnStackPositionChange(), m_instance, and m_stackposition.

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

+ Here is the caller graph for this function:

void FIFE::InstanceVisual::setTransparency ( uint8_t  transparency)

Sets transparency value for object to be visualized.

Parameters
transparencyset the transparency

Definition at line 192 of file visual.cpp.

References FIFE::Instance::callOnTransparencyChange(), m_instance, and m_transparency.

void FIFE::InstanceVisual::setVisible ( bool  visible)

Sets visibility value for object to be visualized.

Parameters
visibleis object visible or not

Definition at line 203 of file visual.cpp.

References FIFE::Instance::callOnVisibleChange(), m_instance, and m_visible.

Referenced by FIFE::InstanceRenderer::renderAlreadySorted(), and FIFE::InstanceRenderer::renderUnsorted().

+ Here is the caller graph for this function:

Member Data Documentation

Instance* FIFE::InstanceVisual::m_instance
private

Definition at line 207 of file visual.h.

Referenced by create(), setStackPosition(), setTransparency(), and setVisible().

int32_t FIFE::InstanceVisual::m_stackposition
private

Definition at line 206 of file visual.h.

Referenced by getStackPosition(), and setStackPosition().

uint8_t FIFE::InstanceVisual::m_transparency
private

Definition at line 204 of file visual.h.

Referenced by getTransparency(), and setTransparency().

bool FIFE::InstanceVisual::m_visible
private

Definition at line 205 of file visual.h.

Referenced by isVisible(), and setVisible().


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