Mitsuba Renderer  0.5.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
mitsuba::GenericKDTree< AABBType, 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 <mitsuba/render/gkdtree.h>

Classes

struct  Partition
 

Public Member Functions

 MinMaxBins (SizeType nBins)
 
 ~MinMaxBins ()
 
void setAABB (const AABBType &aabb)
 Prepare to bin for the specified bounds. More...
 
IndexType computeIndex (float pos, int axis)
 Compute the bin location for a given position and axis. More...
 
void bin (const Derived *derived, IndexType *indices, SizeType primCount)
 Run min-max binning. More...
 
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. More...
 
Partition 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. More...
 

Detailed Description

template<typename AABBType, typename TreeConstructionHeuristic, typename Derived>
struct mitsuba::GenericKDTree< AABBType, 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.

Constructor & Destructor Documentation

template<typename AABBType, typename TreeConstructionHeuristic, typename Derived>
mitsuba::GenericKDTree< AABBType, TreeConstructionHeuristic, Derived >::MinMaxBins::MinMaxBins ( SizeType  nBins)
inline
template<typename AABBType, typename TreeConstructionHeuristic, typename Derived>
mitsuba::GenericKDTree< AABBType, TreeConstructionHeuristic, Derived >::MinMaxBins::~MinMaxBins ( )
inline

Member Function Documentation

template<typename AABBType, typename TreeConstructionHeuristic, typename Derived>
void mitsuba::GenericKDTree< AABBType, 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 AABB for a given list of primitives
indicesPrimitive indirection list
primCountSpecifies the length of indices
template<typename AABBType, typename TreeConstructionHeuristic, typename Derived>
IndexType mitsuba::GenericKDTree< AABBType, TreeConstructionHeuristic, Derived >::MinMaxBins::computeIndex ( float  pos,
int  axis 
)
inline

Compute the bin location for a given position and axis.

template<typename AABBType, typename TreeConstructionHeuristic, typename Derived>
SplitCandidate mitsuba::GenericKDTree< AABBType, 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.

template<typename AABBType, typename TreeConstructionHeuristic, typename Derived>
Partition mitsuba::GenericKDTree< AABBType, 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

template<typename AABBType, typename TreeConstructionHeuristic, typename Derived>
void mitsuba::GenericKDTree< AABBType, TreeConstructionHeuristic, Derived >::MinMaxBins::setAABB ( const AABBType &  aabb)
inline

Prepare to bin for the specified bounds.


The documentation for this struct was generated from the following file: