Nori

GenericKDTree< BoundingBoxType, TreeConstructionHeuristic, Derived >::MinMaxBins Struct Reference

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>

List of all members.

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.

Detailed Description

template<typename BoundingBoxType, typename TreeConstructionHeuristic, typename Derived>
struct GenericKDTree< BoundingBoxType, TreeConstructionHeuristic, Derived >::MinMaxBins

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.

Definition at line 2138 of file gkdtree.h.


Constructor & Destructor Documentation

template<typename BoundingBoxType, typename TreeConstructionHeuristic, typename Derived>
GenericKDTree< BoundingBoxType, TreeConstructionHeuristic, Derived >::MinMaxBins::MinMaxBins ( SizeType  nBins) [inline]

Definition at line 2139 of file gkdtree.h.

template<typename BoundingBoxType, typename TreeConstructionHeuristic, typename Derived>
GenericKDTree< BoundingBoxType, TreeConstructionHeuristic, Derived >::MinMaxBins::~MinMaxBins ( ) [inline]

Definition at line 2144 of file gkdtree.h.


Member Function Documentation

template<typename BoundingBoxType, typename TreeConstructionHeuristic, typename Derived>
void GenericKDTree< BoundingBoxType, TreeConstructionHeuristic, Derived >::MinMaxBins::bin ( const Derived *  derived,
IndexType indices,
SizeType  primCount 
) [inline]

Run min-max binning.

Parameters:
derivedDerived class to be used to determine the BoundingBox for a given list of primitives
indicesPrimitive indirection list
primCountSpecifies the length of indices

Definition at line 2167 of file gkdtree.h.

template<typename BoundingBoxType, typename TreeConstructionHeuristic, typename Derived>
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.

Definition at line 2195 of file gkdtree.h.

template<typename BoundingBoxType, typename TreeConstructionHeuristic, typename Derived>
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]

Given a suitable split candiate, compute tight bounding boxes for the left and right subtrees and return associated primitive lists.

Release the unused memory regions

Definition at line 2304 of file gkdtree.h.

template<typename BoundingBoxType, typename TreeConstructionHeuristic, typename Derived>
void GenericKDTree< BoundingBoxType, TreeConstructionHeuristic, Derived >::MinMaxBins::setBoundingBox ( const BoundingBoxType &  bbox) [inline]

Prepare to bin for the specified bounds.

Definition at line 2152 of file gkdtree.h.


The documentation for this struct was generated from the following file:
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Defines