CGAL 6.1 - Dynamic Skeletonization Via Variational Medial Axis Sampling
Loading...
Searching...
No Matches
CGAL::Medial_skeleton< TriangleMesh, GeomTraits > Class Template Reference

#include <CGAL/Variational_medial_axis_sampling.h>

Definition

template<typename TriangleMesh, typename GeomTraits = Default>
class CGAL::Medial_skeleton< TriangleMesh, GeomTraits >

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.

Template Parameters
TriangleMeshThe type of the triangle mesh representing the shape.
GeomTraitsThe geometric traits class used for geometric computations.
Default:
boost::property_traits<
boost::property_map<TriangleMesh, CGAL::vertex_point_t>::type
>::value_type
Examples
Variational_medial_axis/vmas_free_function.cpp.

Public Member Functions

bool read_PLY (const std::string &filepath)
 

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.
 

Member Function Documentation

◆ set_data()

template<typename TriangleMesh , typename GeomTraits = Default>
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.

Parameters
verticesA list of Sphere_3 representing the vertices (medial spheres).
edgesA list of pairs representing the edges, where each pair contains indices of vertices.
facesA list of arrays representing the faces, where each array contains three indices of vertices.