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 
13  class CellData : public InheritedStrategyT::CellData
14  {
15  public:
17 
19  Center() const
20  {
21  return m_center;
22  }
23 
26  {
27  return m_center;
28  }
29 
30  private:
32  };
33 
34  template <class BaseT>
35  class StrategyBase : public InheritedStrategyT::template StrategyBase<BaseT>
36  {
37  public:
38  typedef typename InheritedStrategyT::template StrategyBase<BaseT> BaseType;
39  typedef typename BaseType::CellType CellType;
41 
42  protected:
44 
45  template <class BaseTraversalT>
46  class CellCenterTraversalInformation : public BaseTraversalT
47  {
48  };
49 
50  template <class BuildInformationT>
51  void
52  InitRoot(const BuildInformationT& bi, CellType* root)
53  {
54  BaseType::InitRoot(bi, root);
55  bi.Cube().Center(&root->Center());
56  }
57 
58  template <class BuildInformationT>
59  void
60  InitCell(const CellType& parent,
61  const BuildInformationT& pbi,
62  unsigned int child,
63  const BuildInformationT& bi,
64  CellType* cell)
65  {
66  BaseType::InitCell(parent, pbi, child, bi, cell);
67  bi.Cube().Center(&cell->Center());
68  }
69 
70  template <class TraversalInformationT>
71  void
72  CellCenter(const CellType& cell,
73  const TraversalInformationT&,
74  CellCenterType* center) const
75  {
76  *center = cell.Center();
77  }
78  };
79  };
80 }; // namespace GfxTL
81 
82 #endif
GfxTL::CellCenterAACubeTreeStrategy::StrategyBase
Definition: CellCenterAACubeTreeStrategy.h:35
GfxTL::VectorXD< DimT, ScalarType >
GfxTL::CellCenterAACubeTreeStrategy::StrategyBase::CellCenter
void CellCenter(const CellType &cell, const TraversalInformationT &, CellCenterType *center) const
Definition: CellCenterAACubeTreeStrategy.h:72
GfxTL::CellCenterAACubeTreeStrategy::StrategyBase::CellCenterTraversalInformation
Definition: CellCenterAACubeTreeStrategy.h:46
GfxTL::ScalarTypeDeferer::ScalarType
PointT::value_type ScalarType
Definition: ScalarTypeDeferer.h:15
GfxTL::CellCenterAACubeTreeStrategy::StrategyBase::CellCenterType
GfxTL::VectorXD< DimT, ScalarType > CellCenterType
Definition: CellCenterAACubeTreeStrategy.h:43
GfxTL::CellCenterAACubeTreeStrategy
Definition: CellCenterAACubeTreeStrategy.h:9
VectorXD.h
GfxTL::CellCenterAACubeTreeStrategy::CellData::Center
GfxTL::VectorXD< DimT, ScalarType > & Center()
Definition: CellCenterAACubeTreeStrategy.h:25
GfxTL::CellCenterAACubeTreeStrategy::StrategyBase::InitCell
void InitCell(const CellType &parent, const BuildInformationT &pbi, unsigned int child, const BuildInformationT &bi, CellType *cell)
Definition: CellCenterAACubeTreeStrategy.h:60
GfxTL::CellCenterAACubeTreeStrategy::StrategyBase::InitRoot
void InitRoot(const BuildInformationT &bi, CellType *root)
Definition: CellCenterAACubeTreeStrategy.h:52
GfxTL::CellCenterAACubeTreeStrategy::CellData
Definition: CellCenterAACubeTreeStrategy.h:13
GfxTL::CellCenterAACubeTreeStrategy::CellData::Center
const GfxTL::VectorXD< DimT, ScalarType > & Center() const
Definition: CellCenterAACubeTreeStrategy.h:19
GfxTL::CellCenterAACubeTreeStrategy::value_type
InheritedStrategyT::value_type value_type
Definition: CellCenterAACubeTreeStrategy.h:11
GfxTL
Definition: AABox.h:9
GfxTL::CellCenterAACubeTreeStrategy::StrategyBase::BaseType
InheritedStrategyT::template StrategyBase< BaseT > BaseType
Definition: CellCenterAACubeTreeStrategy.h:38
GfxTL::CellCenterAACubeTreeStrategy::CellData::ScalarType
GfxTL::ScalarTypeDeferer< value_type >::ScalarType ScalarType
Definition: CellCenterAACubeTreeStrategy.h:16
armarx::view_selection::skills::direction::state::center
state::Type center(state::Type previous)
Definition: LookDirection.cpp:233
GfxTL::CellCenterAACubeTreeStrategy::StrategyBase::ScalarType
GfxTL::ScalarTypeDeferer< value_type >::ScalarType ScalarType
Definition: CellCenterAACubeTreeStrategy.h:40
ScalarTypeDeferer.h
GfxTL::CellCenterAACubeTreeStrategy::StrategyBase::CellType
BaseType::CellType CellType
Definition: CellCenterAACubeTreeStrategy.h:39