1 #ifndef GfxTL__MAXINTERVALSPLITTINGKDTREESTRATEGY_HEADER__
2 #define GfxTL__MAXINTERVALSPLITTINGKDTREESTRATEGY_HEADER__
8 template<
class InheritedStrategyT >
11 typedef typename InheritedStrategyT::value_type
value_type;
14 :
public InheritedStrategyT::CellData
17 template<
class BaseT >
19 :
public InheritedStrategyT::template
StrategyBase< BaseT >
31 template<
class BuildInformationT >
35 this->Sub(bi.BBox()[1], bi.BBox()[0], &diff);
36 unsigned int axis = 0;
38 for (
unsigned int j = 1; j < BaseType::m_dim; ++j)
46 cell->SplitAxis() = axis;
48 (bi.BBox()[0][axis] + bi.BBox()[1][axis]) / 2;
52 template<
class BuildInformationT >
57 Sub(bi.BBox()[1], bi.BBox()[0], &diff);
58 cell->SplitAxis() = axis;
60 (bi.BBox()[0][axis] + bi.BBox()[1][axis]) / 2;
64 template<
class BuildInformationT >
67 unsigned int axis = (cell->SplitAxis() + 1) % BaseType::m_dim;
68 cell->SplitAxis() = axis;
70 (bi.BBox()[1][axis] + bi.BBox()[0][axis]) / 2;