DGtal  1.1.0
PredicateFromOrientationFunctor2.h
1 
17 #pragma once
18 
31 #if defined(PredicateFromOrientationFunctor2_RECURSES)
32 #error Recursive header files inclusion detected in PredicateFromOrientationFunctor2.h
33 #else // defined(PredicateFromOrientationFunctor2_RECURSES)
34 
35 #define PredicateFromOrientationFunctor2_RECURSES
36 
37 #if !defined PredicateFromOrientationFunctor2_h
38 
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 >
82  {
83  // ----------------------- Types ------------------------------------------
84  public:
88  typedef TOrientationFunctor Functor;
90 
94  typedef typename Functor::Point Point;
95 
101 
102  // ----------------------- Standard services ------------------------------
103  public:
104 
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 Datas --------------------------------
152  private:
153 
158 
163 
164 
165  }; // end of class PredicateFromOrientationFunctor2
166 
167 
174  template <typename TOrientationFunctor, bool acceptNeg, bool acceptZero>
175  std::ostream&
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::functors::Thresholder
Aim: A small functor with an operator () that compares one value to a threshold value according to tw...
Definition: BasicFunctors.h:501
aPoint
const Point aPoint(3, 4)
DGtal::PredicateFromOrientationFunctor2::myFunctorPtr
Functor *const myFunctorPtr
Definition: PredicateFromOrientationFunctor2.h:157
DGtal::PredicateFromOrientationFunctor2::operator()
bool operator()(const Point &aPoint) const
DGtal::PredicateFromOrientationFunctor2::Point
Functor::Point Point
Definition: PredicateFromOrientationFunctor2.h:94
DGtal::PredicateFromOrientationFunctor2::isValid
bool isValid() const
DGtal::PredicateFromOrientationFunctor2::selfDisplay
void selfDisplay(std::ostream &out) const
DGtal
DGtal is the top-level namespace which contains all DGtal functions and types.
Definition: ClosedIntegerHalfPlane.h:49
DGtal::concepts::COrientationFunctor2
Aim: This concept is a refinement of COrientationFunctor, useful for simple algebraic curves that can...
Definition: COrientationFunctor2.h:85
DGtal::PredicateFromOrientationFunctor2::myThresholder
const MyThresholder myThresholder
Definition: PredicateFromOrientationFunctor2.h:162
DGtal::operator<<
std::ostream & operator<<(std::ostream &out, const ClosedIntegerHalfPlane< TSpace > &object)
DGtal::PredicateFromOrientationFunctor2::MyThresholder
functors::Thresholder< typename Functor::Value, acceptNeg, acceptZero > MyThresholder
Definition: PredicateFromOrientationFunctor2.h:100
DGtal::PredicateFromOrientationFunctor2::operator()
bool operator()(const Point &aPoint1, const Point &aPoint2, const Point &aPoint3) const
DGtal::PredicateFromOrientationFunctor2::BOOST_CONCEPT_ASSERT
BOOST_CONCEPT_ASSERT((concepts::COrientationFunctor2< Functor >))
DGtal::PredicateFromOrientationFunctor2::PredicateFromOrientationFunctor2
PredicateFromOrientationFunctor2(Alias< Functor > aFunctor)
DGtal::PredicateFromOrientationFunctor2::Functor
TOrientationFunctor Functor
Definition: PredicateFromOrientationFunctor2.h:88
DGtal::PredicateFromOrientationFunctor2
Aim: Small adapter to models of COrientationFunctor2. It is a model of concepts::CPointPredicate....
Definition: PredicateFromOrientationFunctor2.h:82
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::PredicateFromOrientationFunctor2::init
void init(const Point &aPoint1, const Point &aPoint2)
DGtal::InHalfPlaneBySimple3x3Matrix< Point, double >::Point
Point Point
Definition: InHalfPlaneBySimple3x3Matrix.h:99