DGtal  1.1.0
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 
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)
DGtal::ClosedIntegerHalfPlane::Self
ClosedIntegerHalfPlane< TSpace > Self
Definition: ClosedIntegerHalfPlane.h:65
DGtal::concepts::CSpace
Aim: Defines the concept describing a digital space, ie a cartesian product of integer lines.
Definition: CSpace.h:106
DGtal::IntegerComputer< Integer >
DGtal::ClosedIntegerHalfPlane::Point
Space::Point Point
Definition: ClosedIntegerHalfPlane.h:70
DGtal::ClosedIntegerHalfPlane::operator()
bool operator()(const Point &p) const
DGtal::ClosedIntegerHalfPlane::negate
void negate()
DGtal::ClosedIntegerHalfPlane::tangent
Vector tangent() const
DGtal::ClosedIntegerHalfPlane::ClosedIntegerHalfPlane
ClosedIntegerHalfPlane(const Point &A, const Point &B, const Point &inP, IntegerComputer< Integer > &ic)
DGtal
DGtal is the top-level namespace which contains all DGtal functions and types.
Definition: ClosedIntegerHalfPlane.h:49
DGtal::ClosedIntegerHalfPlane::BOOST_CONCEPT_ASSERT
BOOST_CONCEPT_ASSERT((concepts::CSpace< TSpace >))
DGtal::ClosedIntegerHalfPlane::isOnBoundary
bool isOnBoundary(const Point &p) const
DGtal::ClosedIntegerHalfPlane::~ClosedIntegerHalfPlane
~ClosedIntegerHalfPlane()
DGtal::ClosedIntegerHalfPlane::c
Integer c
The uppermost value N.(x,y) that is in the half-space.
Definition: ClosedIntegerHalfPlane.h:77
DGtal::operator<<
std::ostream & operator<<(std::ostream &out, const ClosedIntegerHalfPlane< TSpace > &object)
DGtal::ClosedIntegerHalfPlane::Vector
Space::Vector Vector
Definition: ClosedIntegerHalfPlane.h:71
DGtal::ClosedIntegerHalfPlane
Aim: A half-space specified by a vector N and a constant c. The half-space is the set .
Definition: ClosedIntegerHalfPlane.h:64
DGtal::ClosedIntegerHalfPlane::Space
TSpace Space
Definition: ClosedIntegerHalfPlane.h:68
DGtal::PointVector< dim, Integer >
DGtal::ClosedIntegerHalfPlane::selfDisplay
void selfDisplay(std::ostream &out) const
DGtal::ClosedIntegerHalfPlane::isValid
bool isValid() const
DGtal::ClosedIntegerHalfPlane::Integer
Space::Integer Integer
Definition: ClosedIntegerHalfPlane.h:69
DGtal::ClosedIntegerHalfPlane::ClosedIntegerHalfPlane
ClosedIntegerHalfPlane(const Vector &aN, const Integer &aC)
DGtal::ClosedIntegerHalfPlane::N
Vector N
The normal to the half-space.
Definition: ClosedIntegerHalfPlane.h:76
DGtal::SpaceND::Integer
TInteger Integer
Arithmetic ring induced by (+,-,*) and Integer numbers.
Definition: SpaceND.h:102