CellCenterAACubeTreeStrategy.h
Go to the documentation of this file.
1 #ifndef GfxTL__CELLCENTERAACUBETREESTRATEGY_HEADER__
2 #define GfxTL__CELLCENTERAACUBETREESTRATEGY_HEADER__
4 #include <GfxTL/VectorXD.h>
5 
6 namespace GfxTL
7 {
8  template< unsigned int DimT, class InheritedStrategyT >
10  {
11  typedef typename InheritedStrategyT::value_type value_type;
12  class CellData
13  : public InheritedStrategyT::CellData
14  {
15  public:
19  {
20  return m_center;
21  }
23  {
24  return m_center;
25  }
26 
27  private:
29  };
30 
31  template< class BaseT >
33  : public InheritedStrategyT::template StrategyBase< BaseT >
34  {
35 public:
36  typedef typename InheritedStrategyT::template StrategyBase< BaseT >
38  typedef typename BaseType::CellType CellType;
41 
42 protected:
44 
45  template< class BaseTraversalT >
47  : public BaseTraversalT
48  {};
49 
50  template< class BuildInformationT >
51  void InitRoot(const BuildInformationT& bi, CellType* root)
52  {
53  BaseType::InitRoot(bi, root);
54  bi.Cube().Center(&root->Center());
55  }
56 
57  template< class BuildInformationT >
58  void InitCell(const CellType& parent, const BuildInformationT& pbi,
59  unsigned int child, const BuildInformationT& bi,
60  CellType* cell)
61  {
62  BaseType::InitCell(parent, pbi, child, bi, cell);
63  bi.Cube().Center(&cell->Center());
64  }
65 
66  template< class TraversalInformationT >
67  void CellCenter(const CellType& cell,
68  const TraversalInformationT&, CellCenterType* center) const
69  {
70  *center = cell.Center();
71  }
72  };
73  };
74 };
75 
76 #endif
GfxTL::CellCenterAACubeTreeStrategy::StrategyBase
Definition: CellCenterAACubeTreeStrategy.h:32
GfxTL::VectorXD< DimT, ScalarType >
GfxTL::CellCenterAACubeTreeStrategy::StrategyBase::CellCenter
void CellCenter(const CellType &cell, const TraversalInformationT &, CellCenterType *center) const
Definition: CellCenterAACubeTreeStrategy.h:67
GfxTL::CellCenterAACubeTreeStrategy::CellData::ScalarType
GfxTL::ScalarTypeDeferer< value_type >::ScalarType ScalarType
Definition: CellCenterAACubeTreeStrategy.h:17
GfxTL::CellCenterAACubeTreeStrategy::StrategyBase::CellCenterTraversalInformation
Definition: CellCenterAACubeTreeStrategy.h:46
GfxTL::ScalarTypeDeferer::ScalarType
PointT::value_type ScalarType
Definition: ScalarTypeDeferer.h:14
GfxTL::CellCenterAACubeTreeStrategy
Definition: CellCenterAACubeTreeStrategy.h:9
VectorXD.h
GfxTL::CellCenterAACubeTreeStrategy::StrategyBase::InitCell
void InitCell(const CellType &parent, const BuildInformationT &pbi, unsigned int child, const BuildInformationT &bi, CellType *cell)
Definition: CellCenterAACubeTreeStrategy.h:58
GfxTL::CellCenterAACubeTreeStrategy::StrategyBase::BaseType
InheritedStrategyT::template StrategyBase< BaseT > BaseType
Definition: CellCenterAACubeTreeStrategy.h:37
GfxTL::CellCenterAACubeTreeStrategy::StrategyBase::InitRoot
void InitRoot(const BuildInformationT &bi, CellType *root)
Definition: CellCenterAACubeTreeStrategy.h:51
GfxTL::CellCenterAACubeTreeStrategy::CellData
Definition: CellCenterAACubeTreeStrategy.h:12
GfxTL::CellCenterAACubeTreeStrategy::CellData::Center
const GfxTL::VectorXD< DimT, ScalarType > & Center() const
Definition: CellCenterAACubeTreeStrategy.h:18
GfxTL::CellCenterAACubeTreeStrategy::value_type
InheritedStrategyT::value_type value_type
Definition: CellCenterAACubeTreeStrategy.h:11
GfxTL
Definition: AABox.h:8
GfxTL::CellCenterAACubeTreeStrategy::StrategyBase::ScalarType
GfxTL::ScalarTypeDeferer< value_type >::ScalarType ScalarType
Definition: CellCenterAACubeTreeStrategy.h:40
GfxTL::CellCenterAACubeTreeStrategy::StrategyBase::CellCenterType
GfxTL::VectorXD< DimT, ScalarType > CellCenterType
Definition: CellCenterAACubeTreeStrategy.h:43
GfxTL::CellCenterAACubeTreeStrategy::CellData::Center
GfxTL::VectorXD< DimT, ScalarType > & Center()
Definition: CellCenterAACubeTreeStrategy.h:22
ScalarTypeDeferer.h
GfxTL::CellCenterAACubeTreeStrategy::StrategyBase::CellType
BaseType::CellType CellType
Definition: CellCenterAACubeTreeStrategy.h:38