CGAL::Parameterization_polyhedron_adaptor_3<Polyhedron_3_>

Definition

Parameterization_polyhedron_adaptor_3 is an adaptor class to access to a Polyhedron 3D mesh using the ParameterizationPatchableMesh_3 interface. Among other things, this concept defines the accessor to the (u,v) values computed by parameterizations methods.

Note that these interfaces are decorators that add on the fly the necessary fields to unmodified CGAL data structures (using STL maps). For performance reasons, it is recommended to use CGAL data structures enriched with the proper fields.

A ParameterizationMesh_3 surface consists of vertices, facets and an incidence relation on them. No notion of edge is requested.

ParameterizationMesh_3 meshes can have any genus, arity or number of components.

It can have have any number of borders. Its main border will be the mesh's longest border (if there is at least one border).

It has also the ability to support patches and virtual seams. Patches are a subset of a 3D mesh. Virtual seams are the ability to behave exactly as if the surface was cut following a certain path.

#include <CGAL/Parameterization_polyhedron_adaptor_3.h>

Is Model for the Concepts

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

Design Pattern

Parameterization_polyhedron_adaptor_3 is an Adaptor [GHJV95]: it changes the Polyhedron interface to match the ParameterizationPatchableMesh_3 concept.

Parameters

The full template declaration is:

template<
class Polyhedron_3_>
class Parameterization_polyhedron_adaptor_3;

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_polyhedron_adaptor_3<Polyhedron_3_>::Polyhedron
Export template parameter.

Parameterization_polyhedron_adaptor_3<Polyhedron_3_>::NT
Number type to represent coordinates.

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

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

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

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

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

Parameterization_polyhedron_adaptor_3<Polyhedron_3_>::Facet_handle
Handle to a facet. Model of the Handle concept.

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

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

Parameterization_polyhedron_adaptor_3<Polyhedron_3_>::Vertex_handle
Handle to a vertex. Model of the Handle concept.

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

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

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

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

Parameterization_polyhedron_adaptor_3<Polyhedron_3_>::Vertex_around_vertex_const_circulator

Creation

Parameterization_polyhedron_adaptor_3<Polyhedron_3_> mesh ( Polyhedron& mesh);
Create an adaptator for an existing Polyhedron_3 mesh. The input mesh can be of any genus. It can have have any number of borders. Its main border will be the mesh's longest border (if there is at least one border).

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.

Polyhedron& mesh.get_adapted_mesh () Get the adapted mesh.
Polyhedron mesh.get_adapted_mesh ()
Polyhedron::Halfedge_const_handle mesh.get_halfedge ( Vertex_const_handle source, Vertex_const_handle target)
Get halfedge from source and target vertices. Will assert if such an halfedge doesn't exist.
Polyhedron::Halfedge_handle mesh.get_halfedge ( Vertex_handle source, Vertex_handle target)
const Halfedge_info* mesh.info ( Halfedge_const_handle halfedge)
Access to additional info attached to halfedges.
Halfedge_info* mesh.info ( Halfedge_const_handle halfedge)
const Vertex_info* mesh.info ( Vertex_const_handle vertex)
Access to additional info attached to vertices.
Vertex_info* mesh.info ( Vertex_const_handle vertex)
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 ()
Border_vertex_iterator mesh.mesh_main_border_vertices_begin ()
Get iterator over first vertex of mesh's main border.
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.
Border_vertex_const_iterator mesh.mesh_main_border_vertices_end ()
std::list<Vertex_handle> mesh.get_border ( Vertex_handle seed_vertex)
Return the border containing seed_vertex. Return an empty list if not found.
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. (stored in halfedges sharing the same vertex).
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. (stored in halfedges sharing the same vertex).
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. (stored in Polyhedron vertex for debugging purpose).
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. (stored in halfedges sharing the same vertex).
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, i.e. the mesh's LONGEST border.
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())
int mesh.get_vertex_seaming ( Vertex_const_handle vertex)
Get/set vertex seaming flag. Default value is undefined.
void mesh.set_vertex_seaming ( Vertex_handle vertex, int seaming)
int mesh.get_halfedge_seaming ( Vertex_const_handle source, Vertex_const_handle target)
Get/set oriented edge's seaming flag, i.e. position of the oriented edge w.r.t. to the UNIQUE main border.
void mesh.set_halfedge_seaming ( Vertex_handle source, Vertex_handle target, int seaming)
Point_2
mesh.get_corners_uv ( Vertex_const_handle vertex,
Vertex_const_handle prev_vertex,
Vertex_const_handle next_vertex)
Get/set the 2D position (= (u,v) pair) of corners at the right of the prev_vertex -> vertex -> next_vertex line. Default value is undefined. (stored in incident halfedges).
void
mesh.set_corners_uv ( Vertex_handle vertex,
Vertex_const_handle prev_vertex,
Vertex_const_handle next_vertex,
Point_2 uv)
bool
mesh.are_corners_parameterized ( Vertex_const_handle vertex,
Vertex_const_handle prev_vertex,
Vertex_const_handle next_vertex)
Get/set is parameterized field of corners at the right of the prev_vertex -> vertex -> next_vertex line. Default value is undefined. (stored in incident halfedges).
void
mesh.set_corners_parameterized ( Vertex_handle vertex,
Vertex_const_handle prev_vertex,
Vertex_const_handle next_vertex,
bool parameterized)
int
mesh.get_corners_index ( Vertex_const_handle vertex,
Vertex_const_handle prev_vertex,
Vertex_const_handle next_vertex)
Get/set index of corners at the right of the prev_vertex -> vertex -> next_vertex line. Default value is undefined. (stored in incident halfedges).
void
mesh.set_corners_index ( Vertex_handle vertex,
Vertex_const_handle prev_vertex,
Vertex_const_handle next_vertex,
int index)
int
mesh.get_corners_tag ( Vertex_const_handle vertex,
Vertex_const_handle prev_vertex,
Vertex_const_handle next_vertex)
Get/set all purpose tag of corners at the right of the prev_vertex -> vertex -> next_vertex line. Default value is undefined. (stored in incident halfedges).
void
mesh.set_corners_tag ( Vertex_handle vertex,
Vertex_const_handle prev_vertex,
Vertex_const_handle next_vertex,
int tag)

See Also

CGAL::Parameterization_mesh_patch_3<ParameterizationPatchableMesh_3>

Example

See Simple_parameterization.cpp example.