1 #ifndef SCOREAACUBETREESTRATEGY_HEADER
2 #define SCOREAACUBETREESTRATEGY_HEADER
9 template <
unsigned int DimT,
class InheritedStrategyT>
12 typedef typename InheritedStrategyT::value_type
value_type;
14 class CellData :
public InheritedStrategyT::CellData
39 template <
class BaseT>
47 template <
class ShapeT,
class ScoreT>
52 typedef typename BaseType::template TraversalInformationBase<GfxTL::NullClass> tibT;
53 typedef typename BaseType::template CellCenterTraversalInformation<tibT>
55 TraversalInformation ti;
56 this->InitRootTraversalInformation(*BaseType::Root(), &ti);
57 Score(*BaseType::Root(), ti, shape, score);
61 template <
class BuildInformationT>
65 BaseType::InitRoot(bi, root);
66 root->Radius() = bi.Cube().DiagLength() / 2;
69 template <
class BuildInformationT>
72 const BuildInformationT& pbi,
74 const BuildInformationT& bi,
77 BaseType::InitCell(parent, pbi, child, bi, cell);
78 cell->Radius() = bi.Cube().DiagLength() / 2;
82 template <
class TraversalInformationT,
class ShapeT,
class ScoreT>
85 const TraversalInformationT& ti,
89 if ( this->IsLeaf(cell))
102 for (
typename BaseType::HandleType h = cell.Range().first; h != cell.Range().second;
105 (*score)(shape, *
this, this->Dereference(h));
110 for (
unsigned int i = 0; i < CellType::NChildren; ++i)
112 if (!this->ExistChild(cell, i))
116 TraversalInformationT cti;
117 this->InitTraversalInformation(cell, ti, i, &cti);
121 if (dist < cell[i].Radius() + score->Epsilon())
123 Score(cell[i], cti, shape, score);