|
CGAL 6.1 - Dynamic Skeletonization Via Variational Medial Axis Sampling
|
#include <CGAL/variational_medial_axis_sampling.h>
Class representing the medial skeleton of a shape.
This class provides methods to manage and export the medial skeleton of a shape. It stores the medial spheres, edges, and faces of the skeleton.
| TriangleMesh | The type of the triangle mesh representing the shape. |
| GT | The geometric traits class used for geometric computations. Default: boost::property_traits<
boost::property_map<TriangleMesh, CGAL::vertex_point_t>::type
>::value_type
|
Public Member Functions | |
| bool | load_skeleton_from_ply (std::string &filepath) |
| loads a medial skeleton from a PLY file. | |
Accessor methods | |
| const std::vector< Sphere_3 > & | vertices () const |
returns the container of vertices, where each vertex is a medial sphere (Sphere_3). | |
| const std::vector< std::pair< std::size_t, std::size_t > > & | edges () const |
| returns the container of edges, where each edge is represented as a pair of indices in the vertices vector. | |
| const std::vector< std::array< std::size_t, 3 > > & | faces () const |
| returns the container of faces, where each face is represented as an array of three indices in the vertices vector. | |
| std::size_t | number_of_vertices () const |
| returns the number of vertices in the medial skeleton. | |
| std::size_t | number_of_edges () const |
| returns the number of edges in the medial skeleton. | |
| std::size_t | number_of_faces () const |
| returns the number of faces in the medial skeleton. | |
| void | clear () |
| clears the data for the medial skeleton. | |
| void | set_data (std::vector< Sphere_3 > &&vertices, std::vector< std::pair< std::size_t, std::size_t > > &&edges, std::vector< std::array< std::size_t, 3 > > &&faces) |
| sets the data for the medial skeleton. | |
| bool CGAL::Medial_Skeleton< TriangleMesh_, GeomTraits_ >::load_skeleton_from_ply | ( | std::string & | filepath | ) |
loads a medial skeleton from a PLY file.
| filepath | Filepath to the PLY file containing the medial skeleton data. |
Note: The file format is :
| void CGAL::Medial_Skeleton< TriangleMesh_, GeomTraits_ >::set_data | ( | std::vector< Sphere_3 > && | vertices, |
| std::vector< std::pair< std::size_t, std::size_t > > && | edges, | ||
| std::vector< std::array< std::size_t, 3 > > && | faces | ||
| ) |
sets the data for the medial skeleton.
| vertices | A list of Sphere_3 representing the vertices (medial spheres). |
| edges | A list of pairs representing the edges, where each pair contains indices of vertices. |
| faces | A list of arrays representing the faces, where each array contains three indices of vertices. |