ReUseX  0.0.5
3D Point Cloud Processing for Building Reuse
Loading...
Searching...
No Matches
reusex::geometry::cgal Namespace Reference

Typedefs

using K = CGAL::Simple_cartesian<double>
 CGAL kernel for geometric computations.
using Point_3 = K::Point_3
 CGAL 3D point type.
using Vector_3 = K::Vector_3
 CGAL 3D vector type.
using Mesh = CGAL::Surface_mesh<Point_3>
 CGAL surface mesh type.

Functions

Mesh pcl_to_cgal_mesh (const pcl::PolygonMesh &pcl_mesh)
 Convert PCL PolygonMesh to CGAL Surface_mesh.
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.
Eigen::Vector3d cgal_to_eigen (const Vector_3 &v)
 Convert CGAL Vector_3 to Eigen Vector3d.
std::vector< pcl::PolygonMeshPtr > decompose_mesh (const pcl::PolygonMesh &mesh)
 Split a mesh into its connected components.

Typedef Documentation

◆ K

using reusex::geometry::cgal::K = CGAL::Simple_cartesian<double>

CGAL kernel for geometric computations.

Definition at line 14 of file cgal_utils.hpp.

◆ Mesh

using reusex::geometry::cgal::Mesh = CGAL::Surface_mesh<Point_3>

CGAL surface mesh type.

Definition at line 23 of file cgal_utils.hpp.

◆ Point_3

using reusex::geometry::cgal::Point_3 = K::Point_3

CGAL 3D point type.

Definition at line 17 of file cgal_utils.hpp.

◆ Vector_3

using reusex::geometry::cgal::Vector_3 = K::Vector_3

CGAL 3D vector type.

Definition at line 20 of file cgal_utils.hpp.

Function Documentation

◆ cgal_to_eigen() [1/2]

Eigen::Vector3d reusex::geometry::cgal::cgal_to_eigen ( const Point_3 & p)
inline

Convert CGAL Point_3 to Eigen Vector3d.

Parameters
pInput CGAL point
Returns
Eigen vector with same coordinates

Definition at line 45 of file cgal_utils.hpp.

◆ cgal_to_eigen() [2/2]

Eigen::Vector3d reusex::geometry::cgal::cgal_to_eigen ( const Vector_3 & v)
inline

Convert CGAL Vector_3 to Eigen Vector3d.

Parameters
vInput CGAL vector
Returns
Eigen vector with same coordinates

Definition at line 54 of file cgal_utils.hpp.

◆ cgal_to_pcl_mesh()

pcl::PolygonMesh reusex::geometry::cgal::cgal_to_pcl_mesh ( const Mesh & cgal_mesh)

Convert CGAL Surface_mesh to PCL PolygonMesh.

Parameters
cgal_meshInput CGAL mesh
Returns
PCL mesh with PointXYZ vertices

◆ decompose_mesh()

std::vector< pcl::PolygonMeshPtr > reusex::geometry::cgal::decompose_mesh ( const pcl::PolygonMesh & mesh)

Split a mesh into its connected components.

Returns one PolygonMesh per disjoint piece, preserving vertex colors.

References reusex::geometry::mesh().

◆ eigen_to_cgal()

Point_3 reusex::geometry::cgal::eigen_to_cgal ( const Eigen::Vector3d & v)
inline

Convert Eigen Vector3d to CGAL Point_3.

Parameters
vInput Eigen vector
Returns
CGAL point with same coordinates

Definition at line 38 of file cgal_utils.hpp.

◆ pcl_to_cgal_mesh()

Mesh reusex::geometry::cgal::pcl_to_cgal_mesh ( const pcl::PolygonMesh & pcl_mesh)

Convert PCL PolygonMesh to CGAL Surface_mesh.

Parameters
pcl_meshInput PCL mesh with PointXYZ vertices
Returns
CGAL Surface_mesh with equivalent topology