CGAL::Fixed_border_parameterizer_3<ParameterizationMesh_3, BorderParameterizer_3, SparseLinearAlgebraTraits_d>

Definition

The class Fixed_border_parameterizer_3 is the base class of fixed border parameterization methods (Tutte, Floater, ...).

One-to-one mapping is guaranteed if surface's border is mapped onto a convex polygon.

This class is a pure virtual class, thus cannot be instantiated. Anyway, it implements most of the parameterization algorithm parameterize(). Subclasses are Strategies [GHJV95] that modify the behavior of this algorithm:

Todo
Fixed_border_parameterizer_3 should remove border vertices from the linear systems in order to have a symmetric positive definite matrix for Tutte Barycentric Mapping and Discrete Conformal Map algorithms.

#include <CGAL/Fixed_border_parameterizer_3.h>

Is Model for the Concepts

Model of the ParameterizerTraits_3 concept (although you cannot instantiate this class).

Design Pattern

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

Parameters

The full template declaration is:

template<
class ParameterizationMesh_3,
class BorderParameterizer_3 = Circular_border_arc_length_parameterizer_3<ParameterizationMesh_3>,
class SparseLinearAlgebraTraits_d = OpenNL::DefaultLinearSolverTraits<typename ParameterizationMesh_3::NT>>
class Fixed_border_parameterizer_3;

Types

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

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

Creation

Fixed_border_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.
  • the mesh border must be mapped onto a convex polygon.
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.
  • the mesh border must be mapped onto a convex polygon.
void param.initialize_system_from_mesh_border ( Matrix& A, Vector& Bu, Vector& Bv, Adaptor mesh)
Initialize A, Bu and Bv after border parameterization. Fill the border vertices' lines in both linear systems: u = constant and v = constant. Preconditions:
  • vertices must be indexed.
  • A, Bu and Bv must be allocated.
  • border vertices must be parameterized.
virtual NT
param.compute_w_ij ( Adaptor mesh,
Vertex_const_handle main_vertex_v_i,
Vertex_around_vertex_const_circulator neighbor_vertex_v_j)
Compute w_ij = (i, j) coefficient of matrix A for j neighbor vertex of i. Implementation note: Subclasses must at least implement compute_w_ij().
Parameterizer_traits_3<Adaptor>::Error_code
param.setup_inner_vertex_relations ( Matrix& A,
Vector& Bu,
Vector& Bv,
Adaptor mesh,
Vertex_const_handle vertex)
Compute the line i of matrix A for i inner vertex:
  • call compute_w_ij() to compute the A coefficient w_ij for each neighbor v_j.
  • compute w_ii = - sum of w_ijs.
Preconditions:
  • vertices must be indexed.
  • vertex i mustn't be already parameterized.
  • line i of A must contain only zeros.
void param.set_mesh_uv_from_system ( Adaptor& mesh, Vector Xu, Vector Xv)
Copy Xu and Xv coordinates into the (u,v) pair of each surface vertex.
Parameterizer_traits_3<Adaptor>::Error_code
param.check_parameterize_postconditions ( Adaptor mesh, Matrix A, Vector Bu, Vector Bv)
Check parameterize() postconditions:
  • 3D -> 2D mapping is one-to-one.
bool param.is_one_to_one_mapping ( Adaptor mesh, Matrix A, Vector Bu, Vector Bv)
Check if 3D -> 2D mapping is one-to-one. The default implementation checks each normal.
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::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>