OGRE  1.7
Object-Oriented Graphics Rendering Engine
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Ogre::OctreeZone Class Reference

#include <OgreOctreeZone.h>

+ Inheritance diagram for Ogre::OctreeZone:
+ Collaboration diagram for Ogre::OctreeZone:

Public Types

enum  NODE_LIST_TYPE { HOME_NODE_LIST = 1, VISITOR_NODE_LIST = 2 }
 

Public Member Functions

 OctreeZone (PCZSceneManager *, const String &)
 
virtual ~OctreeZone ()
 
virtual void _addAntiPortal (AntiPortal *newAntiPortal)
 
virtual void _addNode (PCZSceneNode *)
 Adds an SceneNode to this OctreeZone. More...
 
virtual void _addPortal (Portal *newPortal)
 
virtual void _checkLightAgainstPortals (PCZLight *, unsigned long, PCZFrustum *, Portal *)
 (recursive) check the given light against all portals in the zone More...
 
virtual void _checkNodeAgainstPortals (PCZSceneNode *, Portal *)
 (recursive) check the given node against all portals in the zone More...
 
virtual void _clearNodeLists (short nodeListTypes)
 Remove all nodes from the node reference list and clear it. More...
 
virtual void _findNodes (const AxisAlignedBox &t, PCZSceneNodeList &list, PortalList &visitedPortals, bool includeVisitors, bool recurseThruPortals, PCZSceneNode *exclude)
 
virtual void _findNodes (const Sphere &t, PCZSceneNodeList &list, PortalList &visitedPortals, bool includeVisitors, bool recurseThruPortals, PCZSceneNode *exclude)
 
virtual void _findNodes (const PlaneBoundedVolume &t, PCZSceneNodeList &list, PortalList &visitedPortals, bool includeVisitors, bool recurseThruPortals, PCZSceneNode *exclude)
 
virtual void _findNodes (const Ray &t, PCZSceneNodeList &list, PortalList &visitedPortals, bool includeVisitors, bool recurseThruPortals, PCZSceneNode *exclude)
 
virtual void _removeAntiPortal (AntiPortal *removeAntiPortal)
 
virtual void _removePortal (Portal *removePortal)
 
void addNodeToOctree (PCZSceneNode *, Octree *octree, int depth=0)
 Adds the Octree Node, starting at the given octree, and recursing at max to the specified depth. More...
 
virtual void createNodeZoneData (PCZSceneNode *)
 create zone specific data for a node More...
 
void dirtyNodeByMovingPortals (void)
 Mark nodes dirty base on moving portals. More...
 
virtual PortalfindMatchingPortal (Portal *)
 find a matching portal (for connecting portals) More...
 
virtual void findVisibleNodes (PCZCamera *, NodeList &visibleNodeList, RenderQueue *queue, VisibleObjectsBoundsInfo *visibleBounds, bool onlyShadowCasters, bool displayNodes, bool showBoundingBoxes)
 Find and add visible objects to the render queue. More...
 
virtual void getAABB (AxisAlignedBox &)
 
SceneNodegetEnclosureNode (void)
 
unsigned long getLastVisibleFrame (void)
 
PCZCameragetLastVisibleFromCamera ()
 
const StringgetName (void) const
 
bool getPortalsUpdated (void)
 
void * getUserData (void)
 
const StringgetZoneTypeName () const
 
bool hasSky (void)
 
void init (AxisAlignedBox &box, int depth)
 
virtual void notifyBeginRenderScene (void)
 
virtual void notifyCameraCreated (Camera *c)
 called when the scene manager creates a camera because some zone managers (like TerrainZone) need the camera info. More...
 
virtual void notifyWorldGeometryRenderQueue (uint8 qid)
 
void operator delete (void *ptr)
 
void operator delete (void *ptr, void *)
 
void operator delete (void *ptr, const char *, int, const char *)
 
void operator delete[] (void *ptr)
 
void operator delete[] (void *ptr, const char *, int, const char *)
 
void * operator new (size_t sz, const char *file, int line, const char *func)
 operator new, with debug line info More...
 
void * operator new (size_t sz)
 
void * operator new (size_t sz, void *ptr)
 placement operator new More...
 
void * operator new[] (size_t sz, const char *file, int line, const char *func)
 array operator new, with debug line info More...
 
void * operator new[] (size_t sz)
 
virtual void removeNode (PCZSceneNode *)
 Removes all references to a SceneNode from this Zone. More...
 
void removeNodeFromOctree (PCZSceneNode *)
 Removes the node from the octree it is in. More...
 
virtual bool requiresZoneSpecificNodeData (void)
 Indicates whether or not this zone requires zone-specific data for each scene node. More...
 
void resize (const AxisAlignedBox &box)
 Resizes the octree to the given size. More...
 
virtual void setEnclosureNode (PCZSceneNode *)
 Set the enclosure node for this OctreeZone. More...
 
void setHasSky (bool yesno)
 if sky should be drawn with this zone More...
 
void setLastVisibleFrame (unsigned long frameCount)
 
void setLastVisibleFromCamera (PCZCamera *camera)
 
virtual bool setOption (const String &, const void *)
 Sets the given option for the Zone. More...
 
void setPortalsUpdated (bool updated)
 
void setUserData (void *userData)
 
virtual void setZoneGeometry (const String &filename, PCZSceneNode *parentNode)
 
virtual PCZoneupdateNodeHomeZone (PCZSceneNode *pczsn, bool allowBackTouces)
 
void updateNodeOctant (OctreeZoneData *zoneData)
 Checks the given OctreeNode, and determines if it needs to be moved to a different octant. More...
 
void updatePortalsZoneData (void)
 

Public Attributes

AntiPortalList mAntiPortals
 
PCZSceneManagermPCZSM
 
PortalList mPortals
 list of Portals which this zone contains (each portal leads to another zone) More...
 

Protected Member Functions

void walkOctree (PCZCamera *, NodeList &, RenderQueue *, Octree *, VisibleObjectsBoundsInfo *visibleBounds, bool foundvisible, bool onlyShadowCasters, bool displayNodes, bool showBoundingBoxes)
 Walks through the octree, adding any visible objects to the render queue. More...
 

Protected Attributes

AxisAlignedBox mBox
 Size of the octree. More...
 
SceneNodemEnclosureNode
 
bool mHasSky
 
PCZSceneNodeList mHomeNodeList
 
unsigned long mLastVisibleFrame
 
PCZCameramLastVisibleFromCamera
 
bool mLoose
 
int mMaxDepth
 Max depth for the tree. More...
 
String mName
 
OctreemOctree
 The root octree. More...
 
bool mPortalsUpdated
 
void * mUserData
 
PCZSceneNodeList mVisitorNodeList
 
String mZoneTypeName
 Zone type name. More...
 

Detailed Description

Definition at line 54 of file OgreOctreeZone.h.

Member Enumeration Documentation

Enumerator
HOME_NODE_LIST 
VISITOR_NODE_LIST 

Definition at line 86 of file OgrePCZone.h.

Constructor & Destructor Documentation

Ogre::OctreeZone::OctreeZone ( PCZSceneManager ,
const String  
)
virtual Ogre::OctreeZone::~OctreeZone ( )
virtual

Member Function Documentation

virtual void Ogre::PCZone::_addAntiPortal ( AntiPortal newAntiPortal)
virtualinherited
virtual void Ogre::OctreeZone::_addNode ( PCZSceneNode )
virtual

Adds an SceneNode to this OctreeZone.

Remarks
The PCZSceneManager calls this function to add a node to the zone.

Implements Ogre::PCZone.

virtual void Ogre::PCZone::_addPortal ( Portal newPortal)
virtualinherited
virtual void Ogre::OctreeZone::_checkLightAgainstPortals ( PCZLight ,
unsigned  long,
PCZFrustum ,
Portal  
)
virtual

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

Implements Ogre::PCZone.

virtual void Ogre::OctreeZone::_checkNodeAgainstPortals ( PCZSceneNode ,
Portal  
)
virtual

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

Implements Ogre::PCZone.

virtual void Ogre::OctreeZone::_clearNodeLists ( short  nodeListTypes)
virtual

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

Reimplemented from Ogre::PCZone.

virtual void Ogre::OctreeZone::_findNodes ( const AxisAlignedBox t,
PCZSceneNodeList list,
PortalList visitedPortals,
bool  includeVisitors,
bool  recurseThruPortals,
PCZSceneNode exclude 
)
virtual

Implements Ogre::PCZone.

virtual void Ogre::OctreeZone::_findNodes ( const Sphere t,
PCZSceneNodeList list,
PortalList visitedPortals,
bool  includeVisitors,
bool  recurseThruPortals,
PCZSceneNode exclude 
)
virtual

Implements Ogre::PCZone.

virtual void Ogre::OctreeZone::_findNodes ( const PlaneBoundedVolume t,
PCZSceneNodeList list,
PortalList visitedPortals,
bool  includeVisitors,
bool  recurseThruPortals,
PCZSceneNode exclude 
)
virtual

Implements Ogre::PCZone.

virtual void Ogre::OctreeZone::_findNodes ( const Ray t,
PCZSceneNodeList list,
PortalList visitedPortals,
bool  includeVisitors,
bool  recurseThruPortals,
PCZSceneNode exclude 
)
virtual

Implements Ogre::PCZone.

virtual void Ogre::PCZone::_removeAntiPortal ( AntiPortal removeAntiPortal)
virtualinherited
virtual void Ogre::PCZone::_removePortal ( Portal removePortal)
virtualinherited
void Ogre::OctreeZone::addNodeToOctree ( PCZSceneNode ,
Octree octree,
int  depth = 0 
)

Adds the Octree Node, starting at the given octree, and recursing at max to the specified depth.

virtual void Ogre::OctreeZone::createNodeZoneData ( PCZSceneNode )
virtual

create zone specific data for a node

Reimplemented from Ogre::PCZone.

void Ogre::OctreeZone::dirtyNodeByMovingPortals ( void  )
virtual

Mark nodes dirty base on moving portals.

Implements Ogre::PCZone.

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

find a matching portal (for connecting portals)

virtual void Ogre::OctreeZone::findVisibleNodes ( PCZCamera ,
NodeList visibleNodeList,
RenderQueue queue,
VisibleObjectsBoundsInfo visibleBounds,
bool  onlyShadowCasters,
bool  displayNodes,
bool  showBoundingBoxes 
)
virtual

Find and add visible objects to the render queue.

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

Implements Ogre::PCZone.

virtual void Ogre::OctreeZone::getAABB ( AxisAlignedBox )
virtual

Reimplemented from Ogre::PCZone.

SceneNode* Ogre::PCZone::getEnclosureNode ( void  )
inlineinherited

Definition at line 103 of file OgrePCZone.h.

unsigned long Ogre::PCZone::getLastVisibleFrame ( void  )
inlineinherited

Definition at line 117 of file OgrePCZone.h.

PCZCamera* Ogre::PCZone::getLastVisibleFromCamera ( )
inlineinherited

Definition at line 123 of file OgrePCZone.h.

const String& Ogre::PCZone::getName ( void  ) const
inlineinherited

Definition at line 99 of file OgrePCZone.h.

bool Ogre::PCZone::getPortalsUpdated ( void  )
inlineinherited

Definition at line 245 of file OgrePCZone.h.

void* Ogre::PCZone::getUserData ( void  )
inlineinherited

Definition at line 247 of file OgrePCZone.h.

const String& Ogre::PCZone::getZoneTypeName ( ) const
inlineinherited

Definition at line 96 of file OgrePCZone.h.

bool Ogre::PCZone::hasSky ( void  )
inlineinherited

Definition at line 111 of file OgrePCZone.h.

void Ogre::OctreeZone::init ( AxisAlignedBox box,
int  depth 
)
virtual void Ogre::OctreeZone::notifyBeginRenderScene ( void  )
virtual

Implements Ogre::PCZone.

Reimplemented in Ogre::TerrainZone.

virtual void Ogre::OctreeZone::notifyCameraCreated ( Camera c)
virtual

called when the scene manager creates a camera because some zone managers (like TerrainZone) need the camera info.

Implements Ogre::PCZone.

Reimplemented in Ogre::TerrainZone.

virtual void Ogre::OctreeZone::notifyWorldGeometryRenderQueue ( uint8  qid)
virtual

Implements Ogre::PCZone.

Reimplemented in Ogre::TerrainZone.

template<class Alloc >
void Ogre::AllocatedObject< Alloc >::operator delete ( void *  ptr)
inlineinherited

Definition at line 95 of file OgreMemoryAllocatedObject.h.

template<class Alloc >
void Ogre::AllocatedObject< Alloc >::operator delete ( void *  ptr,
void *   
)
inlineinherited

Definition at line 101 of file OgreMemoryAllocatedObject.h.

template<class Alloc >
void Ogre::AllocatedObject< Alloc >::operator delete ( void *  ptr,
const char *  ,
int  ,
const char *   
)
inlineinherited

Definition at line 107 of file OgreMemoryAllocatedObject.h.

template<class Alloc >
void Ogre::AllocatedObject< Alloc >::operator delete[] ( void *  ptr)
inlineinherited

Definition at line 112 of file OgreMemoryAllocatedObject.h.

template<class Alloc >
void Ogre::AllocatedObject< Alloc >::operator delete[] ( void *  ptr,
const char *  ,
int  ,
const char *   
)
inlineinherited

Definition at line 118 of file OgreMemoryAllocatedObject.h.

template<class Alloc >
void* Ogre::AllocatedObject< Alloc >::operator new ( size_t  sz,
const char *  file,
int  line,
const char *  func 
)
inlineinherited

operator new, with debug line info

Definition at line 67 of file OgreMemoryAllocatedObject.h.

template<class Alloc >
void* Ogre::AllocatedObject< Alloc >::operator new ( size_t  sz)
inlineinherited

Definition at line 72 of file OgreMemoryAllocatedObject.h.

template<class Alloc >
void* Ogre::AllocatedObject< Alloc >::operator new ( size_t  sz,
void *  ptr 
)
inlineinherited

placement operator new

Definition at line 78 of file OgreMemoryAllocatedObject.h.

template<class Alloc >
void* Ogre::AllocatedObject< Alloc >::operator new[] ( size_t  sz,
const char *  file,
int  line,
const char *  func 
)
inlineinherited

array operator new, with debug line info

Definition at line 85 of file OgreMemoryAllocatedObject.h.

template<class Alloc >
void* Ogre::AllocatedObject< Alloc >::operator new[] ( size_t  sz)
inlineinherited

Definition at line 90 of file OgreMemoryAllocatedObject.h.

virtual void Ogre::OctreeZone::removeNode ( PCZSceneNode )
virtual

Removes all references to a SceneNode from this Zone.

Implements Ogre::PCZone.

void Ogre::OctreeZone::removeNodeFromOctree ( PCZSceneNode )

Removes the node from the octree it is in.

virtual bool Ogre::OctreeZone::requiresZoneSpecificNodeData ( void  )
virtual

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

Implements Ogre::PCZone.

void Ogre::OctreeZone::resize ( const AxisAlignedBox box)

Resizes the octree to the given size.

virtual void Ogre::OctreeZone::setEnclosureNode ( PCZSceneNode )
virtual

Set the enclosure node for this OctreeZone.

Implements Ogre::PCZone.

Reimplemented in Ogre::TerrainZone.

void Ogre::PCZone::setHasSky ( bool  yesno)
inlineinherited

if sky should be drawn with this zone

Definition at line 107 of file OgrePCZone.h.

void Ogre::PCZone::setLastVisibleFrame ( unsigned long  frameCount)
inlineinherited

Definition at line 114 of file OgrePCZone.h.

void Ogre::PCZone::setLastVisibleFromCamera ( PCZCamera camera)
inlineinherited

Definition at line 120 of file OgrePCZone.h.

virtual bool Ogre::OctreeZone::setOption ( const String ,
const void *   
)
virtual

Sets the given option for the Zone.

Remarks
Options are: "Size", AxisAlignedBox *; "Depth", int *; "ShowOctree", bool *;

Implements Ogre::PCZone.

Reimplemented in Ogre::TerrainZone.

void Ogre::PCZone::setPortalsUpdated ( bool  updated)
inlineinherited

Definition at line 244 of file OgrePCZone.h.

void Ogre::PCZone::setUserData ( void *  userData)
inlineinherited

Definition at line 248 of file OgrePCZone.h.

virtual void Ogre::OctreeZone::setZoneGeometry ( const String filename,
PCZSceneNode parentNode 
)
virtual

Implements Ogre::PCZone.

Reimplemented in Ogre::TerrainZone.

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

Implements Ogre::PCZone.

void Ogre::OctreeZone::updateNodeOctant ( OctreeZoneData zoneData)

Checks the given OctreeNode, and determines if it needs to be moved to a different octant.

void Ogre::OctreeZone::updatePortalsZoneData ( void  )
virtual

Implements Ogre::PCZone.

void Ogre::OctreeZone::walkOctree ( PCZCamera ,
NodeList ,
RenderQueue ,
Octree ,
VisibleObjectsBoundsInfo visibleBounds,
bool  foundvisible,
bool  onlyShadowCasters,
bool  displayNodes,
bool  showBoundingBoxes 
)
protected

Walks through the octree, adding any visible objects to the render queue.

Remarks
If any octant in the octree if completely within the view frustum, all subchildren are automatically added with no visibility tests.

Member Data Documentation

AntiPortalList Ogre::PCZone::mAntiPortals
inherited

Definition at line 252 of file OgrePCZone.h.

AxisAlignedBox Ogre::OctreeZone::mBox
protected

Size of the octree.

Definition at line 211 of file OgreOctreeZone.h.

SceneNode* Ogre::PCZone::mEnclosureNode
protectedinherited

Definition at line 283 of file OgrePCZone.h.

bool Ogre::PCZone::mHasSky
protectedinherited

Definition at line 281 of file OgrePCZone.h.

PCZSceneNodeList Ogre::PCZone::mHomeNodeList
protectedinherited

Definition at line 285 of file OgrePCZone.h.

unsigned long Ogre::PCZone::mLastVisibleFrame
protectedinherited

Definition at line 277 of file OgrePCZone.h.

PCZCamera* Ogre::PCZone::mLastVisibleFromCamera
protectedinherited

Definition at line 279 of file OgrePCZone.h.

bool Ogre::OctreeZone::mLoose
protected

Definition at line 213 of file OgreOctreeZone.h.

int Ogre::OctreeZone::mMaxDepth
protected

Max depth for the tree.

Definition at line 209 of file OgreOctreeZone.h.

String Ogre::PCZone::mName
protectedinherited

Definition at line 273 of file OgrePCZone.h.

Octree* Ogre::OctreeZone::mOctree
protected

The root octree.

Definition at line 207 of file OgreOctreeZone.h.

PCZSceneManager* Ogre::PCZone::mPCZSM
inherited

Definition at line 254 of file OgrePCZone.h.

PortalList Ogre::PCZone::mPortals
inherited

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

Definition at line 251 of file OgrePCZone.h.

bool Ogre::PCZone::mPortalsUpdated
protectedinherited

Definition at line 289 of file OgrePCZone.h.

void* Ogre::PCZone::mUserData
protectedinherited

Definition at line 292 of file OgrePCZone.h.

PCZSceneNodeList Ogre::PCZone::mVisitorNodeList
protectedinherited

Definition at line 287 of file OgrePCZone.h.

String Ogre::PCZone::mZoneTypeName
protectedinherited

Zone type name.

Definition at line 275 of file OgrePCZone.h.


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