Visualization Library 2.1.0

A lightweight C++ OpenGL middleware for 2D/3D graphics

VL     Star     Watch     Fork     Issue

[Download] [Tutorials] [All Classes] [Grouped Classes]
Public Member Functions | Protected Attributes | List of all members
vl::RenderingTree Class Reference

The RenderingTree class organizes a set of renderings into an N-ary tree. More...

#include <RenderingTree.hpp>

+ Inheritance diagram for vl::RenderingTree:

Public Member Functions

 RenderingTree ()
 Constructor. More...
 
 RenderingTree (const RenderingTree &other)
 Copy constructor. More...
 
RenderingTreeoperator= (const RenderingTree &other)
 Assignment operator. More...
 
virtual void render ()
 Recursively calls the render() method of its children. More...
 
Collection< RenderingAbstract > * subRenderings ()
 The sub-Rendering (or child-Rendering) objects of a Rendering. A sub-Rendering is rendered before it's parent and after its children. More...
 
const Collection< RenderingAbstract > * subRenderings () const
 The sub-Rendering (or child-Rendering) objects of a Rendering. A sub-Rendering is rendered before it's parent and after its children. More...
 
- Public Member Functions inherited from vl::RenderingAbstract
 RenderingAbstract ()
 Constructor. More...
 
 RenderingAbstract (const RenderingAbstract &)=default
 Copy Constructor. More...
 
RenderingAbstractoperator= (const RenderingAbstract &other)
 
void dispatchOnRenderingStarted ()
 Calls the RenderEventCallback::onRenderingStarted() method of all the active callback objects. More...
 
void dispatchOnRenderingFinished ()
 Calls the RenderEventCallback::onRenderingFinished() method of all the active callback objects. More...
 
Collection< RenderEventCallback > * onStartedCallbacks ()
 Returns the list of RenderEventCallback objects registered to the onRenderingStarted() event notification. More...
 
const Collection< RenderEventCallback > * onStartedCallbacks () const
 Returns the list of RenderEventCallback objects registered to the onRenderingStarted() event notification. More...
 
Collection< RenderEventCallback > * onFinishedCallbacks ()
 Returns the list of RenderEventCallback objects registered to the onRenderingFinished() event notification. More...
 
const Collection< RenderEventCallback > * onFinishedCallbacks () const
 Returns the list of RenderEventCallback objects registered to the onRenderingFinished() event notification. More...
 
void setEnableMask (unsigned int mask)
 The enable mask of the Rendering, used to define wheter the rendering is enabled or not, and which objects should be rendered. More...
 
unsigned int enableMask () const
 The enable mask of the Rendering, used to define wheter the rendering is enabled or not, and which objects should be rendered. More...
 
bool isEnabled (unsigned int mask)
 
bool isEnabled (const Actor *actor)
 
void setFrameClock (real cur_time)
 The update time of the current rendering frame. More...
 
real frameClock () const
 The update time of the current rendering frame. More...
 
- Public Member Functions inherited from vl::Object
 Object ()
 Constructor. More...
 
 Object (const Object &other)
 Copy constructor: copies the name, ref count mutex and user data. More...
 
Objectoperator= (const Object &other)
 Copy operator: copies the object's name, ref count mutex and user data. More...
 
const std::string & objectName () const
 The name of the object, by default set to the object's class name. More...
 
void setObjectName (const char *name)
 The name of the object, by default set to the object's class name in debug builds. More...
 
void setObjectName (const std::string &name)
 The name of the object, by default set to the object's class name in debug builds. More...
 
void setRefCountMutex (IMutex *mutex)
 The mutex used to protect the reference counting of an Object across multiple threads. More...
 
IMutexrefCountMutex ()
 The mutex used to protect the reference counting of an Object across multiple threads. More...
 
const IMutexrefCountMutex () const
 The mutex used to protect the reference counting of an Object across multiple threads. More...
 
int referenceCount () const
 Returns the number of references of an object. More...
 
void incReference () const
 Increments the reference count of an object. More...
 
void decReference ()
 Decrements the reference count of an object and deletes it if both automaticDelete() is true the count reaches 0. More...
 
void setAutomaticDelete (bool autodel_on)
 If set to true the Object is deleted when its reference count reaches 0. More...
 
bool automaticDelete () const
 If set to true the Object is deleted when its reference count reaches 0. More...
 
template<class T >
T * as ()
 Casts an Object to the specified class. More...
 
template<class T >
const T * as () const
 Casts an Object to the specified class. More...
 

Protected Attributes

ref< Collection< RenderingAbstract > > mSubRendering
 
- Protected Attributes inherited from vl::RenderingAbstract
ref< Collection< RenderEventCallback > > mOnStartedCallbacks
 
ref< Collection< RenderEventCallback > > mOnFinishedCallbacks
 
real mFrameClock
 
unsigned int mEnableMask
 
- Protected Attributes inherited from vl::Object
std::string mObjectName
 
IMutexmRefCountMutex
 
int mReferenceCount
 
bool mAutomaticDelete
 

Additional Inherited Members

- Protected Member Functions inherited from vl::Object
virtual ~Object ()
 

Detailed Description

The RenderingTree class organizes a set of renderings into an N-ary tree.

To enable the RenderingTree set the enableMask() to a value != 0, otherwise the RenderingTree will be disabled.

Definition at line 41 of file RenderingTree.hpp.

Constructor & Destructor Documentation

◆ RenderingTree() [1/2]

RenderingTree::RenderingTree ( )

Constructor.

Definition at line 37 of file RenderingTree.cpp.

References mSubRendering.

◆ RenderingTree() [2/2]

vl::RenderingTree::RenderingTree ( const RenderingTree other)
inline

Copy constructor.

Definition at line 50 of file RenderingTree.hpp.

Member Function Documentation

◆ operator=()

RenderingTree & RenderingTree::operator= ( const RenderingTree other)

Assignment operator.

Definition at line 42 of file RenderingTree.cpp.

References mSubRendering.

◆ render()

void RenderingTree::render ( )
virtual

Recursively calls the render() method of its children.

Note
If enableMask() == 0 then no rendering is performed and no RenderEventCallback is called.

Implements vl::RenderingAbstract.

Definition at line 49 of file RenderingTree.cpp.

References vl::RenderingAbstract::dispatchOnRenderingFinished(), vl::RenderingAbstract::dispatchOnRenderingStarted(), vl::RenderingAbstract::enableMask(), vl::RenderingAbstract::frameClock(), and subRenderings().

◆ subRenderings() [1/2]

Collection<RenderingAbstract>* vl::RenderingTree::subRenderings ( )
inline

The sub-Rendering (or child-Rendering) objects of a Rendering. A sub-Rendering is rendered before it's parent and after its children.

Definition at line 61 of file RenderingTree.hpp.

Referenced by render().

◆ subRenderings() [2/2]

const Collection<RenderingAbstract>* vl::RenderingTree::subRenderings ( ) const
inline

The sub-Rendering (or child-Rendering) objects of a Rendering. A sub-Rendering is rendered before it's parent and after its children.

Definition at line 63 of file RenderingTree.hpp.

Member Data Documentation

◆ mSubRendering

ref< Collection<RenderingAbstract> > vl::RenderingTree::mSubRendering
protected

Definition at line 66 of file RenderingTree.hpp.

Referenced by operator=(), and RenderingTree().


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