OpenWalnut  1.3.1
Public Member Functions | Public Attributes | Private Member Functions | Private Attributes | List of all members
WKdTree Class Reference

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

Detailed Description

implements the computation of a kd tree on a point array

Definition at line 105 of file WKdTree.h.

Constructor & Destructor Documentation

WKdTree::WKdTree ( int  size,
float *  pointArray 
)

constructor

Parameters
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.

Member Function Documentation

void WKdTree::buildTree ( int  left,
int  right,
int  axis 
)
private

recursive function to compute a part of the kd tree

Parameters
left
right
axis

Definition at line 85 of file WKdTree.cpp.

References m_pointArray, and m_tree.

Member Data Documentation

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

index of the root point

Definition at line 133 of file WKdTree.h.

int WKdTree::m_size
private

size of the tree

Definition at line 132 of file WKdTree.h.

std::vector< unsigned int > WKdTree::m_tree

stores the tree

Definition at line 121 of file WKdTree.h.

Referenced by buildTree(), and WKdTree().


The documentation for this class was generated from the following files: