File failed to load: https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.3/config/TeX-MML-AM_CHTML/MathJax.js
DGtal 2.0.0
DGtal::functors::ShapeGeometricFunctors::ShapePositionFunctor< TShape > Struct Template Reference

Aim: A functor RealPoint -> Quantity that returns the position of the point itself. More...

#include <DGtal/shapes/ShapeGeometricFunctors.h>

Public Types

typedef TShape Shape
typedef Shape::RealPoint RealPoint
typedef RealPoint Argument
typedef RealPoint Quantity
typedef Quantity Value

Public Member Functions

 ShapePositionFunctor (ConstAlias< Shape > aShape=0)
void attach (ConstAlias< Shape > aShape)
Quantity operator() (const RealPoint &p) const

Private Attributes

CountedConstPtrOrConstPtr< ShapemyShape
 The shape of interest.

Detailed Description

template<typename TShape>
struct DGtal::functors::ShapeGeometricFunctors::ShapePositionFunctor< TShape >

Aim: A functor RealPoint -> Quantity that returns the position of the point itself.

Description of template class 'ShapePositionFunctor'

Template Parameters
TShapethe type of the shape where geometric estimation are made.

Definition at line 64 of file ShapeGeometricFunctors.h.

Member Typedef Documentation

◆ Argument

template<typename TShape>
typedef RealPoint DGtal::functors::ShapeGeometricFunctors::ShapePositionFunctor< TShape >::Argument

Definition at line 67 of file ShapeGeometricFunctors.h.

◆ Quantity

template<typename TShape>
typedef RealPoint DGtal::functors::ShapeGeometricFunctors::ShapePositionFunctor< TShape >::Quantity

Definition at line 68 of file ShapeGeometricFunctors.h.

◆ RealPoint

Definition at line 66 of file ShapeGeometricFunctors.h.

◆ Shape

template<typename TShape>
typedef TShape DGtal::functors::ShapeGeometricFunctors::ShapePositionFunctor< TShape >::Shape

Definition at line 65 of file ShapeGeometricFunctors.h.

◆ Value

Definition at line 69 of file ShapeGeometricFunctors.h.

Constructor & Destructor Documentation

◆ ShapePositionFunctor()

template<typename TShape>
DGtal::functors::ShapeGeometricFunctors::ShapePositionFunctor< TShape >::ShapePositionFunctor ( ConstAlias< Shape > aShape = 0)
inline

Constructor. A shape may also be attached at construction.

Parameters
aShapethe shape of interest. The alias can be secured if a some counted pointer is handed.

Definition at line 77 of file ShapeGeometricFunctors.h.

77: myShape( aShape ) {}
Aim: A functor RealPoint -> Quantity that returns the position of the point itself.
CountedConstPtrOrConstPtr< Shape > myShape
The shape of interest.

References myShape.

Member Function Documentation

◆ attach()

template<typename TShape>
void DGtal::functors::ShapeGeometricFunctors::ShapePositionFunctor< TShape >::attach ( ConstAlias< Shape > aShape)
inline

Attach a shape.

Parameters
aShapethe shape of interest. The alias can be secured if a some counted pointer is handed.

Definition at line 85 of file ShapeGeometricFunctors.h.

86 {
88 }

References myShape.

◆ operator()()

template<typename TShape>
Quantity DGtal::functors::ShapeGeometricFunctors::ShapePositionFunctor< TShape >::operator() ( const RealPoint & p) const
inline

Map operator RealPoint -> RealPoint giving the position.

Parameters
pany point on the shape.
Returns
the point p itself

Definition at line 95 of file ShapeGeometricFunctors.h.

96 {
97 return p;
98 }

Field Documentation

◆ myShape

The shape of interest.

Definition at line 102 of file ShapeGeometricFunctors.h.

Referenced by attach(), and ShapePositionFunctor().


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