DGtal  0.9.3beta
Public Types | Public Member Functions | Private Attributes
DGtal::functors::ShapeGeometricFunctors::ShapePositionFunctor< TShape > Struct Template Reference

#include <DGtal/shapes/ShapeGeometricFunctors.h>

Collaboration diagram for DGtal::functors::ShapeGeometricFunctors::ShapePositionFunctor< TShape >:
[legend]

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
 

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

Definition at line 67 of file ShapeGeometricFunctors.h.

Definition at line 68 of file ShapeGeometricFunctors.h.

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

Definition at line 66 of file ShapeGeometricFunctors.h.

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

Definition at line 65 of file ShapeGeometricFunctors.h.

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

Definition at line 69 of file ShapeGeometricFunctors.h.

Constructor & Destructor Documentation

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 ) {}
CountedConstPtrOrConstPtr< Shape > myShape
The shape of interest.

Member Function Documentation

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.

References DGtal::functors::ShapeGeometricFunctors::ShapePositionFunctor< TShape >::myShape.

86  {
87  myShape = aShape;
88  }
CountedConstPtrOrConstPtr< Shape > myShape
The shape of interest.
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


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