CGAL::Parameterization_mesh_patch_3<ParameterizationPatchableMesh_3>

Definition

Parameterization_mesh_patch_3 is a Decorator class to virtually cut a patch in a ParameterizationPatchableMesh_3 3D surface. Only the patch is exported, making the 3D surface look like a topological disk.

The input mesh can be of any genus, but it has to come with a seam that describes the border of a topological disc. This border may be an actual border of the mesh or a virtual border.

#include <CGAL/Parameterization_mesh_patch_3.h>

Is Model for the Concepts

Model of ParameterizationMesh_3 concept, whose purpose is to allow the Surface_mesh_parameterization package to access meshes in a uniform manner.

Design Pattern

Parameterization_mesh_patch_3 is a Decorator [GHJV95]: it changes the behavior of a ParameterizationPatchableMesh_3 3D surface while keeping its ParameterizationMesh_3 interface.

Parameters

The full template declaration is:

template<class ParameterizationPatchableMesh_3>
class Parameterization_mesh_patch_3;

Parameters


ParameterizationPatchableMesh_3: 3D surface mesh.

Types

The following mutable handles, iterators, and circulators have appropriate non-mutable counterparts, i.e. const_handle, const_iterator, and const_circulator. The mutable types are assignable to their non-mutable counterparts. Both circulators are assignable to the Vertex_iterator. The iterators are assignable to the respective handle types. Wherever the handles appear in function parameter lists, the corresponding iterators can be used as well.

Parameterization_mesh_patch_3<ParameterizationPatchableMesh_3>::Adaptor
Export template parameter.

Types implementing the ParameterizationMesh_3 interface

Parameterization_mesh_patch_3<ParameterizationPatchableMesh_3>::NT
Number type to represent coordinates.

Parameterization_mesh_patch_3<ParameterizationPatchableMesh_3>::Point_2
2D point that represents (u, v) coordinates computed by parameterization methods. Must provide X() and Y() methods.

Parameterization_mesh_patch_3<ParameterizationPatchableMesh_3>::Point_3
3D point that represents vertices coordinates. Must provide X() and Y() methods.

Parameterization_mesh_patch_3<ParameterizationPatchableMesh_3>::Vector_2
2D vector. Must provide X() and Y() methods.

Parameterization_mesh_patch_3<ParameterizationPatchableMesh_3>::Vector_3
3D vector. Must provide X() and Y() methods.

Parameterization_mesh_patch_3<ParameterizationPatchableMesh_3>::Facet
Opaque type representing a facet of the 3D mesh. No methods are expected.

Parameterization_mesh_patch_3<ParameterizationPatchableMesh_3>::Facet_handle
Handle to a facet. Model of the Handle concept.

Parameterization_mesh_patch_3<ParameterizationPatchableMesh_3>::Facet_const_handle
Parameterization_mesh_patch_3<ParameterizationPatchableMesh_3>::Facet_iterator
Iterator over all mesh facets. Model of the ForwardIterator concept.

Parameterization_mesh_patch_3<ParameterizationPatchableMesh_3>::Facet_const_iterator
Parameterization_mesh_patch_3<ParameterizationPatchableMesh_3>::Vertex
Opaque type representing a vertex of the 3D mesh. No methods are expected.

Parameterization_mesh_patch_3<ParameterizationPatchableMesh_3>::Vertex_handle
Handle to a vertex. Model of the Handle concept.

Parameterization_mesh_patch_3<ParameterizationPatchableMesh_3>::Vertex_const_handle
Parameterization_mesh_patch_3<ParameterizationPatchableMesh_3>::Vertex_iterator
Iterator over all vertices of a mesh. Model of the ForwardIterator concept.

Parameterization_mesh_patch_3<ParameterizationPatchableMesh_3>::Vertex_const_iterator
Parameterization_mesh_patch_3<ParameterizationPatchableMesh_3>::Border_vertex_iterator
Iterator over vertices of the mesh main border. Model of the ForwardIterator concept.

Parameterization_mesh_patch_3<ParameterizationPatchableMesh_3>::Border_vertex_const_iterator
Parameterization_mesh_patch_3<ParameterizationPatchableMesh_3>::Vertex_around_facet_circulator
Counter-clockwise circulator over a facet's vertices. Model of the BidirectionalCirculator concept.

Parameterization_mesh_patch_3<ParameterizationPatchableMesh_3>::Vertex_around_facet_const_circulator
Parameterization_mesh_patch_3<ParameterizationPatchableMesh_3>::Vertex_around_vertex_circulator
Clockwise circulator over the vertices incident to a vertex. Model of the BidirectionalCirculator concept.

Parameterization_mesh_patch_3<ParameterizationPatchableMesh_3>::Vertex_around_vertex_const_circulator

Variables

Adaptor& m_mesh_adaptor; The decorated mesh.

Creation

template<class InputIterator>
Parameterization_mesh_patch_3<ParameterizationPatchableMesh_3> mesh ( Adaptor& mesh,
InputIterator first_seam_vertex,
InputIterator end_seam_vertex);
Create a Decorator for an existing ParameterizationPatchableMesh_3 mesh. The input mesh can be of any genus, but it has to come with a seam that describes the border of a topological disc. This border may be an actual border of the mesh or a virtual border.
Preconditions: 
first_seam_vertex -> end_seam_vertex defines the outer seam, i.e. Parameterization_mesh_patch_3 will export the right of the seam. The seam is given as a container of Adaptor::Vertex_handle elements. The seam is implicitely a loop. The first vertex should not be duplicated at the end.

Operations

The following methods returning a mutable handle, iterator, or circulator have appropriate non-mutable counterpart methods, i.e. const, returning a const_handle, const_iterator, or const_circulator.

Adaptor& mesh.get_decorated_mesh ()
Returns:  the decorated mesh.
Adaptor mesh.get_decorated_mesh ()

Methods implementing the ParameterizationMesh_3 interface

bool mesh.is_valid () Indicate if the mesh matches the ParameterizationMesh_3 concept.
Vertex_iterator mesh.mesh_vertices_begin () Get iterator over first vertex of mesh.
Vertex_const_iterator mesh.mesh_vertices_begin ()
Vertex_iterator mesh.mesh_vertices_end () Get iterator over past-the-end vertex of mesh.
Vertex_const_iterator mesh.mesh_vertices_end ()
int mesh.count_mesh_vertices () Count the number of vertices of the mesh.
void mesh.index_mesh_vertices () Index vertices of the mesh from 0 to count_mesh_vertices()-1.
Border_vertex_iterator mesh.mesh_main_border_vertices_begin ()
Get iterator over first vertex of mesh's main border (aka seam).
Border_vertex_const_iterator mesh.mesh_main_border_vertices_begin ()
Border_vertex_iterator mesh.mesh_main_border_vertices_end ()
Get iterator over past-the-end vertex of mesh's main border (aka seam).
Border_vertex_const_iterator mesh.mesh_main_border_vertices_end ()
std::list<Vertex_handle> mesh.get_border ( Vertex_handle seed_vertex)
Returns:  the border containing seed_vertex (or an empty list if not found).
Parameters: 
seed_vertex: a border vertex.
Facet_iterator mesh.mesh_facets_begin () Get iterator over first facet of mesh.
Facet_const_iterator mesh.mesh_facets_begin ()
Facet_iterator mesh.mesh_facets_end () Get iterator over past-the-end facet of mesh.
Facet_const_iterator mesh.mesh_facets_end ()
int mesh.count_mesh_facets () Count the number of facets of the mesh.
bool mesh.is_mesh_triangular () Return true of all mesh's facets are triangles.
int mesh.count_mesh_halfedges () Count the number of halfedges of the mesh.
Vertex_around_facet_circulator mesh.facet_vertices_begin ( Facet_handle facet)
Get circulator over facet's vertices.
Vertex_around_facet_const_circulator
mesh.facet_vertices_begin ( Facet_const_handle facet)
int mesh.count_facet_vertices ( Facet_const_handle facet)
Count the number of vertices of a facet.
Point_3 mesh.get_vertex_position ( Vertex_const_handle vertex)
Get the 3D position of a vertex.
Point_2 mesh.get_vertex_uv ( Vertex_const_handle vertex)
Get/set the 2D position (u/v pair) of a vertex. Default value is undefined.
void mesh.set_vertex_uv ( Vertex_handle vertex, Point_2 uv)
bool mesh.is_vertex_parameterized ( Vertex_const_handle vertex)
Get/set is parameterized field of vertex. Default value is undefined.
void mesh.set_vertex_parameterized ( Vertex_handle vertex, bool parameterized)
int mesh.get_vertex_index ( Vertex_const_handle vertex)
Get/set vertex index. Default value is undefined.
void mesh.set_vertex_index ( Vertex_handle vertex, int index)
int mesh.get_vertex_tag ( Vertex_const_handle vertex)
Get/set vertex' all purpose tag. Default value is undefined.
void mesh.set_vertex_tag ( Vertex_handle vertex, int tag)
bool mesh.is_vertex_on_border ( Vertex_const_handle vertex)
Return true if a vertex belongs to ANY mesh's border.
bool mesh.is_vertex_on_main_border ( Vertex_const_handle vertex)
Return true if a vertex belongs to the UNIQUE mesh's main border set by the constructor.
Vertex_around_vertex_circulator
mesh.vertices_around_vertex_begin ( Vertex_handle vertex,
Vertex_handle start_position = Vertex_handle())
Get circulator over the vertices incident to vertex. start_position defines the optional initial position of the circulator.
Vertex_around_vertex_const_circulator
mesh.vertices_around_vertex_begin ( Vertex_const_handle vertex,
Vertex_const_handle start_position = Vertex_const_handle())

See Also

CGAL::Parameterization_polyhedron_adaptor_3<Polyhedron_3_>

Example

See Mesh_cutting_parameterization.cpp example.