Fawkes API
Fawkes Development Version
|
Check if point is inside or outside a given polygon. More...
#include <comparisons.h>
Public Types | |
typedef boost::shared_ptr< PolygonComparison< PointT > > | Ptr |
Shared pointer. More... | |
typedef boost::shared_ptr< const PolygonComparison< PointT > > | ConstPtr |
Constant shared pointer. More... | |
Public Member Functions | |
PolygonComparison (const pcl::PointCloud< PointT > &polygon, bool inside=true) | |
Constructor. More... | |
virtual | ~PolygonComparison () |
Virtual empty destructor. More... | |
virtual bool | evaluate (const PointT &point) const |
Evaluate for given pixel. More... | |
Protected Attributes | |
bool | inside_ |
Flag to determine whether to do inside or outside check. More... | |
const pcl::PointCloud< PointT > & | polygon_ |
The polygon to check against. More... | |
Check if point is inside or outside a given polygon.
This comparison determines if a given point is inside or outside a given polygon. A flag can be set to have an inside or outside check. The class uses pcl::isPointIn2DPolygon() to determine if the point is inside the polygon. Not that we assume planar data, for example points projected into a segmented plane.
Definition at line 47 of file comparisons.h.
typedef boost::shared_ptr<const PolygonComparison<PointT> > fawkes::pcl_utils::PolygonComparison< PointT >::ConstPtr |
Constant shared pointer.
Definition at line 54 of file comparisons.h.
typedef boost::shared_ptr<PolygonComparison<PointT> > fawkes::pcl_utils::PolygonComparison< PointT >::Ptr |
Shared pointer.
Definition at line 52 of file comparisons.h.
|
inline |
Constructor.
polygon | polygon to compare against, it must have at least three points |
inside | if true filter points inside the polygon, false for outside |
Definition at line 60 of file comparisons.h.
|
inlinevirtual |
Virtual empty destructor.
Definition at line 66 of file comparisons.h.
|
inlinevirtual |
Evaluate for given pixel.
point | point to compare |
Definition at line 73 of file comparisons.h.
References fawkes::pcl_utils::PolygonComparison< PointT >::inside_, and fawkes::pcl_utils::PolygonComparison< PointT >::polygon_.
|
protected |
Flag to determine whether to do inside or outside check.
Definition at line 83 of file comparisons.h.
Referenced by fawkes::pcl_utils::PolygonComparison< PointT >::evaluate().
|
protected |
The polygon to check against.
Definition at line 85 of file comparisons.h.
Referenced by fawkes::pcl_utils::PolygonComparison< PointT >::evaluate().