OGRE: Ogre::PCZone Class Reference

| OGRE 14.5 Object-Oriented Graphics Rendering Engine

Loading...
Searching...
No Matches
Ogre::PCZone Class Referenceabstract
Plugins » PCZSceneManager

Portal-Connected Zone datastructure for managing scene nodes. More...

`#include <OgrePCZone.h>`

Inheritance diagram for Ogre::PCZone:
[legend]

## Public Types
enum | NODE_LIST_TYPE { HOME_NODE_LIST = 1 , VISITOR_NODE_LIST = 2 }

## Public Member Functions
| PCZone (PCZSceneManager *, const String &)
virtual | ~PCZone ()
virtual void | _addAntiPortal (AntiPortal *newAntiPortal)
| Add an anti portal to the zone.
virtual void | _addNode (PCZSceneNode *)=0
| Adds an SceneNode to this PCZone.
virtual void | _addPortal (Portal *newPortal)
| Add a portal to the zone.
virtual void | _checkLightAgainstPortals (PCZLight *, unsigned long, PCZFrustum *, Portal *)=0
| (recursive) Check the given light against all portals in the zone
virtual void | _checkNodeAgainstPortals (PCZSceneNode *, Portal *)=0
| (recursive) Check the given node against all portals in the zone
virtual void | _clearNodeLists (short nodeListTypes)
| Remove all nodes from the node reference list and clear it.
virtual void | _findNodes (const AxisAlignedBox &t, PCZSceneNodeList &list, PortalList &visitedPortals, bool includeVisitors, bool recurseThruPortals, PCZSceneNode *exclude)=0
virtual void | _findNodes (const PlaneBoundedVolume &t, PCZSceneNodeList &list, PortalList &visitedPortals, bool includeVisitors, bool recurseThruPortals, PCZSceneNode *exclude)=0
virtual void | _findNodes (const Ray &t, PCZSceneNodeList &list, PortalList &visitedPortals, bool includeVisitors, bool recurseThruPortals, PCZSceneNode *exclude)=0
virtual void | _findNodes (const Sphere &t, PCZSceneNodeList &list, PortalList &visitedPortals, bool includeVisitors, bool recurseThruPortals, PCZSceneNode *exclude)=0
virtual void | _removeAntiPortal (AntiPortal *removeAntiPortal)
| Remove an anti portal from the zone.
virtual void | _removePortal (Portal *removePortal)
| Remove a portal from the zone.
virtual void | createNodeZoneData (PCZSceneNode *)
| Create zone specific data for a node.
virtual void | dirtyNodeByMovingPortals (void)=0
| Mark nodes dirty base on moving portals.
virtual Portal * | findMatchingPortal (Portal *)
| Find a matching portal (for connecting portals).
virtual void | findVisibleNodes (PCZCamera *, NodeList &visibleNodeList, RenderQueue *queue, VisibleObjectsBoundsInfo *visibleBounds, bool onlyShadowCasters, bool displayNodes, bool showBoundingBoxes)=0
| Find and add visible objects to the render queue.
virtual void | getAABB (AxisAlignedBox &)
| Get the world coordinate aabb of the zone.
SceneNode * | getEnclosureNode (void)
| Get a pointer to the enclosure node for this PCZone.
unsigned long | getLastVisibleFrame (void)
| Get the lastVisibleFrame counter value.
PCZCamera * | getLastVisibleFromCamera ()
| Get the lastVisibleFromCamera pointer.
const String & | getName (void) const
bool | getPortalsUpdated (void)
void * | getUserData (void)
| Get & set the user data.
const String & | getZoneTypeName () const
bool | hasSky (void)
virtual void | notifyBeginRenderScene (void)=0
| Called when a _renderScene is called in the SceneManager.
virtual void | notifyCameraCreated (Camera *c)=0
| Called when the scene manager creates a camera in order to store the first camera created as the primary one, for determining error metrics and the 'home' terrain page.
virtual void | notifyWorldGeometryRenderQueue (uint8 qid)=0
| Called by PCZSM during setWorldGeometryRenderQueue().
virtual void | removeNode (PCZSceneNode *)=0
| Removes all references to a SceneNode from this PCZone.
virtual bool | requiresZoneSpecificNodeData (void)=0
| Indicates whether or not this zone requires zone-specific data for each scene node.
virtual void | setEnclosureNode (PCZSceneNode *)=0
| Set the enclosure node for this PCZone.
void | setHasSky (bool yesno)
| If sky should be drawn with this zone.
void | setLastVisibleFrame (unsigned long frameCount)
| Set the lastVisibleFrame counter.
void | setLastVisibleFromCamera (PCZCamera *camera)
| Set the lastVisibleFromCamera pointer.
virtual bool | setOption (const String &, const void *)=0
| Sets the options for the Zone.
void | setPortalsUpdated (bool updated)
void | setUserData (void *userData)
virtual void | setZoneGeometry (const String &filename, PCZSceneNode *parentNode)=0
| Called by PCZSM during setZoneGeometry().
virtual PCZone * | updateNodeHomeZone (PCZSceneNode *pczsn, bool allowBackTouces)=0
| Update a node's home zone.
virtual void | updatePortalsZoneData (void)=0
| Update the zone data for each portal.

## Public Attributes
AntiPortalList | mAntiPortals
PCZSceneManager * | mPCZSM
| Pointer to the pcz scene manager that created this zone.
PortalList | mPortals
| List of Portals which this zone contains (each portal leads to another zone).

## Detailed Description

Portal-Connected Zone datastructure for managing scene nodes.

Portal Connected Zones are spatial constructs for partitioning space into cross connected zones. Each zone is connected to other zones using Portal nodes.

Zones contain references to nodes which touch them. However, zones do not care how nodes are arranged hierarchically. Whether or not a node is referenced as being part of a zone is entirely determined by the user or by the node crossing a portal into or out-of the zone.

Nodes can be referenced by several zones at once, but only one zone is considered the "home" zone of the node. Home zone is determined by location of the centerpoint of the node. Nodes can "touch" other zones if the node BV intersects a portal (this is also called "visiting" a zone). Nodes keep a pointer to their home zone and a list of references to zones they are "visiting".

## Member Enumeration Documentation

## ◆ NODE_LIST_TYPE

enum Ogre::PCZone::NODE_LIST_TYPE

Enumerator
HOME_NODE_LIST |
VISITOR_NODE_LIST |

## Constructor & Destructor Documentation

## ◆ PCZone()

Ogre::PCZone::PCZone | ( | PCZSceneManager * | ,
|  | const String & | )

Referenced by Ogre::DefaultZone::updateNodeHomeZone(), Ogre::OctreeZone::updateNodeHomeZone(), and updateNodeHomeZone().

## ◆ ~PCZone()

virtual Ogre::PCZone::~PCZone | ( |  | ) |
| virtual

## Member Function Documentation

## ◆ getZoneTypeName()

const String & Ogre::PCZone::getZoneTypeName | ( |  | ) | const
| inline

Returns
  The zone type name (ex: "ZoneType_Terrain")

## ◆ getName()

const String & Ogre::PCZone::getName | ( | void |  | ) | const
| inline

Returns
  the name of the zone

## ◆ getEnclosureNode()

SceneNode * Ogre::PCZone::getEnclosureNode | ( | void |  | ) |
| inline

Get a pointer to the enclosure node for this PCZone.

## ◆ setHasSky()

void Ogre::PCZone::setHasSky | ( | bool | yesno | ) |
| inline

If sky should be drawn with this zone.

## ◆ hasSky()

bool Ogre::PCZone::hasSky | ( | void |  | ) |
| inline

Returns
  Whether or not this zone has sky

## ◆ setLastVisibleFrame()

void Ogre::PCZone::setLastVisibleFrame | ( | unsigned long | frameCount | ) |
| inline

Set the lastVisibleFrame counter.

## ◆ getLastVisibleFrame()

unsigned long Ogre::PCZone::getLastVisibleFrame | ( | void |  | ) |
| inline

Get the lastVisibleFrame counter value.

## ◆ setLastVisibleFromCamera()

void Ogre::PCZone::setLastVisibleFromCamera | ( | PCZCamera * | camera | ) |
| inline

Set the lastVisibleFromCamera pointer.

## ◆ getLastVisibleFromCamera()

PCZCamera * Ogre::PCZone::getLastVisibleFromCamera | ( |  | ) |
| inline

Get the lastVisibleFromCamera pointer.

## ◆ setEnclosureNode()

virtual void Ogre::PCZone::setEnclosureNode | ( | PCZSceneNode * |  | ) |
| pure virtual

Set the enclosure node for this PCZone.

Implemented in Ogre::DefaultZone, and Ogre::OctreeZone.

## ◆ _addNode()

virtual void Ogre::PCZone::_addNode | ( | PCZSceneNode * |  | ) |
| pure virtual

Adds an SceneNode to this PCZone.

The PCZSceneManager calls this function to add a node to the zone. Home or Visitor list is selected based on the node's home zone

Implemented in Ogre::DefaultZone, and Ogre::OctreeZone.

## ◆ removeNode()

virtual void Ogre::PCZone::removeNode | ( | PCZSceneNode * |  | ) |
| pure virtual

Removes all references to a SceneNode from this PCZone.

Implemented in Ogre::DefaultZone, and Ogre::OctreeZone.

## ◆ _clearNodeLists()

virtual void Ogre::PCZone::_clearNodeLists | ( | short | nodeListTypes | ) |
| virtual

Remove all nodes from the node reference list and clear it.

Reimplemented in Ogre::OctreeZone.

## ◆ requiresZoneSpecificNodeData()

virtual bool Ogre::PCZone::requiresZoneSpecificNodeData | ( | void |  | ) |
| pure virtual

Indicates whether or not this zone requires zone-specific data for each scene node.

Implemented in Ogre::DefaultZone, and Ogre::OctreeZone.

## ◆ createNodeZoneData()

virtual void Ogre::PCZone::createNodeZoneData | ( | PCZSceneNode * |  | ) |
| virtual

Create zone specific data for a node.

Reimplemented in Ogre::OctreeZone.

## ◆ findMatchingPortal()

virtual Portal * Ogre::PCZone::findMatchingPortal | ( | Portal * |  | ) |
| virtual

Find a matching portal (for connecting portals).

## ◆ _addPortal()

virtual void Ogre::PCZone::_addPortal | ( | Portal * | newPortal | ) |
| virtual

Add a portal to the zone.

## ◆ _removePortal()

virtual void Ogre::PCZone::_removePortal | ( | Portal * | removePortal | ) |
| virtual

Remove a portal from the zone.

## ◆ _addAntiPortal()

virtual void Ogre::PCZone::_addAntiPortal | ( | AntiPortal * | newAntiPortal | ) |
| virtual

Add an anti portal to the zone.

## ◆ _removeAntiPortal()

virtual void Ogre::PCZone::_removeAntiPortal | ( | AntiPortal * | removeAntiPortal | ) |
| virtual

Remove an anti portal from the zone.

## ◆ _checkNodeAgainstPortals()

virtual void Ogre::PCZone::_checkNodeAgainstPortals | ( | PCZSceneNode * | ,
|  | Portal * | )
| pure virtual

(recursive) Check the given node against all portals in the zone

Implemented in Ogre::DefaultZone, and Ogre::OctreeZone.

## ◆ _checkLightAgainstPortals()

virtual void Ogre::PCZone::_checkLightAgainstPortals | ( | PCZLight * | ,
|  | unsigned long | ,
|  | PCZFrustum * | ,
|  | Portal * | )
| pure virtual

(recursive) Check the given light against all portals in the zone

Implemented in Ogre::DefaultZone, and Ogre::OctreeZone.

## ◆ updatePortalsZoneData()

virtual void Ogre::PCZone::updatePortalsZoneData | ( | void |  | ) |
| pure virtual

Update the zone data for each portal.

Implemented in Ogre::DefaultZone, and Ogre::OctreeZone.

## ◆ dirtyNodeByMovingPortals()

virtual void Ogre::PCZone::dirtyNodeByMovingPortals | ( | void |  | ) |
| pure virtual

Mark nodes dirty base on moving portals.

Implemented in Ogre::DefaultZone, and Ogre::OctreeZone.

## ◆ updateNodeHomeZone()

virtual PCZone * Ogre::PCZone::updateNodeHomeZone | ( | PCZSceneNode * | pczsn,
|  | bool | allowBackTouces )
| pure virtual

Update a node's home zone.

Implemented in Ogre::DefaultZone, and Ogre::OctreeZone.

References PCZone().

## ◆ findVisibleNodes()

virtual void Ogre::PCZone::findVisibleNodes | ( | PCZCamera * | ,
|  | NodeList & | visibleNodeList,
|  | RenderQueue * | queue,
|  | VisibleObjectsBoundsInfo * | visibleBounds,
|  | bool | onlyShadowCasters,
|  | bool | displayNodes,
|  | bool | showBoundingBoxes )
| pure virtual

Find and add visible objects to the render queue.

Starts with objects in the zone and proceeds through visible portals
This is a recursive call (the main call should be to _findVisibleObjects)

Implemented in Ogre::DefaultZone, and Ogre::OctreeZone.

## ◆ _findNodes() [1/4]

virtual void Ogre::PCZone::_findNodes | ( | const AxisAlignedBox & | t,
|  | PCZSceneNodeList & | list,
|  | PortalList & | visitedPortals,
|  | bool | includeVisitors,
|  | bool | recurseThruPortals,
|  | PCZSceneNode * | exclude )
| pure virtual

Implemented in Ogre::DefaultZone, and Ogre::OctreeZone.

## ◆ _findNodes() [2/4]

virtual void Ogre::PCZone::_findNodes | ( | const Sphere & | t,
|  | PCZSceneNodeList & | list,
|  | PortalList & | visitedPortals,
|  | bool | includeVisitors,
|  | bool | recurseThruPortals,
|  | PCZSceneNode * | exclude )
| pure virtual

Implemented in Ogre::DefaultZone, and Ogre::OctreeZone.

## ◆ _findNodes() [3/4]

virtual void Ogre::PCZone::_findNodes | ( | const PlaneBoundedVolume & | t,
|  | PCZSceneNodeList & | list,
|  | PortalList & | visitedPortals,
|  | bool | includeVisitors,
|  | bool | recurseThruPortals,
|  | PCZSceneNode * | exclude )
| pure virtual

Implemented in Ogre::DefaultZone, and Ogre::OctreeZone.

## ◆ _findNodes() [4/4]

virtual void Ogre::PCZone::_findNodes | ( | const Ray & | t,
|  | PCZSceneNodeList & | list,
|  | PortalList & | visitedPortals,
|  | bool | includeVisitors,
|  | bool | recurseThruPortals,
|  | PCZSceneNode * | exclude )
| pure virtual

Implemented in Ogre::DefaultZone, and Ogre::OctreeZone.

## ◆ setOption()

virtual bool Ogre::PCZone::setOption | ( | const String & | ,
|  | const void * | )
| pure virtual

Sets the options for the Zone.

Implemented in Ogre::DefaultZone, and Ogre::OctreeZone.

## ◆ notifyCameraCreated()

virtual void Ogre::PCZone::notifyCameraCreated | ( | Camera * | c | ) |
| pure virtual

Called when the scene manager creates a camera in order to store the first camera created as the primary one, for determining error metrics and the 'home' terrain page.

Implemented in Ogre::DefaultZone, and Ogre::OctreeZone.

## ◆ notifyWorldGeometryRenderQueue()

virtual void Ogre::PCZone::notifyWorldGeometryRenderQueue | ( | uint8 | qid | ) |
| pure virtual

Called by PCZSM during setWorldGeometryRenderQueue().

Implemented in Ogre::DefaultZone, and Ogre::OctreeZone.

## ◆ notifyBeginRenderScene()

virtual void Ogre::PCZone::notifyBeginRenderScene | ( | void |  | ) |
| pure virtual

Called when a _renderScene is called in the SceneManager.

Implemented in Ogre::DefaultZone, and Ogre::OctreeZone.

## ◆ setZoneGeometry()

virtual void Ogre::PCZone::setZoneGeometry | ( | const String & | filename,
|  | PCZSceneNode * | parentNode )
| pure virtual

Called by PCZSM during setZoneGeometry().

Implemented in Ogre::DefaultZone, and Ogre::OctreeZone.

## ◆ getAABB()

virtual void Ogre::PCZone::getAABB | ( | AxisAlignedBox & |  | ) |
| virtual

Get the world coordinate aabb of the zone.

Reimplemented in Ogre::OctreeZone.

## ◆ setPortalsUpdated()

void Ogre::PCZone::setPortalsUpdated | ( | bool | updated | ) |
| inline

## ◆ getPortalsUpdated()

bool Ogre::PCZone::getPortalsUpdated | ( | void |  | ) |
| inline

## ◆ getUserData()

void * Ogre::PCZone::getUserData | ( | void |  | ) |
| inline

Get & set the user data.

## ◆ setUserData()

void Ogre::PCZone::setUserData | ( | void * | userData | ) |
| inline

## Member Data Documentation

## ◆ mPortals

PortalList Ogre::PCZone::mPortals

List of Portals which this zone contains (each portal leads to another zone).

## ◆ mAntiPortals

AntiPortalList Ogre::PCZone::mAntiPortals

## ◆ mPCZSM

PCZSceneManager* Ogre::PCZone::mPCZSM

Pointer to the pcz scene manager that created this zone.

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

- OgrePCZone.h