CGAL 5.5.2 - Planar Parameterization of Triangulated Surface Meshes
CGAL::Surface_mesh_parameterization::Square_border_parameterizer_3< TriangleMesh_ > Class Template Referenceabstract

#include <CGAL/Surface_mesh_parameterization/Square_border_parameterizer_3.h>

Inherited by CGAL::Surface_mesh_parameterization::Square_border_arc_length_parameterizer_3< TriangleMesh_ >, and CGAL::Surface_mesh_parameterization::Square_border_uniform_parameterizer_3< TriangleMesh_ >.

Definition

This is the base class of strategies that parameterize the border of a 3D surface onto a square.

Square_border_parameterizer_3 is a pure virtual class, thus cannot be instantiated. It implements most of the algorithm. Subclasses only have to implement the function compute_edge_length() to compute a segment's length.

The user can provide four vertices on the border of the mesh, which will be mapped to the four corners of the square.

Attention
The square border parameterizer may create degenerate faces in the parameterization: if an input border vertex has valence 1 and if it is mapped to the same edge of the square as its two adjacent (border) vertices, for example.

Implementation note: To simplify the implementation, the border parameterizer knows only the TriangleMesh class and does not know the parameterization algorithm requirements or the kind of sparse linear system used.

Is Model Of:
Parameterizer_3
Template Parameters
TriangleMesh_must be a model of FaceGraph.
See also
CGAL::Surface_mesh_parameterization::Square_border_uniform_parameterizer_3<TriangleMesh>
CGAL::Surface_mesh_parameterization::Square_border_arc_length_parameterizer_3<TriangleMesh>

Public Types

typedef TriangleMesh_ Triangle_mesh
 Triangle mesh type.
 
typedef boost::graph_traits< Triangle_mesh >::vertex_descriptor vertex_descriptor
 Mesh vertex type.
 
typedef boost::graph_traits< Triangle_mesh >::halfedge_descriptor halfedge_descriptor
 Mesh halfedge type.
 

Public Member Functions

template<typename VertexUVMap , typename VertexIndexMap , typename VertexParameterizedMap >
Error_code parameterize (const Triangle_mesh &mesh, halfedge_descriptor bhd, VertexUVMap uvmap, VertexIndexMap, VertexParameterizedMap vpmap)
 assigns to the vertices of the border of the mesh a 2D position (i.e. a (u,v) pair) on the border's shape. More...
 
bool is_border_convex () const
 indicates if the border's shape is convex.
 
 Square_border_parameterizer_3 ()
 Constructor.
 
 Square_border_parameterizer_3 (vertex_descriptor v0, vertex_descriptor v1, vertex_descriptor v2, vertex_descriptor v3)
 Constructor with user-defined corners: the user provides four vertices of the border of the mesh, which will be parameterized to the corners of the square. More...
 

Constructor & Destructor Documentation

◆ Square_border_parameterizer_3()

Constructor with user-defined corners: the user provides four vertices of the border of the mesh, which will be parameterized to the corners of the square.

Precondition
The given vertices must be on the border.

Member Function Documentation

◆ parameterize()

template<class TriangleMesh_ >
template<typename VertexUVMap , typename VertexIndexMap , typename VertexParameterizedMap >
Error_code CGAL::Surface_mesh_parameterization::Square_border_parameterizer_3< TriangleMesh_ >::parameterize ( const Triangle_mesh mesh,
halfedge_descriptor  bhd,
VertexUVMap  uvmap,
VertexIndexMap  ,
VertexParameterizedMap  vpmap 
)

assigns to the vertices of the border of the mesh a 2D position (i.e. a (u,v) pair) on the border's shape.

Mark them as parameterized.

Template Parameters
VertexUVmapmust be a model of ReadWritePropertyMap with boost::graph_traits<Triangle_mesh>::vertex_descriptor as key type and Point_2 (type deduced from Triangle_mesh using Kernel_traits) as value type.
VertexIndexMapmust be a model of ReadablePropertyMap with boost::graph_traits<Triangle_mesh>::vertex_descriptor as key type and a unique integer as value type.
VertexParameterizedMapmust be a model of ReadWritePropertyMap with boost::graph_traits<Triangle_mesh>::vertex_descriptor as key type and a Boolean as value type.
Parameters
mesha triangulated surface.
bhda halfedge descriptor on the boundary of mesh.
uvmapan instanciation of the class VertexUVmap.
vpmapan instanciation of the class VertexParameterizedMap.
Precondition
mesh must be a triangular mesh.
The vertices must be indexed (vimap must be initialized).