CGAL::LSCM_parameterizer_3<ParameterizationMesh_3, BorderParameterizer_3, SparseLinearAlgebraTraits_d>

Definition

The class LSCM_parameterizer_3 implements the Least Squares Conformal Maps (LSCM) parameterization [LPRM02].

This is a conformal parameterization, i.e. it attempts to preserve angles.

This is a free border parameterization. No need to map the surface's border onto a convex polygon (only two pinned vertices are needed to ensure a unique solution), but one-to-one mapping is NOT guaranteed.

#include <CGAL/LSCM_parameterizer_3.h>

Is Model for the Concepts

Model of the ParameterizerTraits_3 concept.

Design Pattern

LSCM_parameterizer_3<ParameterizationMesh_3, ...> class is a Strategy [GHJV95]: it implements a strategy of surface parameterization for models of ParameterizationMesh_3.

Parameters

The full template declaration is:

template<
class ParameterizationMesh_3,
class BorderParameterizer_3 = Two_vertices_parameterizer_3<ParameterizationMesh_3>,
class SparseLinearAlgebraTraits_d = OpenNL::SymmetricLinearSolverTraits<typename ParameterizationMesh_3::NT>>
class LSCM_parameterizer_3;

Types

LSCM_parameterizer_3<ParameterizationMesh_3, BorderParameterizer_3, SparseLinearAlgebraTraits_d>::Border_param
Export BorderParameterizer_3 template parameter.

LSCM_parameterizer_3<ParameterizationMesh_3, BorderParameterizer_3, SparseLinearAlgebraTraits_d>::Sparse_LA
Export SparseLinearAlgebraTraits_d template parameter.

Creation

LSCM_parameterizer_3<ParameterizationMesh_3, BorderParameterizer_3, SparseLinearAlgebraTraits_d> param ( Border_param border_param = Border_param(),
Sparse_LA sparse_la = Sparse_LA());
Constructor.

Parameters:
border_param
Object that maps the surface's border to 2D space
sparse_la
Traits object to access a sparse linear system

Operations

Parameterizer_traits_3<Adaptor>::Error_code
param.parameterize ( Adaptor& mesh)
Compute a one-to-one mapping from a triangular 3D surface 'mesh' to a piece of the 2D space. The mapping is linear by pieces (linear in each triangle). The result is the (u,v) pair image of each vertex of the 3D surface. Preconditions:
  • 'mesh' must be a surface with one connected component.
  • 'mesh' must be a triangular mesh.
Parameterizer_traits_3<Adaptor>::Error_code
param.check_parameterize_preconditions ( Adaptor& mesh)
Check parameterize() preconditions:
  • 'mesh' must be a surface with one connected component.
  • 'mesh' must be a triangular mesh.
void
param.initialize_system_from_mesh_border ( LeastSquaresSolver& solver,
Adaptor mesh)
Initialize A X = B linear system after (at least two) border vertices are parameterized. Preconditions:
  • vertices must be indexed.
  • X and B must be allocated and empty.
  • (at least two) border vertices must be parameterized.
void
param.project_triangle ( Point_3 p0,
Point_3 p1,
Point_3 p2,
Point_2& z0,
Point_2& z1,
Point_2& z2)
Utility for setup_triangle_relations(): Computes the coordinates of the vertices of a triangle in a local 2D orthonormal basis of the triangle's plane.
Parameterizer_traits_3<Adaptor>::Error_code
param.setup_triangle_relations ( LeastSquaresSolver& solver,
Adaptor mesh,
Facet_const_handle facet)
Create two lines in the linear system per triangle (one for u, one for v). Preconditions:
  • vertices must be indexed.
void
param.set_mesh_uv_from_system ( Adaptor& mesh,
LeastSquaresSolver solver)
Copy X coordinates into the (u,v) pair of each vertex.
Parameterizer_traits_3<Adaptor>::Error_code
param.check_parameterize_postconditions ( Adaptor mesh,
LeastSquaresSolver solver)
Check parameterize() postconditions:
  • 3D -> 2D mapping is one-to-one.
bool
param.is_one_to_one_mapping ( Adaptor mesh,
LeastSquaresSolver solver)
Check if 3D -> 2D mapping is one-to-one.
Border_param& param.get_border_parameterizer ()
Get the object that maps the surface's border onto a 2D space.
Sparse_LA& param.get_linear_algebra_traits ()
Get the sparse linear algebra (traits object to access the linear system).

See Also

CGAL::Parameterizer_traits_3<ParameterizationMesh_3>
CGAL::Fixed_border_parameterizer_3<ParameterizationMesh_3, BorderParameterizer_3, SparseLinearAlgebraTraits_d>
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::Mean_value_coordinates_parameterizer_3<ParameterizationMesh_3, BorderParameterizer_3, SparseLinearAlgebraTraits_d>