DGtal
2.2.0
Toggle main menu visibility
Loading...
Searching...
No Matches
PolarPointComparatorBy2x2DetComputer.h
1
16
17
#pragma once
18
30
31
#if defined(PolarPointComparatorBy2x2DetComputer_RECURSES)
32
#error Recursive header files inclusion detected in PolarPointComparatorBy2x2DetComputer.h
33
#else
// defined(PolarPointComparatorBy2x2DetComputer_RECURSES)
35
#define PolarPointComparatorBy2x2DetComputer_RECURSES
36
37
#if !defined PolarPointComparatorBy2x2DetComputer_h
39
#define PolarPointComparatorBy2x2DetComputer_h
40
42
// Inclusions
43
#include <iostream>
44
#include "DGtal/base/Common.h"
45
46
#include "DGtal/geometry/tools/determinant/C2x2DetComputer.h"
47
#include "DGtal/geometry/tools/determinant/Simple2x2DetComputer.h"
49
50
namespace
DGtal
51
{
52
53
namespace
functors
{
54
56
// template class PolarPointComparatorBy2x2DetComputer
77
template
<
typename
TPoint,
78
typename
TDetComputer = Simple2x2DetComputer<typename TPoint::Coordinate, DGtal::int64_t > >
79
class
PolarPointComparatorBy2x2DetComputer
80
{
81
// ----------------------- Inner types ------------------------------------
82
public
:
83
87
typedef
TPoint
Point
;
91
typedef
typename
Point::Coordinate
Coordinate
;
95
typedef
Point
Vector
;
96
101
typedef
TDetComputer
DetComputer
;
102
BOOST_CONCEPT_ASSERT
((
C2x2DetComputer<DetComputer>
));
103
107
typedef
typename
DetComputer::ResultInteger
ResultInteger
;
108
113
typedef
functors::Thresholder<ResultInteger, false, false>
CustomThresholder
;
114
115
116
// ----------------------- Standard services ------------------------------
117
public
:
118
123
PolarPointComparatorBy2x2DetComputer
();
124
129
PolarPointComparatorBy2x2DetComputer
(
const
Point
&
aPoint
);
130
135
PolarPointComparatorBy2x2DetComputer
(
const
PolarPointComparatorBy2x2DetComputer
& other );
136
142
PolarPointComparatorBy2x2DetComputer
&
operator=
(
const
PolarPointComparatorBy2x2DetComputer
& other );
143
144
// ----------------------- Interface --------------------------------------
145
public
:
146
151
void
selfDisplay
( std::ostream & out )
const
;
152
157
bool
isValid
()
const
;
158
163
void
setPole
(
const
Point
& aPole );
164
180
bool
operator()
(
const
Point
& aPoint1,
const
Point
& aPoint2)
const
;
181
182
// ------------------------- Internals ------------------------------------
183
private
:
184
208
bool
isBefore
(
const
Point
& aU,
const
Point
& aV)
const
;
209
210
// ------------------------- Private Data --------------------------------
211
private
:
212
216
Point
myPole
;
217
222
mutable
DetComputer
myDetComputer
;
223
227
CustomThresholder
myThresholder
;
228
229
// ------------------------- Hidden services ------------------------------
230
protected
:
231
232
233
private
:
234
235
236
};
// end of class PolarPointComparatorBy2x2DetComputer
237
238
245
template
<
typename
TPo
int
,
typename
TDetComputer>
246
std::ostream&
247
operator<<
( std::ostream & out,
const
PolarPointComparatorBy2x2DetComputer<TPoint,TDetComputer>
&
object
);
248
249
}
//namespace functors
250
251
}
// namespace DGtal
252
253
255
// Includes inline functions.
256
#include "DGtal/geometry/tools/PolarPointComparatorBy2x2DetComputer.ih"
257
258
// //
260
261
#endif
// !defined PolarPointComparatorBy2x2DetComputer_h
262
263
#undef PolarPointComparatorBy2x2DetComputer_RECURSES
264
#endif
// else defined(PolarPointComparatorBy2x2DetComputer_RECURSES)
DGtal::functors::PolarPointComparatorBy2x2DetComputer
Aim: Class that implements a binary point predicate, which is able to compare the position of two giv...
Definition
PolarPointComparatorBy2x2DetComputer.h:80
DGtal::functors::PolarPointComparatorBy2x2DetComputer::ResultInteger
DetComputer::ResultInteger ResultInteger
Definition
PolarPointComparatorBy2x2DetComputer.h:107
DGtal::functors::PolarPointComparatorBy2x2DetComputer::PolarPointComparatorBy2x2DetComputer
PolarPointComparatorBy2x2DetComputer(const PolarPointComparatorBy2x2DetComputer &other)
DGtal::functors::PolarPointComparatorBy2x2DetComputer::myPole
Point myPole
Definition
PolarPointComparatorBy2x2DetComputer.h:216
DGtal::functors::PolarPointComparatorBy2x2DetComputer::isBefore
bool isBefore(const Point &aU, const Point &aV) const
DGtal::functors::PolarPointComparatorBy2x2DetComputer::DetComputer
TDetComputer DetComputer
Definition
PolarPointComparatorBy2x2DetComputer.h:101
DGtal::functors::PolarPointComparatorBy2x2DetComputer::myThresholder
CustomThresholder myThresholder
Definition
PolarPointComparatorBy2x2DetComputer.h:227
DGtal::functors::PolarPointComparatorBy2x2DetComputer::Point
TPoint Point
Definition
PolarPointComparatorBy2x2DetComputer.h:87
DGtal::functors::PolarPointComparatorBy2x2DetComputer::setPole
void setPole(const Point &aPole)
DGtal::functors::PolarPointComparatorBy2x2DetComputer::Coordinate
Point::Coordinate Coordinate
Definition
PolarPointComparatorBy2x2DetComputer.h:91
DGtal::functors::PolarPointComparatorBy2x2DetComputer::PolarPointComparatorBy2x2DetComputer
PolarPointComparatorBy2x2DetComputer(const Point &aPoint)
DGtal::functors::PolarPointComparatorBy2x2DetComputer::myDetComputer
DetComputer myDetComputer
Definition
PolarPointComparatorBy2x2DetComputer.h:222
DGtal::functors::PolarPointComparatorBy2x2DetComputer::CustomThresholder
functors::Thresholder< ResultInteger, false, false > CustomThresholder
Definition
PolarPointComparatorBy2x2DetComputer.h:113
DGtal::functors::PolarPointComparatorBy2x2DetComputer::operator()
bool operator()(const Point &aPoint1, const Point &aPoint2) const
DGtal::functors::PolarPointComparatorBy2x2DetComputer::BOOST_CONCEPT_ASSERT
BOOST_CONCEPT_ASSERT((C2x2DetComputer< DetComputer >))
DGtal::functors::PolarPointComparatorBy2x2DetComputer::Vector
Point Vector
Definition
PolarPointComparatorBy2x2DetComputer.h:95
DGtal::functors::PolarPointComparatorBy2x2DetComputer::PolarPointComparatorBy2x2DetComputer
PolarPointComparatorBy2x2DetComputer()
DGtal::functors::PolarPointComparatorBy2x2DetComputer::operator=
PolarPointComparatorBy2x2DetComputer & operator=(const PolarPointComparatorBy2x2DetComputer &other)
DGtal::functors::PolarPointComparatorBy2x2DetComputer::selfDisplay
void selfDisplay(std::ostream &out) const
DGtal::functors::PolarPointComparatorBy2x2DetComputer::isValid
bool isValid() const
DGtal::functors::Thresholder
Aim: A small functor with an operator () that compares one value to a threshold value according to tw...
Definition
BasicFunctors.h:501
DGtal::functors
functors namespace gathers all DGtal functors.
Definition
BasicBoolFunctors.h:49
DGtal::functors::operator<<
std::ostream & operator<<(std::ostream &out, const FunctorHolder< FunctorStorage, NeedDereference > &object)
Overloads 'operator<<' for displaying objects of class FunctorHolder.
Definition
FunctorHolder.h:239
DGtal
DGtal is the top-level namespace which contains all DGtal functions and types.
Definition
ClosedIntegerHalfPlane.h:49
DGtal::C2x2DetComputer
Aim: This concept gathers all models that are able to compute the (sign of the) determinant of a 2x2 ...
Definition
C2x2DetComputer.h:108
aPoint
const Point aPoint(3, 4)
src
DGtal
geometry
tools
PolarPointComparatorBy2x2DetComputer.h
Generated on
for DGtal by
1.18.0