OGRE 14.3
Object-Oriented Graphics Rendering Engine
|
Octree datastructure for managing scene nodes. More...
#include <OgreOctreeZoneOctree.h>
Public Types | |
typedef std::vector< OctreeNode * > | NodeList |
Public Member Functions | |
Octree (Octree *p) | |
Octree (PCZone *zone, Octree *p) | |
~Octree () | |
~Octree () | |
void | _addNode (OctreeNode *) |
Adds an Octree scene node to this octree level. | |
void | _addNode (PCZSceneNode *) |
Adds an PCZscene node to this octree level. | |
void | _findNodes (const AxisAlignedBox &t, PCZSceneNodeList &list, PCZSceneNode *exclude, bool includeVisitors, bool full) |
void | _findNodes (const PlaneBoundedVolume &t, PCZSceneNodeList &list, PCZSceneNode *exclude, bool includeVisitors, bool full) |
void | _findNodes (const Ray &t, PCZSceneNodeList &list, PCZSceneNode *exclude, bool includeVisitors, bool full) |
void | _findNodes (const Sphere &t, PCZSceneNodeList &list, PCZSceneNode *exclude, bool includeVisitors, bool full) |
void | _getChildIndexes (const AxisAlignedBox &, int *x, int *y, int *z) const |
Returns the appropriate indexes for the child of this octree into which the box will fit. | |
void | _getChildIndexes (const AxisAlignedBox &, int *x, int *y, int *z) const |
Returns the appropriate indexes for the child of this octree into which the box will fit. | |
void | _getCullBounds (AxisAlignedBox *) const |
Creates the AxisAlignedBox used for culling this octree. | |
void | _getCullBounds (AxisAlignedBox *) const |
Creates the AxisAlignedBox used for culling this octree. | |
bool | _isTwiceSize (const AxisAlignedBox &box) const |
Determines if this octree is twice as big as the given box. | |
bool | _isTwiceSize (const AxisAlignedBox &box) const |
Determines if this octree is twice as big as the given box. | |
void | _removeNode (OctreeNode *) |
Removes an Octree scene node to this octree level. | |
void | _removeNode (PCZSceneNode *) |
Removes an PCZscene node to this octree level. | |
WireBoundingBox * | getWireBoundingBox () |
Creates the wire frame bounding box for this octant. | |
WireBoundingBox * | getWireBoundingBox () |
Creates the wire frame bounding box for this octant. | |
int | numNodes () |
Returns the number of scene nodes attached to this octree. | |
int | numNodes () |
Returns the number of scene nodes attached to this octree. | |
Public Attributes | |
AxisAlignedBox | mBox |
The bounding box of the octree. | |
Octree * | mChildren [2][2][2] |
3D array of children of this octree. | |
Vector3 | mHalfSize |
Vector containing the dimensions of this octree / 2. | |
NodeList | mNodes |
Public list of SceneNodes attached to this particular octree. | |
PCZSceneNodeList | mNodes |
Public list of SceneNodes attached to this particular octree. | |
WireBoundingBox * | mWireBoundingBox |
PCZone * | mZone |
Octree datastructure for managing scene nodes.
This is a loose octree implementation, meaning that each octant child of the octree actually overlaps it's siblings by a factor of .5. This guarantees that any thing that is half the size of the parent will fit completely into a child, with no splitting necessary.
typedef std::vector< OctreeNode * > Ogre::Octree::NodeList |
Ogre::Octree::Octree | ( | Octree * | p | ) |
Ogre::Octree::~Octree | ( | ) |
Ogre::Octree::~Octree | ( | ) |
void Ogre::Octree::_addNode | ( | OctreeNode * | ) |
Adds an Octree scene node to this octree level.
This is called by the OctreeSceneManager after it has determined the correct Octree to insert the node into.
void Ogre::Octree::_removeNode | ( | OctreeNode * | ) |
Removes an Octree scene node to this octree level.
|
inline |
Returns the number of scene nodes attached to this octree.
WireBoundingBox * Ogre::Octree::getWireBoundingBox | ( | ) |
Creates the wire frame bounding box for this octant.
bool Ogre::Octree::_isTwiceSize | ( | const AxisAlignedBox & | box | ) | const |
Determines if this octree is twice as big as the given box.
This method is used by the OctreeSceneManager to determine if the given box will fit into a child of this octree.
Returns the appropriate indexes for the child of this octree into which the box will fit.
This is used by the OctreeSceneManager to determine which child to traverse next when finding the appropriate octree to insert the box. Since it is a loose octree, only the center of the box is checked to determine the octant.
void Ogre::Octree::_getCullBounds | ( | AxisAlignedBox * | ) | const |
Creates the AxisAlignedBox used for culling this octree.
Since it's a loose octree, the culling bounds can be different than the actual bounds of the octree.
void Ogre::Octree::_addNode | ( | PCZSceneNode * | ) |
Adds an PCZscene node to this octree level.
This is called by the OctreeZone after it has determined the correct Octree to insert the node into.
void Ogre::Octree::_removeNode | ( | PCZSceneNode * | ) |
Removes an PCZscene node to this octree level.
|
inline |
Returns the number of scene nodes attached to this octree.
WireBoundingBox * Ogre::Octree::getWireBoundingBox | ( | ) |
Creates the wire frame bounding box for this octant.
bool Ogre::Octree::_isTwiceSize | ( | const AxisAlignedBox & | box | ) | const |
Determines if this octree is twice as big as the given box.
This method is used by the OctreeSceneManager to determine if the given box will fit into a child of this octree.
Returns the appropriate indexes for the child of this octree into which the box will fit.
This is used by the OctreeSceneManager to determine which child to traverse next when finding the appropriate octree to insert the box. Since it is a loose octree, only the center of the box is checked to determine the octant.
void Ogre::Octree::_getCullBounds | ( | AxisAlignedBox * | ) | const |
Creates the AxisAlignedBox used for culling this octree.
Since it's a loose octree, the culling bounds can be different than the actual bounds of the octree.
void Ogre::Octree::_findNodes | ( | const AxisAlignedBox & | t, |
PCZSceneNodeList & | list, | ||
PCZSceneNode * | exclude, | ||
bool | includeVisitors, | ||
bool | full | ||
) |
void Ogre::Octree::_findNodes | ( | const Ray & | t, |
PCZSceneNodeList & | list, | ||
PCZSceneNode * | exclude, | ||
bool | includeVisitors, | ||
bool | full | ||
) |
void Ogre::Octree::_findNodes | ( | const Sphere & | t, |
PCZSceneNodeList & | list, | ||
PCZSceneNode * | exclude, | ||
bool | includeVisitors, | ||
bool | full | ||
) |
void Ogre::Octree::_findNodes | ( | const PlaneBoundedVolume & | t, |
PCZSceneNodeList & | list, | ||
PCZSceneNode * | exclude, | ||
bool | includeVisitors, | ||
bool | full | ||
) |
AxisAlignedBox Ogre::Octree::mBox |
The bounding box of the octree.
This is used for octant index determination and rendering, but not culling
WireBoundingBox * Ogre::Octree::mWireBoundingBox |
Octree * Ogre::Octree::mChildren |
3D array of children of this octree.
Children are dynamically created as needed when nodes are inserted in the Octree. If, later, all the nodes are removed from the child, it is still kept around.
NodeList Ogre::Octree::mNodes |
Public list of SceneNodes attached to this particular octree.
PCZSceneNodeList Ogre::Octree::mNodes |
Public list of SceneNodes attached to this particular octree.
PCZone* Ogre::Octree::mZone |