FIFE  6e1afdbeda11afe9ac53e6023a4be96ef88f1dc6
FIFE::QuadTreeRenderer Class Reference

#include <quadtreerenderer.h>

+ Inheritance diagram for FIFE::QuadTreeRenderer:
+ Collaboration diagram for FIFE::QuadTreeRenderer:

Public Member Functions

 QuadTreeRenderer (RenderBackend *renderbackend, int32_t position)
 constructor. More...
 
 QuadTreeRenderer (const QuadTreeRenderer &old)
 
RendererBaseclone ()
 Makes copy of this renderer. More...
 
virtual ~QuadTreeRenderer ()
 Destructor. More...
 
void render (Camera *cam, Layer *layer, RenderList &instances)
 This method is called by the view to ask renderer to draw its rendering aspect based on given parameters. More...
 
std::string getName ()
 Name of the renderer. More...
 
- Public Member Functions inherited from FIFE::RendererBase
 RendererBase (RenderBackend *renderbackend, int32_t position)
 Constructor. More...
 
 RendererBase (const RendererBase &old)
 Copy Constructor. More...
 
virtual ~RendererBase ()
 Destructor. More...
 
int32_t getPipelinePosition () const
 Gets renderer position in the rendering pipeline. More...
 
void setPipelinePosition (int32_t position)
 Sets renderer position in the rendering pipeline Pipeline position defines in which order view calls the renderers when update occurs Note that renderers are called once per rendered layer, thus to update the whole screen, renderer might receive multiple calls. More...
 
virtual void setEnabled (bool enabled)
 Enables renderer. More...
 
virtual void reset ()
 Resets information in the renderer. More...
 
bool isEnabled () const
 Is renderer enabled. More...
 
void setRendererListener (IRendererListener *listener)
 Sets listener for renderer. More...
 
void addActiveLayer (Layer *layer)
 Adds active layer to renderer. More...
 
void removeActiveLayer (Layer *layer)
 Removes active layer from renderer. More...
 
void clearActiveLayers ()
 Clears all active layers from renderer. More...
 
void activateAllLayers (Map *elevation)
 Activates all layers from given elevation. More...
 
bool isActivedLayer (Layer *layer)
 Returns if given layer is currently activated. More...
 
std::list< Layer * > getActiveLayers () const
 Returns list of activated layer. More...
 

Additional Inherited Members

- Protected Member Functions inherited from FIFE::RendererBase
 RendererBase ()
 
- Protected Attributes inherited from FIFE::RendererBase
std::list< Layer * > m_active_layers
 
RenderBackendm_renderbackend
 

Detailed Description

Definition at line 52 of file quadtreerenderer.h.

Constructor & Destructor Documentation

FIFE::QuadTreeRenderer::QuadTreeRenderer ( RenderBackend renderbackend,
int32_t  position 
)

constructor.

Parameters
renderbackendto use
positionposition for this renderer in rendering pipeline

Definition at line 51 of file quadtreerenderer.cpp.

References FIFE::RendererBase::setEnabled().

Referenced by clone().

+ Here is the caller graph for this function:

FIFE::QuadTreeRenderer::QuadTreeRenderer ( const QuadTreeRenderer old)

Definition at line 56 of file quadtreerenderer.cpp.

References FIFE::RendererBase::setEnabled().

FIFE::QuadTreeRenderer::~QuadTreeRenderer ( )
virtual

Destructor.

Definition at line 65 of file quadtreerenderer.cpp.

Member Function Documentation

RendererBase * FIFE::QuadTreeRenderer::clone ( )
virtual

Makes copy of this renderer.

Implements FIFE::RendererBase.

Definition at line 61 of file quadtreerenderer.cpp.

References QuadTreeRenderer().

std::string FIFE::QuadTreeRenderer::getName ( )
inlinevirtual

Name of the renderer.

Implements FIFE::RendererBase.

Definition at line 70 of file quadtreerenderer.h.

void FIFE::QuadTreeRenderer::render ( Camera cam,
Layer layer,
RenderList instances 
)
virtual

This method is called by the view to ask renderer to draw its rendering aspect based on given parameters.

Renderers receive non-clipped instance stack since there is no way to know which information is relevant for the renderer. E.g. effect renderer might need to know offscreen instance locations to be able to draw radiation coming from some instance not visible on the screen.

Parameters
camcamera view to draw
layercurrent layer to be rendered
instancesinstances on the current layer @ see setPipelinePosition

Implements FIFE::RendererBase.

Definition at line 106 of file quadtreerenderer.cpp.

References FIFE::_log, FIFE::InstanceTree::applyVisitor(), FL_WARN, FIFE::Layer::getCellGrid(), FIFE::Layer::getInstanceTree(), and FIFE::RendererBase::m_renderbackend.


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