DGtal
1.4.2
|
Aim: This concept gathers classes that are able to compare the position of two given points \( P, Q \) around a pole \( O \). More precisely, they compare the oriented angles lying between the horizontal line passing by \( O \) and the rays \( [OP) \) and \( [OQ) \) (in a counter-clockwise orientation). This is equivalent to compare the angle in radians from 0 (included) to 2 π (excluded). More...
#include <DGtal/geometry/tools/CPolarPointComparator2D.h>
Public Types | |
typedef T::Point | Point |
Public Member Functions | |
BOOST_CONCEPT_USAGE (CPolarPointComparator2D) | |
void | checkConstConstraints () const |
Private Attributes | |
T | myX |
Point | myP |
bool | myB |
Aim: This concept gathers classes that are able to compare the position of two given points \( P, Q \) around a pole \( O \). More precisely, they compare the oriented angles lying between the horizontal line passing by \( O \) and the rays \( [OP) \) and \( [OQ) \) (in a counter-clockwise orientation). This is equivalent to compare the angle in radians from 0 (included) to 2 π (excluded).
Description of concept 'CPolarPointComparator2D'
The main method is the operator() applied on two points. It returns 'true' if the first point is located strictly before the second one, 'false' otherwise. A point \( P \) is located strictly before a point \( Q \) iff the oriented angle done by \( P \) is smaller than the one of \( Q \) or its euclidean norm is shorter if \( O, P, Q \) are aligned. Note that it returns 'false' if \( P = Q \).
| Name | Expression | Type requirements | Return type | Precondition | Semantics | Post condition | Complexity | |------------------—+-----------—+-------------------—+----------—+-----------—+----------------------------------------------------—+-------------—+--------------—| | pole setter | x.setPole(p) | p is of type P | | | the pole is set to p | | O(1) | | comparison function | x(p1, p2) | p1, p2 are of type P | bool | | tells whether p1 is located strictly before p2 or not | | model-dependant |
PolarPointComparator2DBy2x2DetComputer.
T | the type that should be a model of CPolarPointComparator2D. |
Definition at line 96 of file CPolarPointComparator2D.h.
typedef T::Point DGtal::concepts::CPolarPointComparator2D< T >::Point |
Definition at line 101 of file CPolarPointComparator2D.h.
|
inline |
Definition at line 103 of file CPolarPointComparator2D.h.
References DGtal::concepts::CPolarPointComparator2D< T >::checkConstConstraints(), DGtal::concepts::CPolarPointComparator2D< T >::myP, and DGtal::concepts::CPolarPointComparator2D< T >::myX.
|
inline |
Definition at line 109 of file CPolarPointComparator2D.h.
References DGtal::concepts::CPolarPointComparator2D< T >::myB, DGtal::concepts::CPolarPointComparator2D< T >::myP, DGtal::concepts::CPolarPointComparator2D< T >::myX, and DGtal::concepts::ConceptUtils::sameType().
Referenced by DGtal::concepts::CPolarPointComparator2D< T >::BOOST_CONCEPT_USAGE().
|
private |
Definition at line 119 of file CPolarPointComparator2D.h.
Referenced by DGtal::concepts::CPolarPointComparator2D< T >::checkConstConstraints().
|
private |
Definition at line 118 of file CPolarPointComparator2D.h.
Referenced by DGtal::concepts::CPolarPointComparator2D< T >::BOOST_CONCEPT_USAGE(), and DGtal::concepts::CPolarPointComparator2D< T >::checkConstConstraints().
|
private |
Definition at line 117 of file CPolarPointComparator2D.h.
Referenced by DGtal::concepts::CPolarPointComparator2D< T >::BOOST_CONCEPT_USAGE(), and DGtal::concepts::CPolarPointComparator2D< T >::checkConstConstraints().