DGtal  0.9.2
StarShaped3D.h
1 
17 #pragma once
18 
31 #if defined(StarShaped3D_RECURSES)
32 #error Recursive header files inclusion detected in StarShaped3D.h
33 #else // defined(StarShaped3D_RECURSES)
34 
35 #define StarShaped3D_RECURSES
36 
37 #if !defined StarShaped3D_h
38 
39 #define StarShaped3D_h
40 
42 // Inclusions
43 #include <iostream>
44 #include "DGtal/base/Common.h"
45 #include "DGtal/kernel/NumberTraits.h"
47 
48 namespace DGtal
49 {
50 
52  // template class StarShaped3D
70  template <typename TSpace>
72  {
73 
74  public:
75  typedef TSpace Space;
76  typedef typename Space::RealPoint RealPoint;
77  typedef std::pair<double,double> AngularCoordinates;
78 
83  {}
84 
88  ~StarShaped3D();
89 
90  // ------------------------- Implemented services -------------------------
91  public:
95  virtual RealPoint interiorPoint() const
96  {
97  return center();
98  }
99 
100  // ------------------------- Abstract services ----------------------------
101  public:
102 
107  virtual RealPoint getLowerBound() const = 0;
108 
113  virtual RealPoint getUpperBound() const = 0;
114 
118  virtual RealPoint center() const = 0;
119 
126  virtual AngularCoordinates parameter( const RealPoint & p ) const = 0;
127 
135  virtual RealPoint x( const AngularCoordinates t ) const = 0;
136 
143  virtual RealPoint gradient( const AngularCoordinates t) const = 0;
144 
151  virtual RealPoint rt( const AngularCoordinates t) const = 0;
152 
153 
154 
161  virtual RealPoint rp( const AngularCoordinates t) const = 0;
162 
163 
171  virtual RealPoint rtt( const AngularCoordinates t) const = 0;
172 
173 
174 
182  virtual RealPoint rpp( const AngularCoordinates t) const = 0;
183 
191  virtual RealPoint rtp( const AngularCoordinates t) const = 0;
192 
193 
194 
195 
196  // ------------------------- star-shaped services -------------------------
197  public:
198 
206  virtual Orientation orientation( const RealPoint &p) const;
207 
208 
209  /*
210  * @param t is a couple of Teta && Phi wich are 2 angles
211  respectivly between [0,2PI] and [0,Pi].
212  *
213  * @return the vector (x'(t),y'(t),z'(t)) made unitary which is
214  * the unit tangent to the shape boundary.
215  */
216  /*
217  virtual RealPoint tangent( AngularCoordinates t ) const;
218  */
219 
220 
221 
222 
230  virtual RealPoint normal( AngularCoordinates t ) const;
231 
240  virtual double gaussianCurvature( AngularCoordinates t) const;
241 
242 
251  virtual double meanCurvature( AngularCoordinates t) const;
252 
253 
264  virtual double arclength( AngularCoordinates t1,
265  AngularCoordinates t2,
266  unsigned int nb ) const;
267 
268 
279  virtual double surfacelength( AngularCoordinates t1,
280  AngularCoordinates t2,
281  unsigned int nb ) const;
282 
283 
284 
285  // ----------------------- Interface --------------------------------------
286  public:
287 
292  void selfDisplay ( std::ostream & out ) const;
293 
298  bool isValid() const;
299 
300  // ------------------------- Protected Datas ------------------------------
301  private:
302  // ------------------------- Private Datas --------------------------------
303  private:
304 
305  // ------------------------- Hidden services ------------------------------
306  protected:
307 
312  //StarShaped3D();
313 
314  private:
315 
322  StarShaped3D & operator= ( const StarShaped3D & other );
323 
324  // ------------------------- Internals ------------------------------------
325  private:
326 
327  }; // end of class StarShaped3D
328 
329 
336  template <typename T>
337  std::ostream&
338  operator<< ( std::ostream & out, const StarShaped3D<T> & object );
339 
340 } // namespace DGtal
341 
342 
344 // Includes inline functions.
345 #include "StarShaped3D.ih"
346 
347 // //
349 
350 #endif // !defined StarShaped3D_h
351 
352 #undef StarShaped3D_RECURSES
353 #endif // else defined(StarShaped3D_RECURSES)
std::pair< double, double > AngularCoordinates
Definition: StarShaped3D.h:77
virtual RealPoint rpp(const AngularCoordinates t) const =0
virtual RealPoint interiorPoint() const
Definition: StarShaped3D.h:95
virtual RealPoint getLowerBound() const =0
virtual RealPoint rt(const AngularCoordinates t) const =0
virtual RealPoint center() const =0
PointVector< dim, double > RealPoint
Definition: SpaceND.h:117
Orientation
Definition: Common.h:118
virtual RealPoint rtp(const AngularCoordinates t) const =0
virtual RealPoint getUpperBound() const =0
void selfDisplay(std::ostream &out) const
virtual RealPoint x(const AngularCoordinates t) const =0
virtual RealPoint rp(const AngularCoordinates t) const =0
DGtal is the top-level namespace which contains all DGtal functions and types.
StarShaped3D & operator=(const StarShaped3D &other)
bool isValid() const
virtual double meanCurvature(AngularCoordinates t) const
virtual RealPoint rtt(const AngularCoordinates t) const =0
virtual RealPoint gradient(const AngularCoordinates t) const =0
virtual double arclength(AngularCoordinates t1, AngularCoordinates t2, unsigned int nb) const
virtual double gaussianCurvature(AngularCoordinates t) const
Space::RealPoint RealPoint
Definition: StarShaped3D.h:76
virtual AngularCoordinates parameter(const RealPoint &p) const =0
virtual RealPoint normal(AngularCoordinates t) const
virtual double surfacelength(AngularCoordinates t1, AngularCoordinates t2, unsigned int nb) const
virtual Orientation orientation(const RealPoint &p) const