Class LBKdTree
Defined in File LBKdTree.hpp
Class Documentation
-
class LBKdTree
The LBKdTree class implements a left-balanced array-based index kd-tree. Left-Balanced: minimum memory Array-Based: Good for GPU - Usage.
Public Functions
-
LBKdTree(const LBPointArray<float> &vertices, int numThreads = -1)
Construct a new LBKdTree object. Note that the tree only stores indices into
vertices, which means thatverticeshas to be kept in memory and in the sam order.- Parameters:
vertices – Array of vertices to build the tree from.
numThreads – Number of threads to use for the tree construction. -1 for all cores.
-
~LBKdTree() = default
-
inline std::shared_ptr<LBPointArray<float>> getKdTreeValues()
Get the kd-tree Values.
Values indicate the split value of the kd-tree for all nodes. For leaves, the value is the index of the point in the vertices array.
-
inline std::shared_ptr<LBPointArray<unsigned char>> getKdTreeSplits()
Get the kd-tree Splits.
Splits indicate the axis that each node splits on.
This array is shorter than the values array, because there are no splits for leaves.
-
LBKdTree(const LBPointArray<float> &vertices, int numThreads = -1)