Quadtree.
More...
#include <Quadtree.h>
List of all members.
Public Member Functions |
PLMATH_API | Quadtree () |
| Constructor.
|
virtual PLMATH_API | ~Quadtree () |
| Destructor.
|
PLMATH_API void | Init (PLCore::uint32 nXOffset=0, PLCore::uint32 nYOffset=0, PLCore::uint32 nXSize=0, PLCore::uint32 nYSize=0, Quadtree *pParent=nullptr) |
| Initializes the quadtree.
|
PLMATH_API bool | Build () |
| Builds the quadtree.
|
PLMATH_API void | Destroy () |
| Destroy the quadtree.
|
PLMATH_API void | UpdateBoundingBoxes (QuadtreePatch **ppPatch) |
| Updates the bounding boxes of the quadtree.
|
PLMATH_API void | UpdateVisibility (const PlaneSet &cPlaneSet, QuadtreePatch **ppPatch) const |
| Updates the visibility information of the quadtree patches.
|
PLMATH_API void | GetBoundingBoxMinMax (Vector3 &vMin, Vector3 &vMax) const |
| Returns the bounding box minimum/maximum values.
|
PLMATH_API PLCore::uint32 | GetNumOfChildren () const |
| Returns the number of children.
|
PLMATH_API Quadtree * | GetChild (PLCore::uint32 nChild) const |
| Returns a child.
|
Detailed Description
Constructor & Destructor Documentation
Member Function Documentation
PLMATH_API void PLMath::Quadtree::Init |
( |
PLCore::uint32 |
nXOffset = 0 , |
|
|
PLCore::uint32 |
nYOffset = 0 , |
|
|
PLCore::uint32 |
nXSize = 0 , |
|
|
PLCore::uint32 |
nYSize = 0 , |
|
|
Quadtree * |
pParent = nullptr |
|
) |
| |
Initializes the quadtree.
- Parameters:
-
[in] | nXOffset | Quadtree x offset |
[in] | nYOffset | Quadtree y offset |
[in] | nXSize | Quadtree x dimension |
[in] | nYSize | Quadtree y dimension |
[in] | pParent | Parent quadtree, can be a null pointer |
- Note:
- You should destroy the old quadtree before you initialize the new one!
Builds the quadtree.
- Returns:
- 'true' if all went fine, else 'false'
- Note:
- The quadtree must be initialized first!
Updates the bounding boxes of the quadtree.
- Parameters:
-
[out] | ppPatch | Pointer to the quadtree patches, can be a null pointer (in that case this function is quite useless...) |
- Note:
- There must be x size * y size patches in the array!
- The quadtree patches must have correct bounding boxes
- If the bounding box of a patch is changed you have to recall this function!
Updates the visibility information of the quadtree patches.
- Parameters:
-
[in] | cPlaneSet | Plane set to check |
[out] | ppPatch | Patches to be updated, can be a null pointer (in that case this function is quite useless...) |
- Note:
- The quadtree bounding boxes must being initialized with this patches!
- See also:
-
Returns the bounding box minimum/maximum values.
- Parameters:
-
[out] | vMin | Receives the bounding box minimum value |
[out] | vMax | Receives the bounding box maximum value |
Returns the number of children.
- Returns:
- Number of children
Returns a child.
- Parameters:
-
[in] | nChild | Child to return |
- Returns:
- The requested child, a null pointer on error
The documentation for this class was generated from the following file: