DGtal
0.9.3

#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 
Aim: Predicate returning 'true' iff a given point is in the 'interior' of a given shape, 'false' otherwise.
TSurface  a 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() 
isUpward  a bool for the orientation ('true' means that the interior is the set of points of positive distance) 
isClosed  a 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 \):
\( \{(x,y)  y \leq ax + b \} \)
The second set can be defined as follows:
Then, you can create and use your halfplane as shown below:
You should get:
This class is a model of concepts::CPointPredicate.
Definition at line 95 of file Point2ShapePredicate.h.
typedef TSurface::Distance DGtal::functors::Point2ShapePredicate< TSurface, isUpward, isClosed >::Distance 
Definition at line 101 of file Point2ShapePredicate.h.
typedef TSurface::Point DGtal::functors::Point2ShapePredicate< TSurface, isUpward, isClosed >::Point 
Definition at line 100 of file Point2ShapePredicate.h.
DGtal::functors::Point2ShapePredicate< TSurface, isUpward, isClosed >::Point2ShapePredicate  (  const TSurface &  aSurface  ) 
Constructor.
aSurface  any Surface 
DGtal::functors::Point2ShapePredicate< TSurface, isUpward, isClosed >::Point2ShapePredicate  (  const Point2ShapePredicate< TSurface, isUpward, isClosed > &  other  ) 
Copy constructor.
other  the object to clone. 
DGtal::functors::Point2ShapePredicate< TSurface, isUpward, isClosed >::~Point2ShapePredicate  (  ) 
Destructor. Does nothing
bool DGtal::functors::Point2ShapePredicate< TSurface, isUpward, isClosed >::operator()  (  const Point &  p  )  const 
p  any point. 
void DGtal::functors::Point2ShapePredicate< TSurface, isUpward, isClosed >::selfDisplay  (  std::ostream &  out  )  const 
Writes/Displays the object on an output stream.
out  the output stream where the object is written. 

private 
The surface with respect to the points have to be located
Definition at line 141 of file Point2ShapePredicate.h.