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]
Classes | Public Member Functions | Protected Attributes | List of all members
vl::Sector Class Reference

Defines an area containg a set if Actors that is connected to other Sector[s] through its Portal[s]. More...

#include <SceneManagerPortals.hpp>

+ Inheritance diagram for vl::Sector:

Classes

class  VisibilityCallback
 A callback object called each time a Sector becomes visible through a Portal. More...
 

Public Member Functions

 Sector ()
 Constructor. More...
 
ActorCollectionactors ()
 The Actor object contained in a sector. An actor can be part of multiple sectors. More...
 
const ActorCollectionactors () const
 The Actor object contained in a sector. An actor can be part of multiple sectors. More...
 
std::vector< ref< Portal > > & portals ()
 The portals within a sector that connect it to other sectors. More...
 
const std::vector< ref< Portal > > & portals () const
 The portals within a sector that connect it to other sectors. More...
 
std::vector< AABB > & volumes ()
 A set of volumes used to test if the camera is or not inside a Sector. More...
 
const std::vector< AABB > & volumes () const
 A set of volumes used to test if the camera is or not inside a Sector. More...
 
AABB computeBoundingBox ()
 Returns the bounding box of all the Actors in the sector. More...
 
std::vector< ref< VisibilityCallback > > & callbacks ()
 
const std::vector< ref< VisibilityCallback > > & callbacks () const
 
void executeCallbacks (const Camera *cam, SceneManagerPortals *psm, Portal *p)
 
- 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

std::vector< ref< Portal > > mPortals
 
std::vector< AABBmVolumes
 
ref< ActorCollectionmActors
 
std::vector< ref< VisibilityCallback > > mCallbacks
 
- 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

Defines an area containg a set if Actors that is connected to other Sector[s] through its Portal[s].

See also:

Definition at line 109 of file SceneManagerPortals.hpp.

Constructor & Destructor Documentation

◆ Sector()

vl::Sector::Sector ( )
inline

Constructor.

Definition at line 134 of file SceneManagerPortals.hpp.

Member Function Documentation

◆ actors() [1/2]

ActorCollection* vl::Sector::actors ( )
inline

The Actor object contained in a sector. An actor can be part of multiple sectors.

Definition at line 141 of file SceneManagerPortals.hpp.

Referenced by vl::SceneManagerPortals::visitSector().

◆ actors() [2/2]

const ActorCollection* vl::Sector::actors ( ) const
inline

The Actor object contained in a sector. An actor can be part of multiple sectors.

Definition at line 143 of file SceneManagerPortals.hpp.

◆ callbacks() [1/2]

std::vector< ref<VisibilityCallback> >& vl::Sector::callbacks ( )
inline

Definition at line 160 of file SceneManagerPortals.hpp.

◆ callbacks() [2/2]

const std::vector< ref<VisibilityCallback> >& vl::Sector::callbacks ( ) const
inline

Definition at line 161 of file SceneManagerPortals.hpp.

◆ computeBoundingBox()

AABB Sector::computeBoundingBox ( )

Returns the bounding box of all the Actors in the sector.

Definition at line 66 of file SceneManagerPortals.cpp.

◆ executeCallbacks()

void Sector::executeCallbacks ( const Camera cam,
SceneManagerPortals psm,
Portal p 
)

◆ portals() [1/2]

std::vector< ref<Portal> >& vl::Sector::portals ( )
inline

The portals within a sector that connect it to other sectors.

Definition at line 146 of file SceneManagerPortals.hpp.

Referenced by vl::SceneManagerPortals::visitSector().

◆ portals() [2/2]

const std::vector< ref<Portal> >& vl::Sector::portals ( ) const
inline

The portals within a sector that connect it to other sectors.

Definition at line 148 of file SceneManagerPortals.hpp.

◆ volumes() [1/2]

std::vector< AABB >& vl::Sector::volumes ( )
inline

A set of volumes used to test if the camera is or not inside a Sector.

The volumes of a sector must not intersecate with the volumes of another sector.

Definition at line 152 of file SceneManagerPortals.hpp.

◆ volumes() [2/2]

const std::vector< AABB >& vl::Sector::volumes ( ) const
inline

A set of volumes used to test if the camera is or not inside a Sector.

The volumes of a sector must not intersecate with the volumes of another sector.

Definition at line 155 of file SceneManagerPortals.hpp.

Member Data Documentation

◆ mActors

ref< ActorCollection > vl::Sector::mActors
protected

Definition at line 167 of file SceneManagerPortals.hpp.

◆ mCallbacks

std::vector< ref<VisibilityCallback> > vl::Sector::mCallbacks
protected

Definition at line 168 of file SceneManagerPortals.hpp.

◆ mPortals

std::vector< ref<Portal> > vl::Sector::mPortals
protected

Definition at line 165 of file SceneManagerPortals.hpp.

◆ mVolumes

std::vector< AABB > vl::Sector::mVolumes
protected

Definition at line 166 of file SceneManagerPortals.hpp.


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