FIFE  6e1afdbeda11afe9ac53e6023a4be96ef88f1dc6
FIFE::RenderItem Class Reference

#include <renderitem.h>

+ Collaboration diagram for FIFE::RenderItem:

Public Member Functions

 RenderItem (Instance *parent)
 
 ~RenderItem ()
 
int32_t getStaticImageIndexByAngle (uint32_t angle, Instance *instance)
 Returns closest matching static image for given angle. More...
 
void setAnimationOverlay (std::vector< ImagePtr > *ao, std::vector< OverlayColors * > *aco)
 Sets AnimationOverlay and if available AnimationOverlayColors. More...
 
std::vector< ImagePtr > * getAnimationOverlay () const
 Returns pointer to AnimationOverlay vector. More...
 
std::vector< OverlayColors * > * getAnimationColorOverlay () const
 Returns pointer to AnimationColorOverlay vector. More...
 
void setColorOverlay (OverlayColors *co)
 Sets single ColorOverlay. More...
 
OverlayColorsgetColorOverlay () const
 Returns pointer to single ColorOverlay. More...
 
void deleteOverlayData ()
 Deletes OverlayData. More...
 
void reset ()
 Resets the important values. More...
 

Public Attributes

Instanceinstance
 
DoublePoint3D screenpoint
 
Rect bbox
 
Rect dimensions
 
float vertexZ
 
ImagePtr image
 
int32_t facingAngle
 
uint8_t transparency
 
int32_t currentFrame
 
OverlayDatam_overlay
 

Private Attributes

int32_t m_cachedStaticImgId
 
int32_t m_cachedStaticImgAngle
 

Detailed Description

Definition at line 54 of file renderitem.h.

Constructor & Destructor Documentation

FIFE::RenderItem::RenderItem ( Instance parent)

Definition at line 52 of file renderitem.cpp.

FIFE::RenderItem::~RenderItem ( )

Definition at line 65 of file renderitem.cpp.

References m_overlay.

Member Function Documentation

void FIFE::RenderItem::deleteOverlayData ( )

Deletes OverlayData.

Definition at line 129 of file renderitem.cpp.

References m_overlay.

Referenced by reset(), and FIFE::LayerCache::updateVisual().

+ Here is the caller graph for this function:

std::vector< OverlayColors * > * FIFE::RenderItem::getAnimationColorOverlay ( ) const

Returns pointer to AnimationColorOverlay vector.

Returns 0 if no OverlayData or AnimationColorOverlay exists.

Definition at line 108 of file renderitem.cpp.

References FIFE::OverlayData::animationColorOverlays, and m_overlay.

Referenced by FIFE::InstanceRenderer::renderOverlay().

+ Here is the caller graph for this function:

std::vector< ImagePtr > * FIFE::RenderItem::getAnimationOverlay ( ) const

Returns pointer to AnimationOverlay vector.

Returns 0 if no OverlayData or AnimationOverlay exists.

Definition at line 101 of file renderitem.cpp.

References FIFE::OverlayData::animationOverlayImages, and m_overlay.

Referenced by FIFE::InstanceRenderer::bindMultiOutline(), FIFE::InstanceRenderer::bindOutline(), FIFE::Camera::getMatchingInstances(), and FIFE::InstanceRenderer::renderOverlay().

+ Here is the caller graph for this function:

OverlayColors * FIFE::RenderItem::getColorOverlay ( ) const

Returns pointer to single ColorOverlay.

Returns 0 if no OverlayData or ColorOverlay exists.

Definition at line 122 of file renderitem.cpp.

References FIFE::OverlayData::colorOverlay, and m_overlay.

Referenced by FIFE::InstanceRenderer::getMultiColorOverlay(), and FIFE::InstanceRenderer::renderOverlay().

+ Here is the caller graph for this function:

int32_t FIFE::RenderItem::getStaticImageIndexByAngle ( uint32_t  angle,
Instance instance 
)
void FIFE::RenderItem::reset ( )

Resets the important values.

Definition at line 136 of file renderitem.cpp.

References currentFrame, deleteOverlayData(), dimensions, image, instance, m_cachedStaticImgId, FIFE::SharedPtr< T >::reset(), FIFE::STATIC_IMAGE_NOT_INITIALIZED, and transparency.

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

+ Here is the caller graph for this function:

void FIFE::RenderItem::setAnimationOverlay ( std::vector< ImagePtr > *  ao,
std::vector< OverlayColors * > *  aco 
)

Sets AnimationOverlay and if available AnimationOverlayColors.

Note: Ownership of the vectors do change.

Definition at line 93 of file renderitem.cpp.

References FIFE::OverlayData::animationColorOverlays, FIFE::OverlayData::animationOverlayImages, and m_overlay.

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

+ Here is the caller graph for this function:

void FIFE::RenderItem::setColorOverlay ( OverlayColors co)

Sets single ColorOverlay.

Note: Ownership does not change.

Definition at line 115 of file renderitem.cpp.

References FIFE::OverlayData::colorOverlay, and m_overlay.

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

+ Here is the caller graph for this function:

Member Data Documentation

Rect FIFE::RenderItem::bbox
int32_t FIFE::RenderItem::currentFrame

Definition at line 121 of file renderitem.h.

Referenced by reset(), and FIFE::LayerCache::updateVisual().

int32_t FIFE::RenderItem::facingAngle

Definition at line 115 of file renderitem.h.

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

int32_t FIFE::RenderItem::m_cachedStaticImgAngle
private

Definition at line 127 of file renderitem.h.

Referenced by getStaticImageIndexByAngle().

int32_t FIFE::RenderItem::m_cachedStaticImgId
private

Definition at line 126 of file renderitem.h.

Referenced by getStaticImageIndexByAngle(), and reset().

float FIFE::RenderItem::vertexZ

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