DGtal  0.9.4beta
Public Types | Public Member Functions | Private Attributes
DGtal::functors::PositionFunctorFrom2DPoint< Vector, TPosition > Struct Template Reference

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

Collaboration diagram for DGtal::functors::PositionFunctorFrom2DPoint< Vector, TPosition >:
[legend]

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
 

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

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

Definition at line 66 of file ArithmeticalDSSConvexHull.h.

Constructor & Destructor Documentation

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

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  }

Field Documentation

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: