6#include <CGAL/Simple_cartesian.h>
7#include <CGAL/Surface_mesh.h>
9#include <pcl/PolygonMesh.h>
14using K = CGAL::Simple_cartesian<double>;
23using Mesh = CGAL::Surface_mesh<Point_3>;
39 return Point_3(v.x(), v.y(), v.z());
46 return Eigen::Vector3d(CGAL::to_double(p.x()),
47 CGAL::to_double(p.y()),
48 CGAL::to_double(p.z()));
55 return Eigen::Vector3d(CGAL::to_double(v.x()),
56 CGAL::to_double(v.y()),
57 CGAL::to_double(v.z()));
62std::vector<pcl::PolygonMeshPtr>
CGAL::Surface_mesh< Point_3 > Mesh
CGAL surface mesh type.
K::Vector_3 Vector_3
CGAL 3D vector type.
pcl::PolygonMesh cgal_to_pcl_mesh(const Mesh &cgal_mesh)
Convert CGAL Surface_mesh to PCL PolygonMesh.
Point_3 eigen_to_cgal(const Eigen::Vector3d &v)
Convert Eigen Vector3d to CGAL Point_3.
Eigen::Vector3d cgal_to_eigen(const Point_3 &p)
Convert CGAL Point_3 to Eigen Vector3d.
CGAL::Simple_cartesian< double > K
CGAL kernel for geometric computations.
K::Point_3 Point_3
CGAL 3D point type.
Mesh pcl_to_cgal_mesh(const pcl::PolygonMesh &pcl_mesh)
Convert PCL PolygonMesh to CGAL Surface_mesh.
std::vector< pcl::PolygonMeshPtr > decompose_mesh(const pcl::PolygonMesh &mesh)
Split a mesh into its connected components.
pcl::PolygonMeshPtr mesh(CloudConstPtr cloud, CloudNConstPtr normals, EigenVectorContainer< double, 4 > &planes, EigenVectorContainer< double, 3 > ¢roids, std::vector< IndicesPtr > &inliers, CloudLConstPtr rooms, MeshOptions const opt=MeshOptions{})
Generate a mesh from point cloud and geometric primitives.