Nori
|
Min-max binning as described in "Highly Parallel Fast KD-tree Construction for Interactive Ray Tracing of Dynamic Scenes" by M. Shevtsov, A. Soupikov and A. Kapustin. More...
#include <gkdtree.h>
Public Member Functions | |
MinMaxBins (SizeType nBins) | |
~MinMaxBins () | |
void | setBoundingBox (const BoundingBoxType &bbox) |
Prepare to bin for the specified bounds. | |
void | bin (const Derived *derived, IndexType *indices, SizeType primCount) |
Run min-max binning. | |
SplitCandidate | minimizeCost (float traversalCost, float queryCost) |
Evaluate the tree construction heuristic at each bin boundary and return the minimizer for the given cost constants. Min-max binning uses no "empty space bonus" since it cannot create such splits. | |
boost::tuple< BoundingBoxType, IndexType *, BoundingBoxType, IndexType * > | partition (BuildContext &ctx, const Derived *derived, IndexType *primIndices, SplitCandidate &split, bool isLeftChild, float traversalCost, float queryCost) |
Given a suitable split candiate, compute tight bounding boxes for the left and right subtrees and return associated primitive lists. |
Min-max binning as described in "Highly Parallel Fast KD-tree Construction for Interactive Ray Tracing of Dynamic Scenes" by M. Shevtsov, A. Soupikov and A. Kapustin.
GenericKDTree< BoundingBoxType, TreeConstructionHeuristic, Derived >::MinMaxBins::MinMaxBins | ( | SizeType | nBins | ) | [inline] |
GenericKDTree< BoundingBoxType, TreeConstructionHeuristic, Derived >::MinMaxBins::~MinMaxBins | ( | ) | [inline] |
void GenericKDTree< BoundingBoxType, TreeConstructionHeuristic, Derived >::MinMaxBins::bin | ( | const Derived * | derived, |
IndexType * | indices, | ||
SizeType | primCount | ||
) | [inline] |
SplitCandidate GenericKDTree< BoundingBoxType, TreeConstructionHeuristic, Derived >::MinMaxBins::minimizeCost | ( | float | traversalCost, |
float | queryCost | ||
) | [inline] |
Evaluate the tree construction heuristic at each bin boundary and return the minimizer for the given cost constants. Min-max binning uses no "empty space bonus" since it cannot create such splits.
The split plane should pass through the last discrete floating floating value, which would still be classified into the left bin. If this is not computed correctly, do binary search.
boost::tuple<BoundingBoxType, IndexType *, BoundingBoxType, IndexType *> GenericKDTree< BoundingBoxType, TreeConstructionHeuristic, Derived >::MinMaxBins::partition | ( | BuildContext & | ctx, |
const Derived * | derived, | ||
IndexType * | primIndices, | ||
SplitCandidate & | split, | ||
bool | isLeftChild, | ||
float | traversalCost, | ||
float | queryCost | ||
) | [inline] |
void GenericKDTree< BoundingBoxType, TreeConstructionHeuristic, Derived >::MinMaxBins::setBoundingBox | ( | const BoundingBoxType & | bbox | ) | [inline] |