Visualization LibraryA lightweight C++ OpenGL middleware for 2D/3D graphics |
[Home] [Tutorials] [All Classes] [Grouped Classes] |
#include <SceneManagerPortals.hpp>

Public Member Functions | |
| SceneManagerPortals () | |
| Constructor. | |
| void | appendActors (ActorCollection &list) |
| Appends to the given list all the Actor[s] contained in the scene regardless of their visibility. | |
| void | appendVisibleActors (ActorCollection &list, const Camera *camera) |
| Appends to the given list all the visible Actor[s] using the portal culling algorithm. | |
| std::vector< ref< Sector > > & | sectors () |
| The Sectors that are part of the scene. | |
| const std::vector< ref< Sector > > & | sectors () const |
| The Sectors that are part of the scene. | |
| Sector * | externalSector () |
| Returns the external sector. | |
| const Sector * | externalSector () const |
| Returns the external sector. | |
| void | computePortalNormals () |
| Compute the normal of the sectors. | |
| void | initialize () |
| Calls computePortalNormals() and performs some error checking. | |
| bool | showPortals () const |
| Whether portals should be shown in the rendering or not. | |
| void | setShowPortals (bool show) |
| Whether portals should be shown in the rendering or not. | |
| const std::vector< Frustum > & | frustumStack () const |
| The stack of frustums active at a given point during sector discovery. | |
Protected Member Functions | |
| void | renderPortal (Portal *portal) |
| void | visitSector (Sector *prev, Sector *sector, const vec3 &eye, const Camera *camera) |
| Sector * | computeStartingSector (const Camera *camera) |
Protected Attributes | |
| ref< Sector > | mExternalSector |
| std::vector< ref< Sector > > | mSectors |
| std::vector< ref< Actor > > | mTempActors |
| std::map< Portal *, ref< Actor > > | mPortalActorMap |
| std::vector< Frustum > | mFrustumStack |
| unsigned | mVisitTick |
| bool | mShowPortals |
| vl::SceneManagerPortals::SceneManagerPortals | ( | ) | [inline] |
Constructor.
| void SceneManagerPortals::appendActors | ( | ActorCollection & | list | ) | [virtual] |
Appends to the given list all the Actor[s] contained in the scene regardless of their visibility.
Implements vl::SceneManager.
| void SceneManagerPortals::appendVisibleActors | ( | ActorCollection & | list, | |
| const Camera * | camera | |||
| ) | [virtual] |
Appends to the given list all the visible Actor[s] using the portal culling algorithm.
Implements vl::SceneManager.
The Sectors that are part of the scene.
The Sectors that are part of the scene.
| Sector* vl::SceneManagerPortals::externalSector | ( | ) | [inline] |
Returns the external sector.
The external sector is a special sector that is considered visible when the camera is not inside any other sector. The external sector can be used to contain objects that are outside the indoor environment defined by the other "normal" sectors. For example, you could use the SceneManagerPortals to model a house and put in the external sector all the objects that are outside the house. The portals inside the house can point to the external sector so that the objects outside the house are rendered only if they are visible through a door or a window for maximum performances. Of course you can also go from an external sector to an internal sector just as well using one or more portals.
| const Sector* vl::SceneManagerPortals::externalSector | ( | ) | const [inline] |
Returns the external sector.
| void SceneManagerPortals::computePortalNormals | ( | ) |
Compute the normal of the sectors.
| void SceneManagerPortals::initialize | ( | ) |
Calls computePortalNormals() and performs some error checking.
| bool vl::SceneManagerPortals::showPortals | ( | ) | const [inline] |
Whether portals should be shown in the rendering or not.
| void vl::SceneManagerPortals::setShowPortals | ( | bool | show | ) | [inline] |
Whether portals should be shown in the rendering or not.
| const std::vector<Frustum>& vl::SceneManagerPortals::frustumStack | ( | ) | const [inline] |
The stack of frustums active at a given point during sector discovery.
| void SceneManagerPortals::renderPortal | ( | Portal * | portal | ) | [protected] |
| void SceneManagerPortals::visitSector | ( | Sector * | prev, | |
| Sector * | sector, | |||
| const vec3 & | eye, | |||
| const Camera * | camera | |||
| ) | [protected] |
ref<Sector> vl::SceneManagerPortals::mExternalSector [protected] |
std::vector< ref<Sector> > vl::SceneManagerPortals::mSectors [protected] |
std::vector< ref<Actor> > vl::SceneManagerPortals::mTempActors [protected] |
std::map<Portal*, ref<Actor> > vl::SceneManagerPortals::mPortalActorMap [protected] |
std::vector<Frustum> vl::SceneManagerPortals::mFrustumStack [protected] |
unsigned vl::SceneManagerPortals::mVisitTick [protected] |
bool vl::SceneManagerPortals::mShowPortals [protected] |