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. | |
typedef boost::shared_ptr < const PolygonComparison < PointT > > | ConstPtr |
Constant shared pointer. | |
Public Member Functions | |
PolygonComparison (const pcl::PointCloud< PointT > &polygon, bool inside=true) | |
Constructor. | |
virtual | ~PolygonComparison () |
Virtual empty destructor. | |
virtual bool | evaluate (const PointT &point) const |
Evaluate for given pixel. | |
Protected Attributes | |
bool | inside_ |
Flag to determine whether to do inside or outside check. | |
const pcl::PointCloud< PointT > & | polygon_ |
The polygon to check against. |
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.
typedef boost::shared_ptr<const PolygonComparison<PointT> > fawkes::pcl_utils::PolygonComparison::ConstPtr |
Constant shared pointer.
Definition at line 54 of file comparisons.h.
typedef boost::shared_ptr<PolygonComparison<PointT> > fawkes::pcl_utils::PolygonComparison::Ptr |
Shared pointer.
Definition at line 52 of file comparisons.h.
fawkes::pcl_utils::PolygonComparison::PolygonComparison | ( | const pcl::PointCloud< PointT > & | polygon, |
bool | inside = true |
||
) | [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.
virtual fawkes::pcl_utils::PolygonComparison::~PolygonComparison | ( | ) | [inline, virtual] |
Virtual empty destructor.
Definition at line 66 of file comparisons.h.
virtual bool fawkes::pcl_utils::PolygonComparison::evaluate | ( | const PointT & | point | ) | const [inline, virtual] |
Evaluate for given pixel.
point | point to compare |
Definition at line 73 of file comparisons.h.
bool fawkes::pcl_utils::PolygonComparison::inside_ [protected] |
Flag to determine whether to do inside or outside check.
Definition at line 83 of file comparisons.h.
const pcl::PointCloud<PointT>& fawkes::pcl_utils::PolygonComparison::polygon_ [protected] |
The polygon to check against.
Definition at line 85 of file comparisons.h.