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>;
71 initCompute ()
override;
90 area (
const std::vector<std::uint32_t>& vertices);
99 isEar (
int u,
int v,
int w,
const std::vector<std::uint32_t>& vertices);
108 isInsideTriangle (
const Eigen::Vector3f& u,
109 const Eigen::Vector3f& v,
110 const Eigen::Vector3f& w,
111 const Eigen::Vector3f& p);
118 crossProduct (
const Eigen::Vector2f& p1,
const Eigen::Vector2f& p2)
const
120 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.
MeshProcessing represents the base class for mesh processing algorithms.
shared_ptr< EarClipping > Ptr
EarClipping()
Empty constructor.
Describes a set of vertices in a polygon mesh, by basically storing an array of indices.
shared_ptr< PointCloud< PointT > > Ptr
pcl::PolygonMeshConstPtr input_mesh_
Input polygonal mesh.
virtual bool initCompute()
Initialize computation.
The ear clipping triangulation algorithm.
shared_ptr< const EarClipping > ConstPtr