This is the tree node base class.
More...
#include <spTreeNode.hpp>
List of all members.
Public Member Functions |
| virtual | ~TreeNode () |
| virtual const TreeNode * | getRoot () const |
| | Returns a constant pointer to the tree root node.
|
| virtual TreeNode * | getRoot () |
| | Returns a pointer to the tree root node.
|
| virtual u32 | getLevel () const |
| | Returns the tree level. The root node has level 0, its children 1 and so on.
|
| virtual bool | isLeaf () const =0 |
| | Returns true if this is a leaf node. In this case it has no children.
|
| virtual void | addChildren () |
| | Creates the children if it currently has none.
|
| virtual void | removeChildren () |
| | Deletes the children if it currently has some.
|
| virtual const TreeNode * | findLeaf (const dim::vector3df &Point) const |
| virtual void | findLeafList (std::list< const TreeNode * > &TreeNodeList, const dim::vector3df &Point, f32 Radius) const |
| virtual void | findLeafList (std::list< const TreeNode * > &TreeNodeList, const dim::line3df &Line) const |
| virtual void | findLeafList (std::list< const TreeNode * > &TreeNodeList, const dim::line3df &Line, f32 Radius) const |
| virtual const TreeNode * | findLeafSub (const dim::vector3df &Point) const |
| virtual void | findLeafListSub (std::list< const TreeNode * > &TreeNodeList, const dim::vector3df &Point, f32 Radius) const |
| ETreeNodeTypes | getType () const |
| | Returns the type of tree node (QuadTree, OcTree, BSP-Tree, kd-Tree).
|
| TreeNode * | getParent () const |
| | Returns the parent node.
|
| bool | isRoot () const |
| | Returns true if this node is a root node (when it has no parent).
|
| void | setDestructorCallback (const TreeNodeDestructorCallback &Callback) |
Protected Member Functions |
| | TreeNode (TreeNode *Parent, const ETreeNodeTypes Type) |
| template<class T > |
| TreeNode * | createChild (const dim::aabbox3df &Box) |
Protected Attributes |
| ETreeNodeTypes | Type_ |
| TreeNode * | Parent_ |
| TreeNodeDestructorCallback | DestructorCallback_ |
Static Protected Attributes |
| static const f32 | EXT_BOUNDBOX_SIZE = 0.01f |
Detailed Description
This is the tree node base class.
Constructor & Destructor Documentation
| sp::scene::TreeNode::~TreeNode |
( |
|
) |
[virtual] |
Member Function Documentation
| void sp::scene::TreeNode::addChildren |
( |
|
) |
[virtual] |
Searches for a leaf TreeNode object that contains the specified point.
- Parameters:
-
| Point,: | Specifies the point where the node is you are searching for. |
- Returns:
- Pointer to the TreeNode object which has been found. If no tree node has been found the return value is null.
Reimplemented in sp::scene::KDTreeNode, and sp::scene::OBBTreeNode.
| void sp::scene::TreeNode::findLeafList |
( |
std::list< const TreeNode * > & |
TreeNodeList, |
|
|
const dim::vector3df & |
Point, |
|
|
f32 |
Radius | |
|
) |
| | const [virtual] |
Searches all leaf TreeNode objects that contains the specified ellipsoid.
- Parameters:
-
| TreeNodeList,: | Specifies the list where the result will be stored. |
| Point,: | Specifies the ellipsoid's point. |
| Radius,: | Specifies the ellipsoid's volumetric radius. |
Reimplemented in sp::scene::KDTreeNode, and sp::scene::OBBTreeNode.
| void sp::scene::TreeNode::findLeafList |
( |
std::list< const TreeNode * > & |
TreeNodeList, |
|
|
const dim::line3df & |
Line | |
|
) |
| | const [virtual] |
Searches all leaf TreeNode objects which the specified line intersects.
- Parameters:
-
| TreeNodeList,: | Specifies the list where the result will be stored. |
| Line,: | Specifies the line which is to be used for intersection tests. When you want to transform the whole tree transform the line inverse instead. |
Reimplemented in sp::scene::KDTreeNode, and sp::scene::OBBTreeNode.
| void sp::scene::TreeNode::findLeafList |
( |
std::list< const TreeNode * > & |
TreeNodeList, |
|
|
const dim::line3df & |
Line, |
|
|
f32 |
Radius | |
|
) |
| | const [virtual] |
Searches all leaf TreeNode objects which the specified volumetric line intersects.
- Parameters:
-
| TreeNodeList,: | Specifies the list where the result will be stored. |
| Line,: | Specifies the line which is to be used for intersection tests. |
| Radius,: | Specifise the line's radius (or rather size). |
Reimplemented in sp::scene::KDTreeNode, and sp::scene::OBBTreeNode.
| void sp::scene::TreeNode::findLeafListSub |
( |
std::list< const TreeNode * > & |
TreeNodeList, |
|
|
const dim::vector3df & |
Point, |
|
|
f32 |
Radius | |
|
) |
| | const [virtual] |
| u32 sp::scene::TreeNode::getLevel |
( |
|
) |
const [virtual] |
Returns the tree level. The root node has level 0, its children 1 and so on.
| TreeNode* sp::scene::TreeNode::getParent |
( |
|
) |
const [inline] |
| const TreeNode * sp::scene::TreeNode::getRoot |
( |
|
) |
const [virtual] |
Returns a constant pointer to the tree root node.
| TreeNode * sp::scene::TreeNode::getRoot |
( |
|
) |
[virtual] |
Returns a pointer to the tree root node.
Returns the type of tree node (QuadTree, OcTree, BSP-Tree, kd-Tree).
| virtual bool sp::scene::TreeNode::isLeaf |
( |
|
) |
const [pure virtual] |
| bool sp::scene::TreeNode::isRoot |
( |
|
) |
const [inline] |
Returns true if this node is a root node (when it has no parent).
| void sp::scene::TreeNode::removeChildren |
( |
|
) |
[virtual] |
Member Data Documentation
The documentation for this class was generated from the following files:
- D:/SoftwareEntwicklung/C++/HLC/Tools/SoftPixelEngine/repository/sources/Base/spTreeNode.hpp
- D:/SoftwareEntwicklung/C++/HLC/Tools/SoftPixelEngine/repository/sources/Base/spTreeNode.cpp