DGtal
1.5.beta
|
A grid point consists of a couple of nonnegative coordinates \( (x,y) \) and an integer index \( k \) that determines a point used as origin. For a triplet of vectors \( (m_k)_{0 \leq k \leq 2} \) and a point \( q \), a grid point is defined as: \( q - m_{k} + x m_{(k+1)\bmod 3} + y m_{(k+2)\bmod 3} \). \( q - m_{k} \), called base point, is used as origin. More...
#include <DGtal/geometry/helpers/PlaneProbingEstimatorHelper.h>
Public Member Functions | |
GridPoint ()=default | |
GridPoint (std::pair< Integer, Integer > const &aDir, Index const &aK) | |
GridPoint (Integer const &aX, Integer const &aY, Index const &aK) | |
std::pair< Integer, Integer > | direction () const |
Index | k () const |
template<typename Vector > | |
Vector | directionVector (std::array< Vector, 3 > const &aM) const |
template<typename Point > | |
Point | relativePoint (std::array< Point, 3 > const &aM) const |
bool | operator== (GridPoint const &other) const |
bool | operator!= (GridPoint const &other) const |
GridPoint | getOnSameGrid (const std::pair< Integer, Integer > &aDir) const |
GridPoint | operator+ (const GridPoint &other) const |
GridPoint | operator* (Integer aValue) const |
bool | isValid () const |
Private Member Functions | |
BOOST_CONCEPT_ASSERT ((concepts::CInteger< Integer >)) | |
Private Attributes | |
std::pair< Integer, Integer > | myDir |
Index | myK |
A grid point consists of a couple of nonnegative coordinates \( (x,y) \) and an integer index \( k \) that determines a point used as origin. For a triplet of vectors \( (m_k)_{0 \leq k \leq 2} \) and a point \( q \), a grid point is defined as: \( q - m_{k} + x m_{(k+1)\bmod 3} + y m_{(k+2)\bmod 3} \). \( q - m_{k} \), called base point, is used as origin.
Description of template class 'GridPoint'
This class is used to represent candidate points for the plane-probing L-algorithm. In practice, the point \( q \) is the fixed point and the three vectors \( (m_k)_{0 \leq k \leq 2} \) are the vectors defining the current probing frame.
Integer | the integer type, model of concepts::CInteger. |
Definition at line 238 of file PlaneProbingEstimatorHelper.h.
|
default |
Default constructor.
Referenced by DGtal::detail::GridPoint< Integer, Index >::getOnSameGrid().
|
inline |
Constructs a grid point from a couple of coordinates and the index of the point used as origin.
aDir | a pair of nonnegative integers. |
aK | an index in {0,1,2}. |
Definition at line 256 of file PlaneProbingEstimatorHelper.h.
|
inline |
Constructs a grid point from a couple of coordinates and the index of the point used as origin.
aX | first coordinate. |
aY | second coordinate. |
aK | an index in {0,1,2}. |
Definition at line 266 of file PlaneProbingEstimatorHelper.h.
|
private |
|
inline |
Returns the couple of coordinates, i.e., the direction going from the origin to the grid point.
Definition at line 275 of file PlaneProbingEstimatorHelper.h.
References DGtal::detail::GridPoint< Integer, Index >::myDir.
Referenced by DGtal::detail::operator<<().
|
inline |
Returns the vector going from the base point to the geometric realization of this object.
aM | an array of three vectors. |
Vector | a type for vectors. |
Definition at line 297 of file PlaneProbingEstimatorHelper.h.
References DGtal::detail::GridPoint< Integer, Index >::myDir, and DGtal::detail::GridPoint< Integer, Index >::myK.
Referenced by DGtal::detail::GridPoint< Integer, Index >::relativePoint().
|
inline |
Returns a grid point given a couple of coordinates.
aDir | a couple of coordinates. |
Definition at line 340 of file PlaneProbingEstimatorHelper.h.
References DGtal::detail::GridPoint< Integer, Index >::GridPoint(), and DGtal::detail::GridPoint< Integer, Index >::myK.
Referenced by DGtal::detail::GridPointOnProbingRay< Integer, Index >::gridPoint(), DGtal::detail::GridPoint< Integer, Index >::operator*(), and DGtal::detail::GridPoint< Integer, Index >::operator+().
|
inline |
Checks whether the representation of the grid point is valid, i.e., the coordinates are nonnegative coordinates, not both equal to zero, and the index is in {0,1,2}.
Definition at line 376 of file PlaneProbingEstimatorHelper.h.
References DGtal::detail::GridPoint< Integer, Index >::myDir, and DGtal::detail::GridPoint< Integer, Index >::myK.
|
inline |
Returns the index of the point used as origin.
Definition at line 284 of file PlaneProbingEstimatorHelper.h.
References DGtal::detail::GridPoint< Integer, Index >::myK.
Referenced by DGtal::detail::operator<<().
|
inline |
Tells whether this grid point is different from another or not.
other | another grid point. |
Definition at line 330 of file PlaneProbingEstimatorHelper.h.
|
inline |
Scales this grid point by a scalar (as if it was vector).
aValue | a scalar value |
Definition at line 363 of file PlaneProbingEstimatorHelper.h.
References DGtal::detail::GridPoint< Integer, Index >::getOnSameGrid(), and DGtal::detail::GridPoint< Integer, Index >::myDir.
|
inline |
Adds a grid point to this one (as if they were vectors).
other | another grid point. |
Definition at line 350 of file PlaneProbingEstimatorHelper.h.
References DGtal::detail::GridPoint< Integer, Index >::getOnSameGrid(), DGtal::detail::GridPoint< Integer, Index >::myDir, and DGtal::detail::GridPoint< Integer, Index >::myK.
|
inline |
Tells whether this grid point is equal to another or not. Two grid points are equal iff their members are equal.
other | another grid point. |
Definition at line 320 of file PlaneProbingEstimatorHelper.h.
References DGtal::detail::GridPoint< Integer, Index >::myDir, and DGtal::detail::GridPoint< Integer, Index >::myK.
|
inline |
Returns the geometric realization of this grid point.
aM | an array of three points. |
Point | a type for points. |
Definition at line 309 of file PlaneProbingEstimatorHelper.h.
References DGtal::detail::GridPoint< Integer, Index >::directionVector(), and DGtal::detail::GridPoint< Integer, Index >::myK.
Referenced by DGtal::detail::GridPointOnProbingRay< Integer, Index >::relativePoint().
|
private |
Couple of coordinates giving a direction
Definition at line 388 of file PlaneProbingEstimatorHelper.h.
Referenced by DGtal::detail::GridPoint< Integer, Index >::direction(), DGtal::detail::GridPoint< Integer, Index >::directionVector(), DGtal::detail::GridPoint< Integer, Index >::isValid(), DGtal::detail::GridPoint< Integer, Index >::operator*(), DGtal::detail::GridPoint< Integer, Index >::operator+(), and DGtal::detail::GridPoint< Integer, Index >::operator==().
|
private |
Index of a point used as origin
Definition at line 389 of file PlaneProbingEstimatorHelper.h.
Referenced by DGtal::detail::GridPoint< Integer, Index >::directionVector(), DGtal::detail::GridPoint< Integer, Index >::getOnSameGrid(), DGtal::detail::GridPoint< Integer, Index >::isValid(), DGtal::detail::GridPoint< Integer, Index >::k(), DGtal::detail::GridPoint< Integer, Index >::operator+(), DGtal::detail::GridPoint< Integer, Index >::operator==(), and DGtal::detail::GridPoint< Integer, Index >::relativePoint().