Point Cloud Library (PCL)
1.11.0
|
41 #include <pcl/surface/processing.h>
55 using Ptr = shared_ptr<EarClipping>;
56 using ConstPtr = shared_ptr<const EarClipping>;
90 area (
const std::vector<std::uint32_t>& vertices);
99 isEar (
int u,
int v,
int w,
const std::vector<std::uint32_t>& vertices);
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];
shared_ptr< const EarClipping > ConstPtr
bool isInsideTriangle(const Eigen::Vector3f &u, const Eigen::Vector3f &v, const Eigen::Vector3f &w, const Eigen::Vector3f &p)
Check if p is inside the triangle (u,v,w).
The ear clipping triangulation algorithm.
shared_ptr< EarClipping > Ptr
void performProcessing(pcl::PolygonMesh &output) override
The actual surface reconstruction method.
EarClipping()
Empty constructor.
float crossProduct(const Eigen::Vector2f &p1, const Eigen::Vector2f &p2) const
Compute the cross product between 2D vectors.
void triangulate(const Vertices &vertices, PolygonMesh &output)
Triangulate one polygon.
float area(const std::vector< std::uint32_t > &vertices)
Compute the signed area of a polygon.
pcl::PointCloud< pcl::PointXYZ >::Ptr points_
a Pointer to the point cloud data.
pcl::PolygonMeshConstPtr input_mesh_
Input polygonal mesh.
shared_ptr< PointCloud< PointT > > Ptr
bool isEar(int u, int v, int w, const std::vector< std::uint32_t > &vertices)
Check if the triangle (u,v,w) is an ear.
Describes a set of vertices in a polygon mesh, by basically storing an array of indices.
virtual bool initCompute()
Initialize computation.
MeshProcessing represents the base class for mesh processing algorithms.
bool initCompute() override
This method should get called before starting the actual computation.