# Visualization Library

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

[Home] [Tutorials] [All Classes] [Grouped Classes]

Classes | Public Member Functions | Protected Attributes

# vl::Sector Class Reference

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

`#include <SceneManagerPortals.hpp>`

Inheritance diagram for vl::Sector:

List of all members.

## Classes

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

## Public Member Functions

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

## Protected Attributes

std::vector< ref< Portal > > | mPortals
std::vector< AABB > | mVolumes
ref< ActorCollection > | mActors
std::vector< ref < VisibilityCallback > > | mCallbacks

## Detailed Description

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

See also:

- SceneManagerPortals
- Portal
- Portal-Based Culling and Scene Management Tutorial

Definition at line 109 of file SceneManagerPortals.hpp.

## Constructor & Destructor Documentation

vl::Sector::Sector | ( | ) | `[inline]`

Constructor.

Definition at line 134 of file SceneManagerPortals.hpp.

References VL_DEBUG_SET_OBJECT_NAME.

## Member Function Documentation

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 computeBoundingBox(), and vl::SceneManagerPortals::visitSector().

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.

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().

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.

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.

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.

AABB Sector::computeBoundingBox | ( | ) |

Returns the bounding box of all the Actor[s] in the sector.

Definition at line 66 of file SceneManagerPortals.cpp.

References actors(), vl::Collection< T >::at(), vl::Actor::boundingBox(), vl::Actor::computeBounds(), and vl::Collection< T >::size().

std::vector< ref<VisibilityCallback> >& vl::Sector::callbacks | ( | ) | `[inline]`

Definition at line 160 of file SceneManagerPortals.hpp.

Referenced by executeCallbacks().

const std::vector< ref<VisibilityCallback> >& vl::Sector::callbacks | ( | ) | const`[inline]`

Definition at line 161 of file SceneManagerPortals.hpp.

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

Definition at line 77 of file SceneManagerPortals.cpp.

References callbacks().

Referenced by vl::SceneManagerPortals::extractVisibleActors(), and vl::SceneManagerPortals::visitSector().

## Member Data Documentation

std::vector< ref<Portal> > vl::Sector::mPortals`[protected]`

Definition at line 165 of file SceneManagerPortals.hpp.

std::vector< AABB > vl::Sector::mVolumes`[protected]`

Definition at line 166 of file SceneManagerPortals.hpp.

ref< ActorCollection > vl::Sector::mActors`[protected]`

Definition at line 167 of file SceneManagerPortals.hpp.

std::vector< ref<VisibilityCallback> > vl::Sector::mCallbacks`[protected]`

Definition at line 168 of file SceneManagerPortals.hpp.

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

- D:/VL/BuildSystem/VL_DISTRO/Visualization_Library_SDK/src/vlGraphics/SceneManagerPortals.hpp
- D:/VL/BuildSystem/VL_DISTRO/Visualization_Library_SDK/src/vlGraphics/SceneManagerPortals.cpp

Visualization Library v2011.09.1162 Reference Documentation
Copyright 2005-2011 Michele Bosi. All rights reserved.
Updated on Thu Jan 26 2012 00:44:50.
Permission is granted to use this page to write and publish articles regarding Visualization Library.