DGtal  1.4.beta
DigitalPlanePredicate.h
1 
17 #pragma once
18 
31 #if defined(DigitalPlanePredicate_RECURSES)
32 #error Recursive header files inclusion detected in DigitalPlanePredicate.h
33 #else // defined(DigitalPlanePredicate_RECURSES)
34 
35 #define DigitalPlanePredicate_RECURSES
36 
37 #if !defined DigitalPlanePredicate_h
38 
39 #define DigitalPlanePredicate_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 DigitalPlanePredicate
71  template <typename TSpace>
73  {
75 
76  // ----------------------- public types ------------------------------
77  public:
79  using Space = TSpace;
80  using Integer = typename Space::Integer;
81  using Point = typename Space::Point;
82  using Vector = typename Space::Vector;
83 
84  // ----------------------- Standard services ------------------------------
85  public:
89  DigitalPlanePredicate() = default;
90 
97  DigitalPlanePredicate (Vector const& aN, Integer const& aMu, Integer const& aNu);
98 
102  ~DigitalPlanePredicate() = default;
103 
109 
115 
122 
129 
130  //-------------------- plane services -----------------------------
131  public:
135  Vector const& normal () const;
136 
140  Integer mu () const;
141 
145  Integer nu () const;
146 
147  //-------------------- model of concepts::CPointPredicate -----------------------------
148  public:
155  bool operator() (Point const& aPoint) const;
156 
157  // ----------------------- Interface --------------------------------------
158  public:
159 
164  void selfDisplay ( std::ostream & out ) const;
165 
170  bool isValid() const;
171 
172  // ------------------------- Protected Datas ------------------------------
173  protected:
174 
175  // ------------------------- Private Datas --------------------------------
176  private:
181  // ------------------------- Hidden services ------------------------------
182  protected:
183 
184  // ------------------------- Internals ------------------------------------
185  private:
186 
187  }; // end of class DigitalPlanePredicate
188 
189 
196  template <typename T>
197  std::ostream&
198  operator<< ( std::ostream & out, const DigitalPlanePredicate<T> & object );
199 
200 } // namespace DGtal
201 
202 
204 // Includes inline functions.
205 #include "DGtal/geometry/surfaces/DigitalPlanePredicate.ih"
206 
207 // //
209 
210 #endif // !defined DigitalPlanePredicate_h
211 
212 #undef DigitalPlanePredicate_RECURSES
213 #endif // else defined(DigitalPlanePredicate_RECURSES)
DGtal::SpaceND::Vector
PointVector< dim, Integer > Vector
Vectors in DGtal::SpaceND.
Definition: SpaceND.h:113
DGtal::DigitalPlanePredicate::Space
TSpace Space
Definition: DigitalPlanePredicate.h:79
DGtal::concepts::CSpace
Aim: Defines the concept describing a digital space, ie a cartesian product of integer lines.
Definition: CSpace.h:105
DGtal::SpaceND::Point
PointVector< dim, Integer > Point
Points in DGtal::SpaceND.
Definition: SpaceND.h:110
DGtal::DigitalPlanePredicate::selfDisplay
void selfDisplay(std::ostream &out) const
DGtal::DigitalPlanePredicate::DigitalPlanePredicate
DigitalPlanePredicate()=default
aPoint
const Point aPoint(3, 4)
DGtal::DigitalPlanePredicate::normal
Vector const & normal() const
DGtal::DigitalPlanePredicate::mu
Integer mu() const
DGtal::DigitalPlanePredicate::nu
Integer nu() const
DGtal::operator<<
std::ostream & operator<<(std::ostream &out, const ATu0v1< TKSpace, TLinearAlgebra > &object)
DGtal::DigitalPlanePredicate
Aim: Representing digital planes, which are digitizations of Euclidean planes, as point predicates.
Definition: DigitalPlanePredicate.h:72
DGtal::DigitalPlanePredicate::myNormal
Vector myNormal
Definition: DigitalPlanePredicate.h:177
DGtal
DGtal is the top-level namespace which contains all DGtal functions and types.
DGtal::DigitalPlanePredicate::BOOST_CONCEPT_ASSERT
BOOST_CONCEPT_ASSERT((concepts::CSpace< TSpace >))
DGtal::DigitalPlanePredicate::myMu
Integer myMu
Definition: DigitalPlanePredicate.h:178
DGtal::DigitalPlanePredicate::myNu
Integer myNu
Definition: DigitalPlanePredicate.h:179
DGtal::DigitalPlanePredicate::Point
typename Space::Point Point
Definition: DigitalPlanePredicate.h:81
DGtal::DigitalPlanePredicate::Integer
typename Space::Integer Integer
Definition: DigitalPlanePredicate.h:80
DGtal::DigitalPlanePredicate::operator()
bool operator()(Point const &aPoint) const
DGtal::DigitalPlanePredicate::operator=
DigitalPlanePredicate & operator=(const DigitalPlanePredicate &other)
DGtal::DigitalPlanePredicate::Vector
typename Space::Vector Vector
Definition: DigitalPlanePredicate.h:82
DGtal::DigitalPlanePredicate::isValid
bool isValid() const
DGtal::DigitalPlanePredicate::~DigitalPlanePredicate
~DigitalPlanePredicate()=default
DGtal::SpaceND::Integer
TInteger Integer
Arithmetic ring induced by (+,-,*) and Integer numbers.
Definition: SpaceND.h:102