40 #include <pcl/point_types.h>
41 #include <pcl/surface/processing.h>
55 using Ptr = shared_ptr<EarClipping>;
56 using ConstPtr = shared_ptr<const EarClipping>;
69 initCompute ()
override;
97 isEar (
int u,
int v,
int w,
const Indices& vertices);
106 isInsideTriangle (
const Eigen::Vector3f& u,
107 const Eigen::Vector3f& v,
108 const Eigen::Vector3f& w,
109 const Eigen::Vector3f& p);
116 crossProduct (
const Eigen::Vector2f& p1,
const Eigen::Vector2f& p2)
const
118 return p1[0]*p2[1] - p1[1]*p2[0];
float crossProduct(const Eigen::Vector2f &p1, const Eigen::Vector2f &p2) const
Compute the cross product between 2D vectors.
shared_ptr< PointCloud< PointT > > Ptr
MeshProcessing represents the base class for mesh processing algorithms.
shared_ptr< EarClipping > Ptr
Describes a set of vertices in a polygon mesh, by basically storing an array of indices.
pcl::PointCloud< pcl::PointXYZ >::Ptr points_
a Pointer to the point cloud data.
IndicesAllocator<> Indices
Type used for indices in PCL.
pcl::PolygonMeshConstPtr input_mesh_
Input polygonal mesh.
virtual bool initCompute()
Initialize computation.
The ear clipping triangulation algorithm.
shared_ptr< const EarClipping > ConstPtr