1 #ifndef GfxTL__MAXINTERVALSPLITTINGKDTREESTRATEGY_HEADER__
2 #define GfxTL__MAXINTERVALSPLITTINGKDTREESTRATEGY_HEADER__
8 template <
class InheritedStrategyT>
11 typedef typename InheritedStrategyT::value_type
value_type;
13 struct CellData :
public InheritedStrategyT::CellData
17 template <
class BaseT>
28 template <
class BuildInformationT>
33 this->Sub(bi.BBox()[1], bi.BBox()[0], &diff);
34 unsigned int axis = 0;
36 for (
unsigned int j = 1; j < BaseType::m_dim; ++j)
44 cell->SplitAxis() = axis;
45 cell->SplitValue() = (bi.BBox()[0][axis] + bi.BBox()[1][axis]) / 2;
49 template <
class BuildInformationT>
54 Sub(bi.BBox()[1], bi.BBox()[0], &diff);
55 cell->SplitAxis() = axis;
56 cell->SplitValue() = (bi.BBox()[0][axis] + bi.BBox()[1][axis]) / 2;
60 template <
class BuildInformationT>
64 unsigned int axis = (cell->SplitAxis() + 1) % BaseType::m_dim;
65 cell->SplitAxis() = axis;
66 cell->SplitValue() = (bi.BBox()[1][axis] + bi.BBox()[0][axis]) / 2;