BSP tree node class used for BSP scenes. More...
#include <spTreeNodeBSP.hpp>
Public Member Functions | |
BSPTreeNode (TreeNode *Parent=0) | |
~BSPTreeNode () | |
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. | |
void | findTreeNodes (std::list< const BSPTreeNode * > &TreeNodeList, const dim::vector3df &Pos) const |
void | findTreeNodes (std::list< const BSPTreeNode * > &TreeNodeList, const dim::vector3df &Pos, const f32 Radius) const |
void | setPlane (const dim::plane3df &Plane) |
Sets the BSP node plane. | |
dim::plane3df | getPlane () const |
Returns the BSP node plane. | |
BSPTreeNode * | getChildFront () const |
Returns pointer to the BSPTreeNode child object which lies on the front side of the plane. | |
BSPTreeNode * | getChildBack () const |
Returns pointer to the BSPTreeNode child object which lies on the back side of the plane. |
BSP tree node class used for BSP scenes.
sp::scene::BSPTreeNode::BSPTreeNode | ( | TreeNode * | Parent = 0 |
) |
sp::scene::BSPTreeNode::~BSPTreeNode | ( | ) |
void sp::scene::BSPTreeNode::addChildren | ( | ) | [virtual] |
Creates the children if it currently has none.
Reimplemented from sp::scene::TreeNode.
void sp::scene::BSPTreeNode::findTreeNodes | ( | std::list< const BSPTreeNode * > & | TreeNodeList, | |
const dim::vector3df & | Pos | |||
) | const |
Searchs each BSP node where the specified position is on the front side of the plane. Only those BSP nodes are searched which have no children.
TreeNodeList,: | Resulting list with all found BSPTreeNode objects. This must be a reference and no function's return value because it will be called recursive for each next tree node child. |
void sp::scene::BSPTreeNode::findTreeNodes | ( | std::list< const BSPTreeNode * > & | TreeNodeList, | |
const dim::vector3df & | Pos, | |||
const f32 | Radius | |||
) | const |
Does the same like the first "findTreeNodes" function but considers the radius which occurs that sometimes more than one tree node can be found.
BSPTreeNode* sp::scene::BSPTreeNode::getChildBack | ( | ) | const [inline] |
Returns pointer to the BSPTreeNode child object which lies on the back side of the plane.
BSPTreeNode* sp::scene::BSPTreeNode::getChildFront | ( | ) | const [inline] |
Returns pointer to the BSPTreeNode child object which lies on the front side of the plane.
dim::plane3df sp::scene::BSPTreeNode::getPlane | ( | ) | const [inline] |
Returns the BSP node plane.
bool sp::scene::BSPTreeNode::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::BSPTreeNode::removeChildren | ( | ) | [virtual] |
Deletes the children if it currently has some.
Reimplemented from sp::scene::TreeNode.
void sp::scene::BSPTreeNode::setPlane | ( | const dim::plane3df & | Plane | ) | [inline] |
Sets the BSP node plane.