43 #include <pcl/ModelCoefficients.h>
45 #include <pcl/point_cloud.h>
51 template <
typename Po
intT>
54 using Ptr = shared_ptr<PlanarPolygon<PointT>>;
55 using ConstPtr = shared_ptr<const PlanarPolygon<PointT>>;
65 Eigen::Vector4f& coefficients)
110 for (
int i = 0; i < 4; i++)
122 const Eigen::Vector4f&
PlanarPolygon represents a planar (2D) polygon, potentially in a 3D space.
void setCoefficients(const Eigen::Vector4f &coefficients)
Setr the internal coefficients.
shared_ptr< const PlanarPolygon< PointT > > ConstPtr
Eigen::Vector4f & getCoefficients()
Getter for the coefficients.
const pcl::PointCloud< PointT >::VectorType & getContour() const
Getter for the contour / boundary.
PlanarPolygon(typename pcl::PointCloud< PointT >::VectorType &contour, Eigen::Vector4f &coefficients)
Constructor for PlanarPolygon.
Eigen::Vector4f coefficients_
A list of model coefficients (a,b,c,d).
PlanarPolygon()
Empty constructor for PlanarPolygon.
pcl::PointCloud< PointT >::VectorType contour_
A list of points on the boundary/contour of the planar region.
pcl::PointCloud< PointT >::VectorType & getContour()
Getter for the contour / boundary.
virtual ~PlanarPolygon()=default
Destructor.
void setContour(const pcl::PointCloud< PointT > &contour)
Set the internal contour.
const Eigen::Vector4f & getCoefficients() const
Getter for the coefficients.
shared_ptr< PlanarPolygon< PointT > > Ptr
void setCoefficients(const pcl::ModelCoefficients &coefficients)
Set the internal coefficients.
PointCloud represents the base class in PCL for storing collections of 3D points.
std::vector< PointT, Eigen::aligned_allocator< PointT > > VectorType
std::vector< PointT, Eigen::aligned_allocator< PointT > > points
The point data.
#define PCL_MAKE_ALIGNED_OPERATOR_NEW
Macro to signal a class requires a custom allocator.
Defines functions, macros and traits for allocating and using memory.
Defines all the PCL and non-PCL macros used.
std::vector< float > values