DGtal
2.2.0
Toggle main menu visibility
Loading...
Searching...
No Matches
PredicateFromOrientationFunctor2.h
1
16
17
#pragma once
18
30
31
#if defined(PredicateFromOrientationFunctor2_RECURSES)
32
#error Recursive header files inclusion detected in PredicateFromOrientationFunctor2.h
33
#else
// defined(PredicateFromOrientationFunctor2_RECURSES)
35
#define PredicateFromOrientationFunctor2_RECURSES
36
37
#if !defined PredicateFromOrientationFunctor2_h
39
#define PredicateFromOrientationFunctor2_h
40
42
// Inclusions
43
#include <iostream>
44
#include "DGtal/base/Common.h"
45
46
#include "DGtal/base/Alias.h"
47
#include "DGtal/base/BasicFunctors.h"
48
#include "DGtal/geometry/tools/determinant/COrientationFunctor2.h"
50
51
namespace
DGtal
52
{
53
55
// template class PredicateFromOrientationFunctor2
80
template
<
typename
TOrientationFunctor,
bool
acceptNeg = false,
bool
acceptZero = false >
81
class
PredicateFromOrientationFunctor2
82
{
83
// ----------------------- Types ------------------------------------------
84
public
:
88
typedef
TOrientationFunctor
Functor
;
89
BOOST_CONCEPT_ASSERT
((
concepts::COrientationFunctor2<Functor>
));
90
94
typedef
typename
Functor::Point
Point
;
95
100
typedef
functors::Thresholder<typename Functor::Value, acceptNeg, acceptZero>
MyThresholder
;
101
102
// ----------------------- Standard services ------------------------------
103
public
:
104
109
PredicateFromOrientationFunctor2
(
Alias<Functor>
aFunctor );
110
116
void
init
(
const
Point
& aPoint1,
const
Point
& aPoint2 );
117
124
bool
operator()
(
const
Point
&
aPoint
)
const
;
125
134
bool
operator()
(
const
Point
& aPoint1,
const
Point
& aPoint2,
const
Point
& aPoint3 )
const
;
135
136
// ----------------------- Interface --------------------------------------
137
public
:
138
143
void
selfDisplay
( std::ostream & out )
const
;
144
149
bool
isValid
()
const
;
150
151
// ------------------------- Private Data --------------------------------
152
private
:
153
157
Functor
*
const
myFunctorPtr
;
158
162
const
MyThresholder
myThresholder
;
163
164
165
};
// end of class PredicateFromOrientationFunctor2
166
167
174
template
<
typename
TOrientationFunctor,
bool
acceptNeg,
bool
acceptZero>
175
std::ostream&
176
operator<<
( std::ostream & out,
const
PredicateFromOrientationFunctor2<TOrientationFunctor, acceptNeg, acceptZero >
&
object
);
177
178
}
// namespace DGtal
179
180
182
// Includes inline functions.
183
#include "DGtal/geometry/tools/determinant/PredicateFromOrientationFunctor2.ih"
184
185
// //
187
188
#endif
// !defined PredicateFromOrientationFunctor2_h
189
190
#undef PredicateFromOrientationFunctor2_RECURSES
191
#endif
// else defined(PredicateFromOrientationFunctor2_RECURSES)
DGtal::Alias
Aim: This class encapsulates its parameter class so that to indicate to the user that the object/poin...
Definition
Alias.h:183
DGtal::InHalfPlaneBySimple3x3Matrix< Point, double >::Point
Point Point
Definition
InHalfPlaneBySimple3x3Matrix.h:99
DGtal::PredicateFromOrientationFunctor2
Aim: Small adapter to models of COrientationFunctor2. It is a model of concepts::CPointPredicate....
Definition
PredicateFromOrientationFunctor2.h:82
DGtal::PredicateFromOrientationFunctor2::isValid
bool isValid() const
DGtal::PredicateFromOrientationFunctor2::operator()
bool operator()(const Point &aPoint) const
DGtal::PredicateFromOrientationFunctor2::Point
Functor::Point Point
Definition
PredicateFromOrientationFunctor2.h:94
DGtal::PredicateFromOrientationFunctor2::operator()
bool operator()(const Point &aPoint1, const Point &aPoint2, const Point &aPoint3) const
DGtal::PredicateFromOrientationFunctor2::init
void init(const Point &aPoint1, const Point &aPoint2)
DGtal::PredicateFromOrientationFunctor2::selfDisplay
void selfDisplay(std::ostream &out) const
DGtal::PredicateFromOrientationFunctor2< Functor, false, false >::myFunctorPtr
Functor *const myFunctorPtr
Definition
PredicateFromOrientationFunctor2.h:157
DGtal::PredicateFromOrientationFunctor2::Functor
TOrientationFunctor Functor
Definition
PredicateFromOrientationFunctor2.h:88
DGtal::PredicateFromOrientationFunctor2::MyThresholder
functors::Thresholder< typename Functor::Value, acceptNeg, acceptZero > MyThresholder
Definition
PredicateFromOrientationFunctor2.h:100
DGtal::PredicateFromOrientationFunctor2::PredicateFromOrientationFunctor2
PredicateFromOrientationFunctor2(Alias< Functor > aFunctor)
DGtal::PredicateFromOrientationFunctor2< Functor, false, false >::myThresholder
const MyThresholder myThresholder
Definition
PredicateFromOrientationFunctor2.h:162
DGtal::PredicateFromOrientationFunctor2::BOOST_CONCEPT_ASSERT
BOOST_CONCEPT_ASSERT((concepts::COrientationFunctor2< Functor >))
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
DGtal is the top-level namespace which contains all DGtal functions and types.
Definition
ClosedIntegerHalfPlane.h:49
DGtal::operator<<
std::ostream & operator<<(std::ostream &out, const ClosedIntegerHalfPlane< TSpace > &object)
DGtal::concepts::COrientationFunctor2
Aim: This concept is a refinement of COrientationFunctor, useful for simple algebraic curves that can...
Definition
COrientationFunctor2.h:85
aPoint
const Point aPoint(3, 4)
src
DGtal
geometry
tools
determinant
PredicateFromOrientationFunctor2.h
Generated on
for DGtal by
1.18.0