31#if defined(ShapeGeometricFunctors_RECURSES)
32#error Recursive header files inclusion detected in ShapeGeometricFunctors.h
35#define ShapeGeometricFunctors_RECURSES
37#if !defined ShapeGeometricFunctors_h
39#define ShapeGeometricFunctors_h
44#include "DGtal/base/Common.h"
52 namespace ShapeGeometricFunctors
63 template <
typename TShape>
113 template <
typename TShape>
151 return ( norm != 0 ) ? v / norm : v;
168 template <
typename TShape>
204 return myShape->meanCurvature( p );
220 template <
typename TShape>
256 return myShape->gaussianCurvature( p );
272 template <
typename TShape>
310 myShape->principalCurvatures( p, k1, k2 );
327 template <
typename TShape>
365 myShape->principalCurvatures( p, k1, k2 );
384 template <
typename TShape>
422 myShape->principalDirections( p, d1, d2 );
441 template <
typename TShape>
479 myShape->principalDirections( p, d1, d2 );
498 template <
typename TShape>
505 typedef std::tuple<Scalar,Scalar,RealVector,RealVector>
Quantity;
540 myShape->principalCurvatures( p, k1, k2 );
541 myShape->principalDirections( p, d1, d2 );
542 return std::make_tuple( k1, k2, d1, d2 );
558#include "DGtal/shapes/ShapeGeometricFunctors.ih"
565#undef ShapeGeometricFunctors_RECURSES
Aim: This class encapsulates its parameter class so that to indicate to the user that the object/poin...
Aim: Smart or simple const pointer on T. It can be a smart pointer based on reference counts or a sim...
Aim: Implements basic operations that will be used in Point and Vector classes.
TEuclideanRing Component
Type for Vector elements.
DGtal is the top-level namespace which contains all DGtal functions and types.
Aim: A functor RealPoint -> Quantity that returns the first principal curvature at given point (i....
RealVector::Component Scalar
Shape::RealPoint RealPoint
Quantity operator()(const RealPoint &p) const
ShapeFirstPrincipalCurvatureFunctor(ConstAlias< Shape > aShape=0)
CountedConstPtrOrConstPtr< Shape > myShape
The shape of interest.
void attach(ConstAlias< Shape > aShape)
Shape::RealVector RealVector
Aim: A functor RealPoint -> RealVector that returns the first principal direction at given point (i....
ShapeFirstPrincipalDirectionFunctor(ConstAlias< Shape > aShape=0)
RealVector::Component Scalar
Shape::RealPoint RealPoint
CountedConstPtrOrConstPtr< Shape > myShape
The shape of interest.
Quantity operator()(const RealPoint &p) const
Shape::RealVector RealVector
void attach(ConstAlias< Shape > aShape)
Aim: A functor RealPoint -> Quantity that returns the gaussian curvature at given point.
Quantity operator()(const RealPoint &p) const
CountedConstPtrOrConstPtr< Shape > myShape
The shape of interest.
Shape::RealPoint RealPoint
Shape::RealVector RealVector
RealVector::Component Scalar
ShapeGaussianCurvatureFunctor(ConstAlias< Shape > aShape=0)
void attach(ConstAlias< Shape > aShape)
Aim: A functor RealPoint -> Quantity that returns the mean curvature at given point.
ShapeMeanCurvatureFunctor(ConstAlias< Shape > aShape=0)
RealVector::Component Scalar
CountedConstPtrOrConstPtr< Shape > myShape
The shape of interest.
Shape::RealVector RealVector
Shape::RealPoint RealPoint
Quantity operator()(const RealPoint &p) const
void attach(ConstAlias< Shape > aShape)
Aim: A functor RealPoint -> Quantity that returns the normal vector at given point.
Shape::RealVector RealVector
Shape::RealPoint RealPoint
RealVector::Component Scalar
ShapeNormalVectorFunctor(ConstAlias< Shape > aShape=0)
CountedConstPtrOrConstPtr< Shape > myShape
The shape of interest.
Quantity operator()(const RealPoint &p) const
void attach(ConstAlias< Shape > aShape)
Aim: A functor RealPoint -> Quantity that returns the position of the point itself.
ShapePositionFunctor(ConstAlias< Shape > aShape=0)
void attach(ConstAlias< Shape > aShape)
Quantity operator()(const RealPoint &p) const
Shape::RealPoint RealPoint
CountedConstPtrOrConstPtr< Shape > myShape
The shape of interest.
Aim: A functor RealPoint -> (Scalar,Scalar,RealVector,RealVector that returns the principal curvature...
RealVector::Component Scalar
std::tuple< Scalar, Scalar, RealVector, RealVector > Quantity
ShapePrincipalCurvaturesAndDirectionsFunctor(ConstAlias< Shape > aShape=0)
void attach(ConstAlias< Shape > aShape)
Shape::RealVector RealVector
Shape::RealPoint RealPoint
CountedConstPtrOrConstPtr< Shape > myShape
The shape of interest.
Quantity operator()(const RealPoint &p) const
Aim: A functor RealPoint -> Quantity that returns the second principal curvature at given point (i....
CountedConstPtrOrConstPtr< Shape > myShape
The shape of interest.
void attach(ConstAlias< Shape > aShape)
Quantity operator()(const RealPoint &p) const
RealVector::Component Scalar
ShapeSecondPrincipalCurvatureFunctor(ConstAlias< Shape > aShape=0)
Shape::RealVector RealVector
Shape::RealPoint RealPoint
Aim: A functor RealPoint -> RealVector that returns the second principal direction at given point (i....
Quantity operator()(const RealPoint &p) const
RealVector::Component Scalar
Shape::RealPoint RealPoint
Shape::RealVector RealVector
CountedConstPtrOrConstPtr< Shape > myShape
The shape of interest.
void attach(ConstAlias< Shape > aShape)
ShapeSecondPrincipalDirectionFunctor(ConstAlias< Shape > aShape=0)