DGtal  1.5.beta
DGtal::functors::PositionFunctorFrom2DPoint< Vector, TPosition > Struct Template Reference

Functor that returns the position of any point/vector with respect to a digital straight line of shift myShift. We recall that the shift vector is a vector translating a point of remainder \( r \) to a point of remainder \( r + \omega \). See Digital straight lines and segments
for further details. More...

#include <DGtal/geometry/curves/ArithmeticalDSSConvexHull.h>

Public Types

typedef TPosition Position
 

Public Member Functions

 PositionFunctorFrom2DPoint (const Vector &aShift)
 
template<typename PointVector >
Position operator() (const PointVector &aPointVector) const
 

Private Attributes

Vector myShift
 shift vector More...
 

Detailed Description

template<typename Vector, typename TPosition>
struct DGtal::functors::PositionFunctorFrom2DPoint< Vector, TPosition >

Functor that returns the position of any point/vector with respect to a digital straight line of shift myShift. We recall that the shift vector is a vector translating a point of remainder \( r \) to a point of remainder \( r + \omega \). See Digital straight lines and segments
for further details.

Template Parameters
Vectora model of 2d vector
TPositiona model of integer used to locate the points of a DSL

Definition at line 63 of file ArithmeticalDSSConvexHull.h.

Member Typedef Documentation

◆ Position

template<typename Vector , typename TPosition >
typedef TPosition DGtal::functors::PositionFunctorFrom2DPoint< Vector, TPosition >::Position

Definition at line 66 of file ArithmeticalDSSConvexHull.h.

Constructor & Destructor Documentation

◆ PositionFunctorFrom2DPoint()

template<typename Vector , typename TPosition >
DGtal::functors::PositionFunctorFrom2DPoint< Vector, TPosition >::PositionFunctorFrom2DPoint ( const Vector aShift)
inline

Constructor

Parameters
aShiftshift vector of a naive or standard DSL

Definition at line 75 of file ArithmeticalDSSConvexHull.h.

Member Function Documentation

◆ operator()()

template<typename Vector , typename TPosition >
template<typename PointVector >
Position DGtal::functors::PositionFunctorFrom2DPoint< Vector, TPosition >::operator() ( const PointVector aPointVector) const
inline

Returns the position of a point in a digital straight line

Parameters
aPointVectorpoint/vector at which we compute the position
Returns
position of the point
Template Parameters
PointVectormodel of 2D point/vector

Definition at line 84 of file ArithmeticalDSSConvexHull.h.

85  {
86  return ( - myShift[1] * aPointVector[0]
87  + myShift[0] * aPointVector[1] );
88  }

References DGtal::functors::PositionFunctorFrom2DPoint< Vector, TPosition >::myShift.

Field Documentation

◆ myShift

template<typename Vector , typename TPosition >
Vector DGtal::functors::PositionFunctorFrom2DPoint< Vector, TPosition >::myShift
private

The documentation for this struct was generated from the following file: