Public Types | Public Member Functions | Private Attributes

DGtal::Point2ShapePredicate< Shape, isUpward, isClosed > Class Template Reference

Aim: Predicate returning true iff the point is in the 'interior' of the shape following the concept of CPointPredicate. More...

#include <Point2ShapePredicate.h>

Public Types

typedef Shape::Point Point
typedef Shape::Coordinate Coordinate

Public Member Functions

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

Private Attributes

Shape myS

Detailed Description

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

Aim: Predicate returning true iff the point is in the 'interior' of the shape following the concept of CPointPredicate.

Description of template class 'Point2ShapePredicate'

The concept of shape considered here stands for a 2D Euclidean shape separating the plane in two disjoints parts (the 'interior' and the 'exterior') and able to return for any point the signed distance to itself (negative in the interior, positive in the exterior) The orientation (which part is the 'interior'?) and the closure (is the boundary included?) are given by the two boolean template parameters


Member Typedef Documentation

template<typename Shape , bool isUpward, bool isClosed>
typedef Shape::Coordinate DGtal::Point2ShapePredicate< Shape, isUpward, isClosed >::Coordinate
template<typename Shape , bool isUpward, bool isClosed>
typedef Shape::Point DGtal::Point2ShapePredicate< Shape, isUpward, isClosed >::Point

Constructor & Destructor Documentation

template<typename Shape , bool isUpward, bool isClosed>
DGtal::Point2ShapePredicate< Shape, isUpward, isClosed >::Point2ShapePredicate ( const Shape &  aShape  ) 

Constructor.

Parameters:
aShape any shape
template<typename Shape , bool isUpward, bool isClosed>
DGtal::Point2ShapePredicate< Shape, isUpward, isClosed >::Point2ShapePredicate ( const Point2ShapePredicate< Shape, isUpward, isClosed > &  other  ) 

Copy constructor.

Parameters:
other the object to clone.
template<typename Shape , bool isUpward, bool isClosed>
DGtal::Point2ShapePredicate< Shape, isUpward, isClosed >::~Point2ShapePredicate (  ) 

Destructor. Does nothing


Member Function Documentation

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

Writes/Displays the object on an output stream.

Parameters:
out the output stream where the object is written.

Field Documentation

template<typename Shape , bool isUpward, bool isClosed>
Shape DGtal::Point2ShapePredicate< Shape, isUpward, isClosed >::myS [private]

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