ShuffleIndicesTreeDataKernelStrategy.h
Go to the documentation of this file.
1 #ifndef GfxTL__SHUFFLEINDICESTREEDATAKERNELSTRATEGY_HEADER__
2 #define GfxTL__SHUFFLEINDICESTREEDATAKERNELSTRATEGY_HEADER__
3 #include <vector>
4 #include <GfxTL/Swap.h>
5 
6 namespace GfxTL
7 {
8  template< class DataKernelT,
9  class ShuffleIndicesT = std::vector< unsigned int > >
11  : public DataKernelT
12  {
13  public:
14  typedef typename DataKernelT::value_type value_type;
15  typedef typename DataKernelT::HandleType HandleType;
16  typedef typename DataKernelT::DereferencedType DereferencedType;
17 
18  ShuffleIndicesTreeDataKernelStrategy() : m_shuffleIndices(NULL) {}
19  void ShuffleIndices(ShuffleIndicesT* shuffleIndices)
20  {
21  m_shuffleIndices = shuffleIndices;
22  }
23  ShuffleIndicesT* ShuffleIndices() const
24  {
25  return m_shuffleIndices;
26  }
27 
28  protected:
30  {
31  if (m_shuffleIndices)
32  {
33  Swap(a, b, m_shuffleIndices);
34  }
35  DataKernelT::SwapHandles(a, b);
36  }
37 
38  private:
39  ShuffleIndicesT* m_shuffleIndices;
40  };
41 };
42 
43 #endif
GfxTL::ShuffleIndicesTreeDataKernelStrategy
Definition: ShuffleIndicesTreeDataKernelStrategy.h:10
Swap.h
GfxTL::ShuffleIndicesTreeDataKernelStrategy::ShuffleIndicesTreeDataKernelStrategy
ShuffleIndicesTreeDataKernelStrategy()
Definition: ShuffleIndicesTreeDataKernelStrategy.h:18
GfxTL::ShuffleIndicesTreeDataKernelStrategy::DereferencedType
DataKernelT::DereferencedType DereferencedType
Definition: ShuffleIndicesTreeDataKernelStrategy.h:16
GfxTL::ShuffleIndicesTreeDataKernelStrategy::value_type
DataKernelT::value_type value_type
Definition: ShuffleIndicesTreeDataKernelStrategy.h:14
armarx::ctrlutil::a
double a(double t, double a0, double j)
Definition: CtrlUtil.h:45
GfxTL::ShuffleIndicesTreeDataKernelStrategy::HandleType
DataKernelT::HandleType HandleType
Definition: ShuffleIndicesTreeDataKernelStrategy.h:15
GfxTL::ShuffleIndicesTreeDataKernelStrategy::ShuffleIndices
ShuffleIndicesT * ShuffleIndices() const
Definition: ShuffleIndicesTreeDataKernelStrategy.h:23
GfxTL
Definition: AABox.h:8
GfxTL::ShuffleIndicesTreeDataKernelStrategy::ShuffleIndices
void ShuffleIndices(ShuffleIndicesT *shuffleIndices)
Definition: ShuffleIndicesTreeDataKernelStrategy.h:19
GfxTL::Swap
void Swap(HandleT a, HandleT b, ContainerT *container)
Definition: Swap.h:9
GfxTL::ShuffleIndicesTreeDataKernelStrategy::SwapHandles
void SwapHandles(HandleType a, HandleType b)
Definition: ShuffleIndicesTreeDataKernelStrategy.h:29