DGtal  0.9.3beta
Public Types | Public Member Functions | Private Attributes
DGtal::functors::Point2ShapePredicate< TSurface, isUpward, isClosed > Class Template Reference

#include <DGtal/shapes/fromPoints/Point2ShapePredicate.h>

Public Types

typedef TSurface::Point Point
 
typedef TSurface::Distance Distance
 

Public Member Functions

 Point2ShapePredicate (const TSurface &aSurface)
 
 Point2ShapePredicate (const Point2ShapePredicate &other)
 
bool operator() (const Point &p) const
 
void selfDisplay (std::ostream &out) const
 
 ~Point2ShapePredicate ()
 

Private Attributes

TSurface myS
 

Detailed Description

template<typename TSurface, bool isUpward, bool isClosed>
class DGtal::functors::Point2ShapePredicate< TSurface, isUpward, isClosed >

Aim: Predicate returning 'true' iff a given point is in the 'interior' of a given shape, 'false' otherwise.

Template Parameters
TSurfacea type that is a model of COrientableHypersurface. Must separate the space in two disjoints parts (the 'interior' and the 'exterior') and must be able to return for any given point (of type TSurface::Point) the signed distance to itself (of type TSurface::Distance) by a method called signedDistance()
isUpwarda bool for the orientation ('true' means that the interior is the set of points of positive distance)
isCloseda bool for the closure ('true' means that the surface is included)

For instance, in 2d, you can define four shapes from one straight line of equation \( y = ax + b \):

Definition at line 95 of file Point2ShapePredicate.h.

Member Typedef Documentation

template<typename TSurface, bool isUpward, bool isClosed>
typedef TSurface::Distance DGtal::functors::Point2ShapePredicate< TSurface, isUpward, isClosed >::Distance

Definition at line 101 of file Point2ShapePredicate.h.

template<typename TSurface, bool isUpward, bool isClosed>
typedef TSurface::Point DGtal::functors::Point2ShapePredicate< TSurface, isUpward, isClosed >::Point

Definition at line 100 of file Point2ShapePredicate.h.

Constructor & Destructor Documentation

template<typename TSurface, bool isUpward, bool isClosed>
DGtal::functors::Point2ShapePredicate< TSurface, isUpward, isClosed >::Point2ShapePredicate ( const TSurface &  aSurface)

Constructor.

Parameters
aSurfaceany Surface
template<typename TSurface, bool isUpward, bool isClosed>
DGtal::functors::Point2ShapePredicate< TSurface, isUpward, isClosed >::Point2ShapePredicate ( const Point2ShapePredicate< TSurface, isUpward, isClosed > &  other)

Copy constructor.

Parameters
otherthe object to clone.
template<typename TSurface, bool isUpward, bool isClosed>
DGtal::functors::Point2ShapePredicate< TSurface, isUpward, isClosed >::~Point2ShapePredicate ( )

Destructor. Does nothing

Member Function Documentation

template<typename TSurface, bool isUpward, bool isClosed>
bool DGtal::functors::Point2ShapePredicate< TSurface, isUpward, isClosed >::operator() ( const Point p) const
Parameters
pany point.
Returns
true iff p is in the interior of the shape.
template<typename TSurface, bool isUpward, bool isClosed>
void DGtal::functors::Point2ShapePredicate< TSurface, isUpward, isClosed >::selfDisplay ( std::ostream &  out) const

Writes/Displays the object on an output stream.

Parameters
outthe output stream where the object is written.

Field Documentation

template<typename TSurface, bool isUpward, bool isClosed>
TSurface DGtal::functors::Point2ShapePredicate< TSurface, isUpward, isClosed >::myS
private

The surface with respect to the points have to be located

Definition at line 141 of file Point2ShapePredicate.h.


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