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::SceneManagerVectorGraphics Class Reference

The SceneManagerVectorGraphics class is a SceneManager that contains VectorGraphics objects. More...

#include <SceneManagerVectorGraphics.hpp>

+ Inheritance diagram for vl::SceneManagerVectorGraphics:

Public Member Functions

 SceneManagerVectorGraphics ()
 
void setActorRenderRankStart (int rank_start)
 Defines the Actor's render rank to be used when extracting them from the scene manager during the rendering. More...
 
int actorRenderRankStart () const
 Returns the rendering rank start value used during the rendering of the VectorGraphics objects. See setActorRenderRankStart() for more information. More...
 
virtual void extractVisibleActors (ActorCollection &queue, const Camera *)
 Extracts all the enabled and visible Actors contained in the ActorTree hierarchy and appends them to the given ActorCollection. More...
 
virtual void extractActors (ActorCollection &queue)
 Appends all the Actors contained in the scene manager without performing frustum culling or checking enable masks. More...
 
Collection< VectorGraphics > * vectorGraphicObjects ()
 Returns the list of VectorGraphics objects bound to a SceneManagerVectorGraphics. More...
 
const Collection< VectorGraphics > * vectorGraphicObjects () const
 Returns the list of VectorGraphics objects bound to a SceneManagerVectorGraphics. More...
 
- Public Member Functions inherited from vl::SceneManager
 SceneManager ()
 Constructor. More...
 
virtual void computeBounds ()
 Computes the bounding box and bounding sphere of the scene manager and of all the Actors contained in the SceneManager. More...
 
void setBoundingSphere (const Sphere &sphere)
 Explicitly set the scene manager's bounding sphere. See also computeBounds(). More...
 
const SphereboundingSphere () const
 Returns the scene manager's bounding sphere. More...
 
void setBoundingBox (const AABB &bbox)
 Explicitly set the scene manager's bounding sphere. See also computeBounds(). More...
 
const AABBboundingBox () const
 Returns the scene manager's bounding box. More...
 
void setBoundsDirty (bool dirty)
 Flags a scene manager's bounding box and bounding sphere as dirty. The bounds will be recomputed using computeBounds() at the next rendering frame. More...
 
bool boundsDirty () const
 Returns true if the scene manager's bounds should be recomputed at the next rendering frame. More...
 
void setCullingEnabled (bool enable)
 Used to enable or disable frustum culling or whichever culling system the scene manager implements. More...
 
bool cullingEnabled () const
 Used to enable or disable frustum culling or whichever culling system the scene manager implements. More...
 
void setEnableMask (unsigned int enabled)
 The enable mask to be used by extractVisibleActors() More...
 
unsigned int enableMask () const
 The enable mask to be used by extractVisibleActors() More...
 
bool isEnabled (Actor *a) const
 Returns true if "a->enableMask() & enableMask()) != 0". 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

Collection< VectorGraphicsmVectorGraphicObjects
 
int mActorRenderRankStart
 
- Protected Attributes inherited from vl::SceneManager
Sphere mSphere
 
AABB mAABB
 
unsigned int mEnableMask
 
bool mBoundsDirty
 
bool mCullingEnabled
 
- 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 SceneManagerVectorGraphics class is a SceneManager that contains VectorGraphics objects.

The VectorGraphics objects are rendered in the order in which they are added to the SceneManagerVectorGraphics.

See also

Definition at line 56 of file SceneManagerVectorGraphics.hpp.

Constructor & Destructor Documentation

◆ SceneManagerVectorGraphics()

vl::SceneManagerVectorGraphics::SceneManagerVectorGraphics ( )
inline

Definition at line 61 of file SceneManagerVectorGraphics.hpp.

References mActorRenderRankStart, and mVectorGraphicObjects.

Member Function Documentation

◆ actorRenderRankStart()

int vl::SceneManagerVectorGraphics::actorRenderRankStart ( ) const
inline

Returns the rendering rank start value used during the rendering of the VectorGraphics objects. See setActorRenderRankStart() for more information.

Definition at line 70 of file SceneManagerVectorGraphics.hpp.

References mActorRenderRankStart.

◆ extractActors()

virtual void vl::SceneManagerVectorGraphics::extractActors ( ActorCollection list)
inlinevirtual

Appends all the Actors contained in the scene manager without performing frustum culling or checking enable masks.

Implements vl::SceneManager.

Definition at line 81 of file SceneManagerVectorGraphics.hpp.

References mActorRenderRankStart, vl::Collection< T >::push_back(), and vectorGraphicObjects().

Referenced by extractVisibleActors().

◆ extractVisibleActors()

virtual void vl::SceneManagerVectorGraphics::extractVisibleActors ( ActorCollection list,
const Camera camera 
)
inlinevirtual

Extracts all the enabled and visible Actors contained in the ActorTree hierarchy and appends them to the given ActorCollection.

See also
SceneManager::enableMask(), Actor::enableMask(), Actor::isEnabled(), ActorTreeAbstract::isEnabled()

Implements vl::SceneManager.

Definition at line 72 of file SceneManagerVectorGraphics.hpp.

References vl::SceneManager::cullingEnabled(), and extractActors().

◆ setActorRenderRankStart()

void vl::SceneManagerVectorGraphics::setActorRenderRankStart ( int  rank_start)
inline

Defines the Actor's render rank to be used when extracting them from the scene manager during the rendering.

During the rendering when the Actor[s] are extracted they are assigned a progressive render rank starting from rank_start so that they are rendered in the same order in which they were created by their VectorGraphics. Also the order in which a VectorGraphics is inserted in the SceneManagerVectorGraphics determines the rendering order.

Definition at line 67 of file SceneManagerVectorGraphics.hpp.

References mActorRenderRankStart.

◆ vectorGraphicObjects() [1/2]

Collection<VectorGraphics>* vl::SceneManagerVectorGraphics::vectorGraphicObjects ( )
inline

Returns the list of VectorGraphics objects bound to a SceneManagerVectorGraphics.

Definition at line 95 of file SceneManagerVectorGraphics.hpp.

References mVectorGraphicObjects.

Referenced by extractActors().

◆ vectorGraphicObjects() [2/2]

const Collection<VectorGraphics>* vl::SceneManagerVectorGraphics::vectorGraphicObjects ( ) const
inline

Returns the list of VectorGraphics objects bound to a SceneManagerVectorGraphics.

Definition at line 98 of file SceneManagerVectorGraphics.hpp.

References mVectorGraphicObjects.

Member Data Documentation

◆ mActorRenderRankStart

int vl::SceneManagerVectorGraphics::mActorRenderRankStart
protected

◆ mVectorGraphicObjects

Collection<VectorGraphics> vl::SceneManagerVectorGraphics::mVectorGraphicObjects
protected

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