DGtal 1.3.0
Loading...
Searching...
No Matches
InHalfPlaneBy2x2DetComputer.h
1
17#pragma once
18
31#if defined(InHalfPlaneBy2x2DetComputer_RECURSES)
32#error Recursive header files inclusion detected in InHalfPlaneBy2x2DetComputer.h
33#else // defined(InHalfPlaneBy2x2DetComputer_RECURSES)
35#define InHalfPlaneBy2x2DetComputer_RECURSES
36
37#if !defined InHalfPlaneBy2x2DetComputer_h
39#define InHalfPlaneBy2x2DetComputer_h
40
42// Inclusions
43#include <array>
44#include <iostream>
45#include "DGtal/base/Common.h"
46
47#include "DGtal/geometry/tools/determinant/C2x2DetComputer.h"
49
50namespace DGtal
51{
52
54 // template class InHalfPlaneBy2x2DetComputer
91 template <typename TPoint, typename TDetComputer>
93 {
94 // ----------------------- Types ------------------------------------
95 public:
96
100 typedef TPoint Point;
101
105 typedef std::array<Point,2> PointArray;
109 typedef typename PointArray::size_type SizeArray;
113 static const SizeArray size = 2;
114
118 typedef TDetComputer DetComputer;
120
127 typedef typename TDetComputer::ArgumentInteger ArgumentInteger;
128
132 typedef typename TDetComputer::ResultInteger Value;
133
134 // ----------------------- Standard services ------------------------------
135 public:
136
137
138 // ----------------------- Interface --------------------------------------
139 public:
140
146 void init(const Point& aP, const Point& aQ);
147
152 void init(const PointArray& aA);
153
164 Value operator()(const Point& aR) const;
165
170 void selfDisplay ( std::ostream & out ) const;
171
176 bool isValid() const;
177
178 // ------------------------- Protected Datas ------------------------------
179 private:
180 // ------------------------- Private Datas --------------------------------
181 private:
182
183
184 // ------------------------- Internals ------------------------------------
185 private:
194
195 }; // end of class InHalfPlaneBy2x2DetComputer
196
197
204 template <typename TPoint, typename TDetComputer>
205 std::ostream&
206 operator<< ( std::ostream & out, const InHalfPlaneBy2x2DetComputer<TPoint, TDetComputer> & object );
207
208} // namespace DGtal
209
210
212// Includes inline functions.
213#include "DGtal/geometry/tools/determinant/InHalfPlaneBy2x2DetComputer.ih"
214
215// //
217
218#endif // !defined InHalfPlaneBy2x2DetComputer_h
219
220#undef InHalfPlaneBy2x2DetComputer_RECURSES
221#endif // else defined(InHalfPlaneBy2x2DetComputer_RECURSES)
Aim: Class that implements an orientation functor, ie. it provides a way to compute the orientation o...
Value operator()(const Point &aR) const
void selfDisplay(std::ostream &out) const
void init(const Point &aP, const Point &aQ)
TDetComputer::ArgumentInteger ArgumentInteger
BOOST_CONCEPT_ASSERT((C2x2DetComputer< DetComputer >))
void init(const PointArray &aA)
DGtal is the top-level namespace which contains all DGtal functions and types.
std::ostream & operator<<(std::ostream &out, const ClosedIntegerHalfPlane< TSpace > &object)
Aim: This concept gathers all models that are able to compute the (sign of the) determinant of a 2x2 ...