CGAL::parameterize

Definition

CGAL::parameterize() is the main entry-point of the Surface_mesh_parameterization package.

It computes a one-to-one mapping from a 3D triangle surface 'mesh' to a simple 2D domain. The mapping is piecewise linear on the triangle mesh. The result is a pair (u,v) of parameter coordinates for each vertex of the input mesh. One-to-one mapping may be guaranteed or not, depending on the chosen ParametizerTraits algorithm.

The CGAL::parameterize() function exists in two flavors, to provide a default parameterization algorithm of Floater Mean Value Coordinates.

#include <CGAL/parameterize.h>

Parameterizer_traits_3<ParameterizationMesh_3>::Error_code
parameterize ( ParameterizationMesh_3& mesh)
Compute a one-to-one mapping from a 3D triangle surface mesh to a 2D circle, using Floater Mean Value Coordinates algorithm. A one-to-one mapping is guaranteed. The mapping is piecewise linear on the input mesh triangles. The result is a (u,v) pair of parameter coordinates for each vertex of the input mesh. Preconditions:
  • mesh must be a surface with one connected component.
  • mesh must be a triangular mesh.
Parameters:
mesh
3D mesh, model of ParameterizationMesh_3 concept
Parameterizer_traits_3<ParameterizationMesh_3>::Error_code
parameterize ( ParameterizationMesh_3& mesh, ParameterizerTraits_3 parameterizer)
Compute a one-to-one mapping from a 3D triangle surface mesh to a simple 2D domain. The mapping is piecewise linear on the triangle mesh. The result is a pair (u,v) of parameter coordinates for each vertex of the input mesh. One-to-one mapping may be guaranteed or not, depending on the chosen ParametizerTraits_3 algorithm. Preconditions:
  • mesh must be a surface with one connected component.
  • mesh must be a triangular mesh.
  • the mesh border must be mapped onto a convex polygon (for fixed border parameterizations).
Parameters:
mesh
3D mesh, model of ParameterizationMesh_3
parameterizer
Parameterization method for mesh

Parameters

The full template declarations are:

template<
class ParameterizationMesh_3>
Parameterizer_traits_3<ParameterizationMesh_3>::Error_code
parameterize (ParameterizationMesh_3& mesh);

template<
class ParameterizationMesh_3,
class ParameterizerTraits_3>
Parameterizer_traits_3<ParameterizationMesh_3>::Error_code
parameterize (ParameterizationMesh_3& mesh, ParameterizerTraits_3 parameterizer);

See Also

CGAL::Barycentric_mapping_parameterizer_3<ParameterizationMesh_3, BorderParameterizer_3, SparseLinearAlgebraTraits_d>
CGAL::Discrete_authalic_parameterizer_3<ParameterizationMesh_3, BorderParameterizer_3, SparseLinearAlgebraTraits_d>
CGAL::Discrete_conformal_map_parameterizer_3<ParameterizationMesh_3, BorderParameterizer_3, SparseLinearAlgebraTraits_d>
CGAL::LSCM_parameterizer_3<ParameterizationMesh_3, BorderParameterizer_3, SparseLinearAlgebraTraits_d>
CGAL::Mean_value_coordinates_parameterizer_3<ParameterizationMesh_3, BorderParameterizer_3, SparseLinearAlgebraTraits_d>

Example

See Simple_parameterization.cpp example.

Implementation

This function simply calls the parameterize() method of the parameterization algorithm chosen.