DGtal  1.3.beta
ParallelStrip.h
1 
17 #pragma once
18 
31 #if defined(ParallelStrip_RECURSES)
32 #error Recursive header files inclusion detected in ParallelStrip.h
33 #else // defined(ParallelStrip_RECURSES)
34 
35 #define ParallelStrip_RECURSES
36 
37 #if !defined ParallelStrip_h
38 
39 #define ParallelStrip_h
40 
42 // Inclusions
43 #include <iostream>
44 #include "DGtal/base/Common.h"
45 #include "DGtal/kernel/CSpace.h"
47 
48 namespace DGtal
49 {
50 
52  // template class ParallelStrip
89  template <typename TSpace, bool muIncluded = true, bool muPlusNuIncluded = true>
91  {
93 
94  // ----------------------- public types ------------------------------
95  public:
96  typedef TSpace Space;
98  typedef typename Space::Point Point;
99  typedef typename Space::RealPoint RealPoint;
100  typedef typename Space::Vector Vector;
101  typedef typename Space::RealVector RealVector;
104  typedef Component Scalar;
105 
106 
107  // ----------------------- Standard services ------------------------------
108  public:
109 
113  ~ParallelStrip();
114 
118  ParallelStrip();
119 
129  ParallelStrip ( Scalar mu, const RealVector & N, Scalar nu );
130 
135  ParallelStrip ( const ParallelStrip & other );
136 
142  ParallelStrip & operator= ( const ParallelStrip & other );
143 
144  //-------------------- strip / plane services -----------------------------
145  public:
146 
150  const RealVector & normal() const;
151 
155  Scalar mu() const;
156 
162  Scalar nu() const;
163 
169  Scalar width() const;
170 
175  Scalar axisWidth() const;
176 
181  Dimension mainAxis() const;
182 
187  Scalar diagonalWidth() const;
188 
194  Dimension mainDiagonal() const;
195 
204  void getBounds( Scalar & mu, Scalar & mu_plus_nu ) const;
205 
206  //-------------------- model of concepts::CPointPredicate -----------------------------
207  public:
208 
217  bool operator()( const Point & p ) const;
218 
226  bool operator()( const RealPoint & p ) const;
227 
228  // ----------------------- Interface --------------------------------------
229  public:
230 
235  void selfDisplay ( std::ostream & out ) const;
236 
241  bool isValid() const;
242 
243  // ------------------------- Protected Datas ------------------------------
244  protected:
251 
252  // ------------------------- Private Datas --------------------------------
253  private:
254 
255  // ------------------------- Hidden services ------------------------------
256  protected:
257 
258  // ------------------------- Internals ------------------------------------
259  private:
260 
261  }; // end of class ParallelStrip
262 
263 
270  template <typename TSpace, bool muIncluded, bool muPlusNuIncluded>
271  std::ostream&
272  operator<< ( std::ostream & out,
274 
275 } // namespace DGtal
276 
277 
279 // Includes inline functions.
280 #include "DGtal/geometry/surfaces/ParallelStrip.ih"
281 
282 // //
284 
285 #endif // !defined ParallelStrip_h
286 
287 #undef ParallelStrip_RECURSES
288 #endif // else defined(ParallelStrip_RECURSES)
DGtal::ParallelStrip::myMu
Scalar myMu
The minimal scalar value of the strip.
Definition: ParallelStrip.h:246
DGtal::ParallelStrip::nu
Scalar nu() const
DGtal::ParallelStrip::ParallelStrip
ParallelStrip()
DGtal::ParallelStrip::myNu
Scalar myNu
The width of the strip.
Definition: ParallelStrip.h:250
DGtal::ParallelStrip::mu
Scalar mu() const
DGtal::concepts::CSpace
Aim: Defines the concept describing a digital space, ie a cartesian product of integer lines.
Definition: CSpace.h:105
DGtal::ParallelStrip::axisWidth
Scalar axisWidth() const
DGtal::ParallelStrip::mainDiagonal
Dimension mainDiagonal() const
DGtal::PointVector::Coordinate
Component Coordinate
Type for Point elements.
Definition: PointVector.h:617
DGtal::ParallelStrip::getBounds
void getBounds(Scalar &mu, Scalar &mu_plus_nu) const
DGtal::ParallelStrip::Component
RealVector::Component Component
Definition: ParallelStrip.h:103
DGtal::ParallelStrip::RealVector
Space::RealVector RealVector
Definition: ParallelStrip.h:101
DGtal::ParallelStrip::selfDisplay
void selfDisplay(std::ostream &out) const
DGtal::ParallelStrip::width
Scalar width() const
DGtal::Dimension
DGtal::uint32_t Dimension
Definition: Common.h:137
DGtal::ParallelStrip::Scalar
Component Scalar
Definition: ParallelStrip.h:104
DGtal::ParallelStrip::mainAxis
Dimension mainAxis() const
DGtal::PointVector::Component
TEuclideanRing Component
Type for Vector elements.
Definition: PointVector.h:614
DGtal::operator<<
std::ostream & operator<<(std::ostream &out, const ATu0v1< TKSpace, TLinearAlgebra > &object)
DGtal::ParallelStrip::isValid
bool isValid() const
DGtal::ParallelStrip::RealPoint
Space::RealPoint RealPoint
Definition: ParallelStrip.h:99
DGtal::ParallelStrip::Space
TSpace Space
Definition: ParallelStrip.h:96
DGtal::ParallelStrip::~ParallelStrip
~ParallelStrip()
DGtal
DGtal is the top-level namespace which contains all DGtal functions and types.
DGtal::ParallelStrip::normal
const RealVector & normal() const
DGtal::ParallelStrip::BOOST_CONCEPT_ASSERT
BOOST_CONCEPT_ASSERT((concepts::CSpace< TSpace >))
DGtal::ParallelStrip::operator()
bool operator()(const Point &p) const
DGtal::ParallelStrip
Aim: A parallel strip in the space is the intersection of two parallel half-planes such that each hal...
Definition: ParallelStrip.h:90
DGtal::ParallelStrip::operator=
ParallelStrip & operator=(const ParallelStrip &other)
DGtal::PointVector< dim, Integer >
DGtal::ParallelStrip::Self
ParallelStrip< Space, muIncluded, muPlusNuIncluded > Self
Definition: ParallelStrip.h:97
DGtal::ParallelStrip::Point
Space::Point Point
Definition: ParallelStrip.h:98
DGtal::ParallelStrip::myN
RealVector myN
The unit normal vector N to the strip.
Definition: ParallelStrip.h:248
DGtal::ParallelStrip::diagonalWidth
Scalar diagonalWidth() const
DGtal::ParallelStrip::Vector
Space::Vector Vector
Definition: ParallelStrip.h:100
DGtal::ParallelStrip::Coordinate
RealPoint::Coordinate Coordinate
Definition: ParallelStrip.h:102