Class

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: They provide BorderParameterizer_3 and SparseLinearAlgebraTraits_d template parameters that make sense. They implement compute_w_ij() to compute w_ij = (i, j) coefficient of matrix A for j neighbor vertex of i. They may implement an optimized version of is_one_to_one_mapping().

#include <CGAL/Fixed_border_parameterizer_3.h>

Inherits From

Parameterizer_traits_3<ParameterizationMesh_3>

Is Model for the Concepts

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

Design Pattern

Fixed_border_parameterizer_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

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.
Error_code param.check_parameterize_preconditions ( Adaptor& mesh) [protected, virtual]
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)
[protected, pure virtual]
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().
Error_code
param.setup_inner_vertex_relations ( Matrix& A,
Vector& Bu,
Vector& Bv,
Adaptor mesh,
Vertex_const_handle vertex)
[protected, virtual]
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 musn'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.
Error_code
param.check_parameterize_postconditions ( Adaptor mesh,
Matrix A,
Vector Bu,
Vector Bv)
[protected, virtual]
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) [protected, virtual]
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>