1 #ifndef GfxTL__BBOXDISTANCEKDTREESTRATEGY_HEADER__
2 #define GfxTL__BBOXDISTANCEKDTREESTRATEGY_HEADER__
6 template<
class InheritedStrategyT >
9 typedef typename InheritedStrategyT::value_type
value_type;
12 :
public InheritedStrategyT::CellData
15 typedef typename InheritedStrategyT::CellData
BaseType;
22 m_bbox[0] = m_bbox[1] = NULL;
45 template<
class BaseT >
47 :
public InheritedStrategyT::template
StrategyBase< BaseT >
66 template<
class BuildInformationT >
69 BaseType::InitRoot(bi, cell);
70 cell->BBox()[0] =
new ScalarType[BaseType::m_dim];
71 cell->BBox()[1] =
new ScalarType[BaseType::m_dim];
72 BaseType::AssignVector(bi.BBox()[0], &cell->BBox()[0]);
73 BaseType::AssignVector(bi.BBox()[1], &cell->BBox()[1]);
76 template<
class BuildInformationT >
78 const BuildInformationT& parentInfo,
unsigned int childIdx,
79 const BuildInformationT& bi,
CellType* cell)
81 BaseType::InitCell(parent, parentInfo, childIdx, bi, cell);
82 cell->BBox()[0] =
new ScalarType[BaseType::m_dim];
83 cell->BBox()[1] =
new ScalarType[BaseType::m_dim];
84 BaseType::AssignVector(bi.BBox()[0], &cell->BBox()[0]);
85 BaseType::AssignVector(bi.BBox()[1], &cell->BBox()[1]);
88 template<
class TraversalInformationT >
92 BaseType::UpdateCellWithBack(ti, cell);
93 BaseType::IncludeInAABox(BaseType::back(), cell->BBox());
96 template<
class TraversalInformationT >
97 typename BaseType::template DistanceType
106 return BaseType::BoxSqrDistance(ti.Global().Point(), cell.BBox()[0],