implements the computation of a kd tree on a point array More...
#include <WKdTree.h>
Public Member Functions | |
| WKdTree (int size, float *pointArray) | |
| constructor | |
| ~WKdTree () | |
| destructor | |
Public Attributes | |
| std::vector< unsigned int > | m_tree |
| stores the tree | |
Private Member Functions | |
| void | buildTree (int left, int right, int axis) |
| recursive function to compute a part of the kd tree | |
Private Attributes | |
| int | m_size |
| size of the tree | |
| unsigned int | m_root |
| index of the root point | |
| float * | m_pointArray |
| stores a pointer to the vertex array | |
implements the computation of a kd tree on a point array
Definition at line 105 of file WKdTree.h.
| WKdTree::WKdTree | ( | int | size, | |
| float * | pointArray | |||
| ) |
constructor
| size | ||
| pointArray |
Definition at line 33 of file WKdTree.cpp.
References wlog::debug(), m_pointArray, m_tree, WThreadedRunner::run(), and WThreadedRunner::wait().
| WKdTree::~WKdTree | ( | ) |
destructor
Definition at line 81 of file WKdTree.cpp.
| void WKdTree::buildTree | ( | int | left, | |
| int | right, | |||
| int | axis | |||
| ) | [private] |
recursive function to compute a part of the kd tree
| left | ||
| right | ||
| axis |
Definition at line 85 of file WKdTree.cpp.
References m_pointArray, and m_tree.
float* WKdTree::m_pointArray [private] |
stores a pointer to the vertex array
Definition at line 134 of file WKdTree.h.
Referenced by buildTree(), and WKdTree().
unsigned int WKdTree::m_root [private] |
int WKdTree::m_size [private] |
| std::vector< unsigned int > WKdTree::m_tree |
1.7.1