CGAL 6.0.1 - CGAL and the Boost Graph Library
|
#include <CGAL/boost/graph/Seam_mesh.h>
This class is a data structure that takes a triangle mesh, further referred to as underlying mesh
and turns some marked edges of that mesh into virtual boundary edges.
Note that a seam edge must be an edge of the underlying mesh that is not a border edge (that is, such that either halfedge or the edge have null_face() as incident face). Marking a border edge as seam will not do anything.
FaceGraph
or FaceListGraph
depending on the underlying mesh TM
.TM | a model of FaceGraph or FaceListGraph |
SEM | a model of ReadablePropertyMap with boost::graph_traits<TM>::edge_descriptor as key type and bool as value type. |
SVM | a model of ReadablePropertyMap with boost::graph_traits<TM>::vertex_descriptor as key type and bool as value type. |
Classes | |
class | edge_descriptor |
This class represents an edge of the seam mesh. More... | |
class | halfedge_descriptor |
This class represents a halfedge of the seam mesh. More... | |
class | vertex_descriptor |
This class represents a vertex of the seam mesh. More... | |
Public Types | |
typedef TM | Triangle_mesh |
The underlying mesh type. | |
typedef boost::graph_traits< TM >::face_descriptor | face_descriptor |
This class represents a face of the seam mesh. | |
Public Member Functions | |
const TM & | mesh () const |
returns the underlying mesh. | |
Seam_mesh (const TM &tm, const SEM &sem, const SVM svm) | |
constructs a seam mesh for a triangle mesh and an edge and vertex property map | |
Seam query functions | |
bool | has_on_seam (TM_vertex_descriptor vd) const |
returns true if the vertex is on the seam. | |
bool | has_on_seam (TM_edge_descriptor ed) const |
returns true if the edge is on the seam. | |
bool | has_on_seam (TM_halfedge_descriptor tmhd) const |
returns true if the halfedge is on the seam. | |
bool | has_on_seam (const halfedge_descriptor &hd) const |
returns true if the halfedge is on the seam. | |
edges_size_type | number_of_seam_edges () const |
returns the number of seam edges in the seam mesh. | |
Range Types | |
Iterator_range< vertex_iterator > | vertices () const |
returns the iterator range of the vertices of the mesh. | |
Iterator_range< halfedge_iterator > | halfedges () const |
returns the iterator range of the halfedges of the mesh. | |
Iterator_range< edge_iterator > | edges () const |
returns the iterator range of the edges of the mesh. | |
Iterator_range< face_iterator > | faces () const |
returns the iterator range of the faces of the mesh. | |
Memory Management | |
vertices_size_type | num_vertices () const |
returns the number of vertices in the seam mesh. | |
halfedges_size_type | num_halfedges () const |
returns the number of halfedges in the seam mesh. | |
halfedges_size_type | num_edges () const |
returns the number of edges in the seam mesh. | |
faces_size_type | num_faces () const |
returns the number of faces in the seam mesh. | |
Degree Functions | |
degree_size_type | degree (vertex_descriptor v) const |
returns the number of incident halfedges of vertex v . | |
Seam selection | |
bool | add_seam (TM_vertex_descriptor tm_vd_s, TM_vertex_descriptor tm_vd_t) |
marks the edge of the underlying mesh that has extremities the vertices tm_vd_s and tm_vd_s as a seam edge. | |
template<class InputIterator > | |
TM_halfedge_descriptor | add_seams (InputIterator first, InputIterator last) |
creates new seams. | |
template<typename VdContainer > | |
TM_halfedge_descriptor | add_seams (std::ifstream &in, const VdContainer &tm_vds) |
creates new seams. | |
TM_halfedge_descriptor | add_seams (std::ifstream &in) |
creates new seams. | |
template<typename VdContainer > | |
TM_halfedge_descriptor | add_seams (const char *filename, const VdContainer &tm_vds) |
creates new seams. | |
TM_halfedge_descriptor | add_seams (const char *filename) |
creates new seams. | |
typedef boost::graph_traits<TM>::face_descriptor CGAL::Seam_mesh< TM, SEM, SVM >::face_descriptor |
This class represents a face of the seam mesh.
Descriptor
CGAL::Seam_mesh< TM, SEM, SVM >::Seam_mesh | ( | const TM & | tm, |
const SEM & | sem, | ||
const SVM | svm | ||
) |
constructs a seam mesh for a triangle mesh and an edge and vertex property map
tm | the underlying mesh |
sem | the edge property map with value true for seam edges |
svm | the vertex property map with value true for seam vertices |
bool CGAL::Seam_mesh< TM, SEM, SVM >::add_seam | ( | TM_vertex_descriptor | tm_vd_s, |
TM_vertex_descriptor | tm_vd_t | ||
) |
marks the edge of the underlying mesh that has extremities the vertices tm_vd_s
and tm_vd_s
as a seam edge.
tm_vd_s
and tm_vd_s
,tm_vd_s
and tm_vd_s
is a border edge, ortm_vd_s
and tm_vd_s
is already a seam edge. TM_halfedge_descriptor CGAL::Seam_mesh< TM, SEM, SVM >::add_seams | ( | const char * | filename | ) |
creates new seams.
A seam edge is described by a pair of integers. The integer index of a vertex of the underlying mesh is defined as its position when iterating over the vertices of the underlying mesh with boost::graph_traits<TM>::vertices()
.
TM_halfedge_descriptor CGAL::Seam_mesh< TM, SEM, SVM >::add_seams | ( | const char * | filename, |
const VdContainer & | tm_vds | ||
) |
creates new seams.
A seam edge is described by a pair of integers. The integer index of a vertex of the underlying mesh is given by its position in the container tm_vds
.
VdContainer | must be a model of SequenceContainer (that is, provide the functions: operator[] and at() ). |
TM_halfedge_descriptor CGAL::Seam_mesh< TM, SEM, SVM >::add_seams | ( | InputIterator | first, |
InputIterator | last | ||
) |
creates new seams.
The edges to be marked as seams are described by the range [first, last) of vertices of the underlying mesh. Each edge to be marked is described by two consecutive iterators.
InputIterator
. InputIterator
must be boost::graph_traits<TM>::vertex_descriptor
. TM_halfedge_descriptor CGAL::Seam_mesh< TM, SEM, SVM >::add_seams | ( | std::ifstream & | in | ) |
creates new seams.
A seam edge is described by a pair of integers. The integer index of a vertex of the underlying mesh is defined as its position when iterating over the vertices of the underlying mesh with boost::graph_traits<TM>::vertices()
.
TM_halfedge_descriptor CGAL::Seam_mesh< TM, SEM, SVM >::add_seams | ( | std::ifstream & | in, |
const VdContainer & | tm_vds | ||
) |
creates new seams.
A seam edge is described by a pair of integers. The integer index of a vertex of the underlying mesh is given by its position in the container tm_vds
.
VdContainer | must be a model of SequenceContainer (that is, provide the functions: operator[] and at() ). |