DGtal  1.5.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)
35 #define ParallelStrip_RECURSES
36 
37 #if !defined ParallelStrip_h
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 
114 
119 
130 
135  ParallelStrip ( const ParallelStrip & other );
136 
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 
182 
188 
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)
Aim: A parallel strip in the space is the intersection of two parallel half-planes such that each hal...
Definition: ParallelStrip.h:91
Dimension mainAxis() const
Scalar diagonalWidth() const
Scalar myMu
The minimal scalar value of the strip.
bool operator()(const RealPoint &p) const
RealVector::Component Component
Scalar myNu
The width of the strip.
RealVector myN
The unit normal vector N to the strip.
BOOST_CONCEPT_ASSERT((concepts::CSpace< TSpace >))
Scalar axisWidth() const
Scalar width() const
bool isValid() const
const RealVector & normal() const
ParallelStrip(Scalar mu, const RealVector &N, Scalar nu)
bool operator()(const Point &p) const
Scalar mu() const
Scalar nu() const
void getBounds(Scalar &mu, Scalar &mu_plus_nu) const
Space::RealPoint RealPoint
Definition: ParallelStrip.h:99
RealPoint::Coordinate Coordinate
Space::Vector Vector
Space::RealVector RealVector
ParallelStrip< Space, muIncluded, muPlusNuIncluded > Self
Definition: ParallelStrip.h:97
Dimension mainDiagonal() const
void selfDisplay(std::ostream &out) const
ParallelStrip & operator=(const ParallelStrip &other)
Space::Point Point
Definition: ParallelStrip.h:98
ParallelStrip(const ParallelStrip &other)
Component Coordinate
Type for Point elements.
Definition: PointVector.h:617
TEuclideanRing Component
Type for Vector elements.
Definition: PointVector.h:614
DGtal is the top-level namespace which contains all DGtal functions and types.
std::ostream & operator<<(std::ostream &out, const ATu0v1< TKSpace, TLinearAlgebra > &object)
DGtal::uint32_t Dimension
Definition: Common.h:136
Aim: Defines the concept describing a digital space, ie a cartesian product of integer lines.
Definition: CSpace.h:106