DGtal 1.3.0
Searching...
No Matches
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
 Vector a model of 2d vector TPosition a model of integer used to locate the points of a DSL

Definition at line 63 of file ArithmeticalDSSConvexHull.h.

## ◆ Position

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

Definition at line 66 of file ArithmeticalDSSConvexHull.h.

## ◆ PositionFunctorFrom2DPoint()

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

Constructor

Parameters
 aShift shift vector of a naive or standard DSL

Definition at line 75 of file ArithmeticalDSSConvexHull.h.

## ◆ 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
 aPointVector point/vector at which we compute the position
Returns
position of the point
Template Parameters
 PointVector model 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 }

## ◆ myShift

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

shift vector

Definition at line 69 of file ArithmeticalDSSConvexHull.h.

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