1 #ifndef GfxTL__FACENEIGHBORAACUBETREESTRATEGY_HEADER__
2 #define GfxTL__FACENEIGHBORAACUBETREESTRATEGY_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 >
24 enum {
Dim = CellType::Dim };
34 unsigned int axis,
unsigned int dir,
size_t* level)
const
36 const CellType* parent = BaseType::CellParent(cell);
44 if (((childRelation >> (
Dim - 1 - axis)) & 1) ^ (dir & 1))
46 unsigned int faceNeighborRelation
47 = childRelation ^ (1 << (
Dim - 1 - axis));
48 if (BaseType::ExistChild(*parent, faceNeighborRelation))
51 return &(*parent)[faceNeighborRelation];
71 unsigned int faceNeighborRelation
72 = childRelation ^ (1 << (
Dim - 1 - axis));
73 if (BaseType::ExistChild(*n, faceNeighborRelation))
76 return &(*n)[faceNeighborRelation];
84 unsigned int axis,
unsigned int dir,
size_t* level)
91 unsigned int childRelation = 0;
92 for (
unsigned int i = 0; i <
Dim; ++i)
94 if (cell.Center()[i] > parent.Center()[i])
96 childRelation |= 1 << (
Dim - 1 - i);