Visualization Library 2.0.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::RenderingAbstract Class Referenceabstract

The RenderingAbstract class is the base of all the rendering related sub-classes. More...

#include <RenderingAbstract.hpp>

+ Inheritance diagram for vl::RenderingAbstract:

Public Member Functions

 RenderingAbstract ()
 Constructor. More...
 
virtual void render ()=0
 Executes the rendering. 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< 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 RenderingAbstract class is the base of all the rendering related sub-classes.

Definition at line 45 of file RenderingAbstract.hpp.

Constructor & Destructor Documentation

◆ RenderingAbstract()

RenderingAbstract::RenderingAbstract ( )

Constructor.

Definition at line 39 of file RenderingAbstract.cpp.

References mEnableMask, mFrameClock, mOnFinishedCallbacks, and mOnStartedCallbacks.

Member Function Documentation

◆ dispatchOnRenderingFinished()

void RenderingAbstract::dispatchOnRenderingFinished ( )

Calls the RenderEventCallback::onRenderingFinished() method of all the active callback objects.

Definition at line 72 of file RenderingAbstract.cpp.

References isEnabled(), mOnFinishedCallbacks, onFinishedCallbacks(), and vl::Collection< T >::size().

Referenced by vl::RenderingTree::render(), and vl::Rendering::render().

◆ dispatchOnRenderingStarted()

void RenderingAbstract::dispatchOnRenderingStarted ( )

Calls the RenderEventCallback::onRenderingStarted() method of all the active callback objects.

Definition at line 59 of file RenderingAbstract.cpp.

References isEnabled(), mOnStartedCallbacks, onStartedCallbacks(), and vl::Collection< T >::size().

Referenced by vl::RenderingTree::render(), and vl::Rendering::render().

◆ enableMask()

unsigned int vl::RenderingAbstract::enableMask ( ) const
inline

The enable mask of the Rendering, used to define wheter the rendering is enabled or not, and which objects should be rendered.

Definition at line 82 of file RenderingAbstract.hpp.

Referenced by vl::Rendering::fillRenderQueue(), vl::RenderingTree::render(), and vl::Rendering::render().

◆ frameClock()

real vl::RenderingAbstract::frameClock ( ) const
inline

The update time of the current rendering frame.

Definition at line 91 of file RenderingAbstract.hpp.

Referenced by vl::Rendering::fillRenderQueue(), vl::RenderingTree::render(), and vl::Rendering::render().

◆ isEnabled() [1/2]

bool vl::RenderingAbstract::isEnabled ( unsigned int  mask)
inline

◆ isEnabled() [2/2]

bool vl::RenderingAbstract::isEnabled ( const Actor actor)
inline

Definition at line 85 of file RenderingAbstract.hpp.

References vl::Actor::enableMask(), and vl::Actor::isEnabled().

◆ onFinishedCallbacks() [1/2]

Collection<RenderEventCallback>* vl::RenderingAbstract::onFinishedCallbacks ( )
inline

Returns the list of RenderEventCallback objects registered to the onRenderingFinished() event notification.

Definition at line 71 of file RenderingAbstract.hpp.

Referenced by dispatchOnRenderingFinished(), and vl::Applet::keyReleaseEvent().

◆ onFinishedCallbacks() [2/2]

const Collection<RenderEventCallback>* vl::RenderingAbstract::onFinishedCallbacks ( ) const
inline

Returns the list of RenderEventCallback objects registered to the onRenderingFinished() event notification.

Definition at line 74 of file RenderingAbstract.hpp.

◆ onStartedCallbacks() [1/2]

Collection<RenderEventCallback>* vl::RenderingAbstract::onStartedCallbacks ( )
inline

Returns the list of RenderEventCallback objects registered to the onRenderingStarted() event notification.

Definition at line 65 of file RenderingAbstract.hpp.

Referenced by dispatchOnRenderingStarted().

◆ onStartedCallbacks() [2/2]

const Collection<RenderEventCallback>* vl::RenderingAbstract::onStartedCallbacks ( ) const
inline

Returns the list of RenderEventCallback objects registered to the onRenderingStarted() event notification.

Definition at line 68 of file RenderingAbstract.hpp.

◆ operator=()

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

◆ render()

virtual void vl::RenderingAbstract::render ( )
pure virtual

Executes the rendering.

Implemented in vl::Rendering, and vl::RenderingTree.

Referenced by vl::Applet::updateEvent().

◆ setEnableMask()

void vl::RenderingAbstract::setEnableMask ( unsigned int  mask)
inline

The enable mask of the Rendering, used to define wheter the rendering is enabled or not, and which objects should be rendered.

See also
vl::Actor::setEnableMask()

Definition at line 79 of file RenderingAbstract.hpp.

◆ setFrameClock()

void vl::RenderingAbstract::setFrameClock ( real  cur_time)
inline

The update time of the current rendering frame.

Definition at line 88 of file RenderingAbstract.hpp.

Referenced by vl::Applet::updateEvent().

Member Data Documentation

◆ mEnableMask

unsigned int vl::RenderingAbstract::mEnableMask
protected

Definition at line 97 of file RenderingAbstract.hpp.

Referenced by operator=(), vl::Rendering::operator=(), and RenderingAbstract().

◆ mFrameClock

real vl::RenderingAbstract::mFrameClock
protected

Definition at line 96 of file RenderingAbstract.hpp.

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

◆ mOnFinishedCallbacks

ref< Collection<RenderEventCallback> > vl::RenderingAbstract::mOnFinishedCallbacks
protected

Definition at line 95 of file RenderingAbstract.hpp.

Referenced by dispatchOnRenderingFinished(), operator=(), and RenderingAbstract().

◆ mOnStartedCallbacks

ref< Collection<RenderEventCallback> > vl::RenderingAbstract::mOnStartedCallbacks
protected

Definition at line 94 of file RenderingAbstract.hpp.

Referenced by dispatchOnRenderingStarted(), operator=(), and RenderingAbstract().


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