DGtal  0.9.2
ClosedIntegerHalfPlane.h
1 
17 #pragma once
18 
31 #if defined(ClosedIntegerHalfPlane_RECURSES)
32 #error Recursive header files inclusion detected in ClosedIntegerHalfPlane.h
33 #else // defined(ClosedIntegerHalfPlane_RECURSES)
34 
35 #define ClosedIntegerHalfPlane_RECURSES
36 
37 #if !defined ClosedIntegerHalfPlane_h
38 
39 #define ClosedIntegerHalfPlane_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 ClosedIntegerHalfPlane
62  template <typename TSpace>
64  {
67 
68  typedef TSpace Space;
69  typedef typename Space::Integer Integer;
70  typedef typename Space::Point Point;
71  typedef typename Space::Vector Vector;
72 
73  // ----------------------- public data ------------------------------
74  public:
75 
76  Vector N;
77  Integer c;
78 
79  protected:
80  // ----------------------- Standard services ------------------------------
81  public:
86 
93  ClosedIntegerHalfPlane( const Vector & aN, const Integer & aC );
94 
105  ClosedIntegerHalfPlane( const Point & A, const Point & B,
106  const Point & inP, IntegerComputer<Integer> & ic );
107 
112  bool operator()( const Point & p ) const;
113 
118  bool isOnBoundary( const Point & p ) const;
119 
123  Vector tangent() const;
124 
128  void negate();
129 
130  // ----------------------- Interface --------------------------------------
131  public:
132 
137  void selfDisplay ( std::ostream & out ) const;
138 
143  bool isValid() const;
144 
145  // ------------------------- Protected Datas ------------------------------
146  private:
147  // ------------------------- Private Datas --------------------------------
148  private:
149 
150 
151  }; // end of class ClosedIntegerHalfPlane
152 
153 
160  template <typename TSpace>
161  std::ostream&
162  operator<< ( std::ostream & out, const ClosedIntegerHalfPlane<TSpace> & object );
163 
164 } // namespace DGtal
165 
166 
168 // Includes inline functions.
169 #include "DGtal/arithmetic/ClosedIntegerHalfPlane.ih"
170 
171 // //
173 
174 #endif // !defined ClosedIntegerHalfPlane_h
175 
176 #undef ClosedIntegerHalfPlane_RECURSES
177 #endif // else defined(ClosedIntegerHalfPlane_RECURSES)
void selfDisplay(std::ostream &out) const
Integer c
The uppermost value N.(x,y) that is in the half-space.
bool isOnBoundary(const Point &p) const
Aim: Defines the concept describing a digital space, ie a cartesian product of integer lines...
Definition: CSpace.h:105
TInteger Integer
Arithmetic ring induced by (+,-,*) and Integer numbers.
Definition: SpaceND.h:102
BOOST_CONCEPT_ASSERT((concepts::CSpace< TSpace >))
DGtal is the top-level namespace which contains all DGtal functions and types.
ClosedIntegerHalfPlane(const Vector &aN, const Integer &aC)
Aim: A half-space specified by a vector N and a constant c. The half-space is the set ...
bool operator()(const Point &p) const
Vector N
The normal to the half-space.
ClosedIntegerHalfPlane< TSpace > Self