7 #ifndef CAFU_ORTHO_BSP_TREE_HPP_INCLUDED
8 #define CAFU_ORTHO_BSP_TREE_HPP_INCLUDED
10 #include "Math3D/BoundingBox.hpp"
68 PlaneTypeE GetPlaneType()
const {
return m_PlaneType; }
69 float GetPlaneDist()
const {
return m_PlaneDist; }
70 const NodeT* GetChild(
unsigned int ChildNr)
const {
return m_Children[ChildNr]; }
104 void operator = (
const NodeT&);
109 NodeT* m_Children[2];
141 void BuildTree(NodeT* node);
PlaneTypeE
As the nodes of the tree are not subdivided by arbitrary planes, but only by planes that are parallel...
Definition: OrthoBspTree.hpp:52
~NodeT()
The destructor.
Definition: OrthoBspTree.cpp:26
void Remove(MapElementT *Elem)
Removes the given element from the tree (the structure of the tree remains unchanged).
Definition: OrthoBspTree.hpp:128
unsigned long Update()
Removes and re-inserts map elements from and into the tree whose bounding-box changed so that it disa...
Definition: OrthoBspTree.cpp:244
A plane with normal vector (0, 0, 1), parallel to the x- and y-axis.
Definition: OrthoBspTree.hpp:57
bool DetermineSplitPlane()
Determines an axis-aligned split plane for further BSP partitioning of the contents of this node...
Definition: OrthoBspTree.cpp:51
const NodeT * GetRootNode() const
Returns the BSP trees root node.
Definition: OrthoBspTree.hpp:122
No plane at all. Used for nodes that are actually leaves.
Definition: OrthoBspTree.hpp:54
OrthoBspTreeT(const ArrayT< MapElementT * > &Elems, const BoundingBox3fT &BB)
The constructor.
Definition: OrthoBspTree.cpp:227
void Insert(MapElementT *Elem)
Recursively inserts the given element into the (sub-)tree at and below this node. ...
Definition: OrthoBspTree.cpp:176
NodeT(const BoundingBox3fT &BB)
The constructor.
Definition: OrthoBspTree.cpp:13
void Remove(MapElementT *Elem)
Removes the given element from the (sub-)tree at and below this node (the structure of the tree remai...
Definition: OrthoBspTree.cpp:203
Definition: OrthoBspTree.hpp:45
void FindMismatches(ArrayT< MapElementT * > &Mismatches) const
Finds any map elements in the (sub-)tree whose spatial position disagrees with their position in the ...
Definition: OrthoBspTree.cpp:146
bool IntersectsAllChildren(const BoundingBox3fT &BB) const
Determines whether the given BB intersects (is partly inside) each child of this node.
Definition: OrthoBspTree.cpp:131
~OrthoBspTreeT()
The destructor.
Definition: OrthoBspTree.cpp:238
A plane with normal vector (0, 1, 0), parallel to the x- and z-axis.
Definition: OrthoBspTree.hpp:56
A plane with normal vector (1, 0, 0), parallel to the y- and z-axis.
Definition: OrthoBspTree.hpp:55
This class represents an orthogonal BSP tree (axis-aligned split planes) that spatially organizes Map...
Definition: OrthoBspTree.hpp:41
unsigned long GetNumNodes() const
Returns the number of nodes in the (sub-)tree at and below this node.
Definition: OrthoBspTree.cpp:33
This is the base class for all elements ("objects") that can exist in a map.
Definition: MapElement.hpp:57
void Insert(MapElementT *Elem)
Inserts the given element into the tree (the structure of the tree remains unchanged).
Definition: OrthoBspTree.hpp:125