kd-Tree node class for universal usage.
More...
#include <spTreeNodeKD.hpp>
List of all members.
Public Member Functions |
| KDTreeNode (TreeNode *Parent=0, const dim::aabbox3df &Box=dim::aabbox3df()) |
| ~KDTreeNode () |
bool | isLeaf () const |
| Returns true if this is a leaf node. In this case it has no children.
|
void | addChildren () |
| Creates the children if it currently has none.
|
void | removeChildren () |
| Deletes the children if it currently has some.
|
const TreeNode * | findLeaf (const dim::vector3df &Point) const |
void | findLeafList (std::list< const TreeNode * > &TreeNodeList, const dim::vector3df &Point, f32 Radius) const |
void | findLeafList (std::list< const TreeNode * > &TreeNodeList, const dim::line3df &Line) const |
void | findLeafList (std::list< const TreeNode * > &TreeNodeList, const dim::line3df &Line, f32 Radius) const |
const TreeNode * | findLeafSub (const dim::vector3df &Point) const |
void | findLeafListSub (std::list< const TreeNode * > &TreeNodeList, const dim::vector3df &Point, f32 Radius) const |
template<class A , class B > |
void | addChildren () |
| Creates the children if it currently has none.
|
template<class A , class B > |
void | addChildren (const EKDTreeAxles Axis, f32 Distance) |
template<class T > |
void | addChildren () |
| Creates the children if it currently has none.
|
template<class T > |
void | addChildren (const EKDTreeAxles Axis, f32 Distance) |
TreeNode * | getChildNear () const |
TreeNode * | getChildFar () const |
void | setAxis (const EKDTreeAxles Axis) |
EKDTreeAxles | getAxis () const |
void | setDistance (f32 Distance) |
f32 | getDistance () const |
void | setBox (const dim::aabbox3df &Box) |
dim::aabbox3df | getBox () const |
Detailed Description
kd-Tree node class for universal usage.
Constructor & Destructor Documentation
sp::scene::KDTreeNode::~KDTreeNode |
( |
|
) |
|
Member Function Documentation
void sp::scene::KDTreeNode::addChildren |
( |
|
) |
[virtual] |
template<class A , class B >
void sp::scene::KDTreeNode::addChildren |
( |
|
) |
[inline, virtual] |
template<class A , class B >
void sp::scene::KDTreeNode::addChildren |
( |
const EKDTreeAxles |
Axis, |
|
|
f32 |
Distance | |
|
) |
| | [inline] |
template<class T >
void sp::scene::KDTreeNode::addChildren |
( |
|
) |
[inline, virtual] |
template<class T >
void sp::scene::KDTreeNode::addChildren |
( |
const EKDTreeAxles |
Axis, |
|
|
f32 |
Distance | |
|
) |
| | [inline] |
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 from sp::scene::TreeNode.
void sp::scene::KDTreeNode::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 from sp::scene::TreeNode.
void sp::scene::KDTreeNode::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 from sp::scene::TreeNode.
void sp::scene::KDTreeNode::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 from sp::scene::TreeNode.
void sp::scene::KDTreeNode::findLeafListSub |
( |
std::list< const TreeNode * > & |
TreeNodeList, |
|
|
const dim::vector3df & |
Point, |
|
|
f32 |
Radius | |
|
) |
| | const [virtual] |
EKDTreeAxles sp::scene::KDTreeNode::getAxis |
( |
|
) |
const [inline] |
TreeNode* sp::scene::KDTreeNode::getChildFar |
( |
|
) |
const [inline] |
TreeNode* sp::scene::KDTreeNode::getChildNear |
( |
|
) |
const [inline] |
f32 sp::scene::KDTreeNode::getDistance |
( |
|
) |
const [inline] |
bool sp::scene::KDTreeNode::isLeaf |
( |
|
) |
const [virtual] |
Returns true if this is a leaf node. In this case it has no children.
Implements sp::scene::TreeNode.
void sp::scene::KDTreeNode::removeChildren |
( |
|
) |
[virtual] |
void sp::scene::KDTreeNode::setAxis |
( |
const EKDTreeAxles |
Axis |
) |
[inline] |
void sp::scene::KDTreeNode::setBox |
( |
const dim::aabbox3df & |
Box |
) |
[inline] |
void sp::scene::KDTreeNode::setDistance |
( |
f32 |
Distance |
) |
[inline] |
The documentation for this class was generated from the following files:
- D:/SoftwareEntwicklung/C++/HLC/Tools/SoftPixelEngine/repository/sources/Base/spTreeNodeKD.hpp
- D:/SoftwareEntwicklung/C++/HLC/Tools/SoftPixelEngine/repository/sources/Base/spTreeNodeKD.cpp