DGtal  1.3.beta
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:
89  ClosedIntegerHalfPlane() = default;
90 
97  ClosedIntegerHalfPlane( const Vector & aN, const Integer & aC );
98 
109  ClosedIntegerHalfPlane( const Point & A, const Point & B,
110  const Point & inP, IntegerComputer<Integer> & ic );
111 
116  bool operator()( const Point & p ) const;
117 
122  bool isOnBoundary( const Point & p ) const;
123 
127  Vector tangent() const;
128 
132  void negate();
133 
134  // ----------------------- Interface --------------------------------------
135  public:
136 
141  void selfDisplay ( std::ostream & out ) const;
142 
147  bool isValid() const;
148 
149  // ------------------------- Protected Datas ------------------------------
150  private:
151  // ------------------------- Private Datas --------------------------------
152  private:
153 
154 
155  }; // end of class ClosedIntegerHalfPlane
156 
157 
164  template <typename TSpace>
165  std::ostream&
166  operator<< ( std::ostream & out, const ClosedIntegerHalfPlane<TSpace> & object );
167 
168 } // namespace DGtal
169 
170 
172 // Includes inline functions.
173 #include "DGtal/arithmetic/ClosedIntegerHalfPlane.ih"
174 
175 // //
177 
178 #endif // !defined ClosedIntegerHalfPlane_h
179 
180 #undef ClosedIntegerHalfPlane_RECURSES
181 #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:105
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::operator<<
std::ostream & operator<<(std::ostream &out, const ATu0v1< TKSpace, TLinearAlgebra > &object)
DGtal
DGtal is the top-level namespace which contains all DGtal functions and types.
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::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:63
DGtal::ClosedIntegerHalfPlane::Space
TSpace Space
Definition: ClosedIntegerHalfPlane.h:68
DGtal::PointVector< dim, Integer >
DGtal::ClosedIntegerHalfPlane::ClosedIntegerHalfPlane
ClosedIntegerHalfPlane()=default
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::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