DGtal  1.5.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)
35 #define DigitalPlanePredicate_RECURSES
36 
37 #if !defined DigitalPlanePredicate_h
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 
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)
Aim: Representing digital planes, which are digitizations of Euclidean planes, as point predicates.
DigitalPlanePredicate(Vector const &aN, Integer const &aMu, Integer const &aNu)
bool operator()(Point const &aPoint) const
typename Space::Integer Integer
DigitalPlanePredicate(const DigitalPlanePredicate &other)
BOOST_CONCEPT_ASSERT((concepts::CSpace< TSpace >))
DigitalPlanePredicate & operator=(const DigitalPlanePredicate &other)
DigitalPlanePredicate(DigitalPlanePredicate &&other)
void selfDisplay(std::ostream &out) const
Vector const & normal() const
DigitalPlane::Point Vector
DGtal is the top-level namespace which contains all DGtal functions and types.
std::ostream & operator<<(std::ostream &out, const ATu0v1< TKSpace, TLinearAlgebra > &object)
Aim: Defines the concept describing a digital space, ie a cartesian product of integer lines.
Definition: CSpace.h:106
MyPointD Point
Definition: testClone2.cpp:383
const Point aPoint(3, 4)