DGtal  0.6.devel
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
ImplicitFunctionLinearCellEmbedder.h
1 
17 #pragma once
18 
31 #if defined(ImplicitFunctionLinearCellEmbedder_RECURSES)
32 #error Recursive header files inclusion detected in ImplicitFunctionLinearCellEmbedder.h
33 #else // defined(ImplicitFunctionLinearCellEmbedder_RECURSES)
34 
35 #define ImplicitFunctionLinearCellEmbedder_RECURSES
36 
37 #if !defined ImplicitFunctionLinearCellEmbedder_h
38 
39 #define ImplicitFunctionLinearCellEmbedder_h
40 
42 // Inclusions
43 #include <iostream>
44 #include "DGtal/base/Common.h"
45 #include "DGtal/kernel/NumberTraits.h"
46 #include "DGtal/shapes/implicit/CImplicitFunction.h"
48 
49 namespace DGtal
50 {
51 
53 
66  template < typename TKSpace,
67  typename TImplicitFunction,
68  typename TEmbedder >
70  {
72 
73  public:
74  typedef TKSpace KSpace;
75  typedef TImplicitFunction ImplicitFunction;
76  typedef TEmbedder Embedder;
77  typedef typename KSpace::Cell Cell;
78  typedef typename KSpace::SCell SCell;
79  typedef typename KSpace::Space Space;
80  typedef typename Space::Point Point;
81  typedef typename Space::RealPoint RealPoint;
82  typedef typename ImplicitFunction::Value ImplicitFctValue;
83  typedef Cell Argument;
84  typedef RealPoint Value;
85 
90 
95 
101 
109 
118  void init( const KSpace & K, const ImplicitFunction & f,
119  const Embedder & e );
120 
121  // ----------------------- Interface --------------------------------------
122  public:
123 
131  RealPoint embed( const Point & p ) const;
132 
140  RealPoint embedCell( const Cell & cell ) const;
141 
150  RealPoint embedSCell( const SCell & scell ) const;
151 
159  RealPoint operator()( const Cell & cell ) const;
160 
161  // ----------------------- Interface --------------------------------------
162  public:
163 
168  void selfDisplay ( std::ostream & out ) const;
169 
174  bool isValid() const;
175 
176  // ------------------------- Protected Datas ------------------------------
177  private:
178  // ------------------------- Private Datas --------------------------------
179  private:
180 
182  const KSpace* myPtrK;
187 
188  // ------------------------- Hidden services ------------------------------
189  protected:
190 
191  private:
192 
193  }; // end of class ImplicitFunctionLinearCellEmbedder
194 
195 
202  template < typename TKSpace, typename TImplicitFunction, typename TEmbedder >
203  std::ostream&
204  operator<< ( std::ostream & out,
206 
207 } // namespace DGtal
208 
209 
211 // Includes inline functions.
212 #include "DGtal/shapes/implicit/ImplicitFunctionLinearCellEmbedder.ih"
213 
214 // //
216 
217 #endif // !defined ImplicitFunctionLinearCellEmbedder_h
218 
219 #undef ImplicitFunctionLinearCellEmbedder_RECURSES
220 #endif // else defined(ImplicitFunctionLinearCellEmbedder_RECURSES)