\( \newcommand{\E}{\mathrm{E}} \) \( \newcommand{\A}{\mathrm{A}} \) \( \newcommand{\R}{\mathrm{R}} \) \( \newcommand{\N}{\mathrm{N}} \) \( \newcommand{\Q}{\mathrm{Q}} \) \( \newcommand{\Z}{\mathrm{Z}} \) \( \def\ccSum #1#2#3{ \sum_{#1}^{#2}{#3} } \def\ccProd #1#2#3{ \sum_{#1}^{#2}{#3} }\)
CGAL 4.8.2 - Planar Parameterization of Triangulated Surface Meshes
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
CGAL::Fixed_border_parameterizer_3< ParameterizationMesh_3, BorderParameterizer_3, SparseLinearAlgebraTraits_d > Class Template Referenceabstract

#include <CGAL/Fixed_border_parameterizer_3.h>

Inherits from

CGAL::Parameterizer_traits_3< ParameterizationMesh_3 >.

Inherited by 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 >, and CGAL::Mean_value_coordinates_parameterizer_3< ParameterizationMesh_3, BorderParameterizer_3, SparseLinearAlgebraTraits_d >.

Definition

template<class ParameterizationMesh_3, class BorderParameterizer_3 = Circular_border_arc_length_parameterizer_3<ParameterizationMesh_3>, class SparseLinearAlgebraTraits_d = Eigen_solver_traits<Eigen::BiCGSTAB<Eigen_sparse_matrix<double>::EigenType, Eigen::IncompleteLUT< double > > >>
class CGAL::Fixed_border_parameterizer_3< ParameterizationMesh_3, BorderParameterizer_3, SparseLinearAlgebraTraits_d >

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 that modify the behavior of this algorithm:

Is Model Of:
ParameterizerTraits_3
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>

Public Types

typedef BorderParameterizer_3 Border_param
 Export BorderParameterizer_3 template parameter.
 
typedef SparseLinearAlgebraTraits_d Sparse_LA
 Export SparseLinearAlgebraTraits_d template parameter.
 
- Public Types inherited from CGAL::Parameterizer_traits_3< ParameterizationMesh_3 >
enum  Error_code {
  OK, ERROR_EMPTY_MESH, ERROR_NON_TRIANGULAR_MESH, ERROR_NO_TOPOLOGICAL_DISC,
  ERROR_BORDER_TOO_SHORT, ERROR_NON_CONVEX_BORDER, ERROR_CANNOT_SOLVE_LINEAR_SYSTEM, ERROR_NO_1_TO_1_MAPPING,
  ERROR_OUT_OF_MEMORY, ERROR_WRONG_PARAMETER
}
 List of errors detected by this package. More...
 
typedef ParameterizationMesh_3 Adaptor
 Export ParameterizationMesh_3 template parameter.
 

Public Member Functions

 Fixed_border_parameterizer_3 (Border_param border_param=Border_param(), Sparse_LA sparse_la=Sparse_LA())
 Constructor. More...
 
virtual Error_code parameterize (Adaptor &mesh)
 Compute a one-to-one mapping from a triangular 3D surface mesh to a piece of the 2D space. More...
 
- Public Member Functions inherited from CGAL::Parameterizer_traits_3< ParameterizationMesh_3 >
virtual ~Parameterizer_traits_3 ()
 Destructor of base class should be virtual.
 

Protected Member Functions

virtual Error_code check_parameterize_preconditions (Adaptor &mesh)
 Check parameterize() preconditions: More...
 
void initialize_system_from_mesh_border (Matrix &A, Vector &Bu, Vector &Bv, const Adaptor &mesh)
 Initialize A, Bu and Bv after border parameterization. More...
 
virtual NT compute_w_ij (const Adaptor &mesh, Vertex_const_handle main_vertex_v_i, Vertex_around_vertex_const_circulator neighbor_vertex_v_j)=0
 Compute w_ij = (i, j) coefficient of matrix A for j neighbor vertex of i. More...
 
virtual Error_code setup_inner_vertex_relations (Matrix &A, Vector &Bu, Vector &Bv, const Adaptor &mesh, Vertex_const_handle vertex)
 Compute the line i of matrix A for i inner vertex: More...
 
void set_mesh_uv_from_system (Adaptor &mesh, const Vector &Xu, const Vector &Xv)
 Copy Xu and Xv coordinates into the (u,v) pair of each surface vertex.
 
virtual Error_code check_parameterize_postconditions (const Adaptor &mesh, const Matrix &A, const Vector &Bu, const Vector &Bv)
 Check parameterize() postconditions: More...
 
virtual bool is_one_to_one_mapping (const Adaptor &mesh, const Matrix &A, const Vector &Bu, const Vector &Bv)
 Check if 3D -> 2D mapping is one-to-one. More...
 
Border_paramget_border_parameterizer ()
 Get the object that maps the surface's border onto a 2D space.
 
Sparse_LAget_linear_algebra_traits ()
 Get the sparse linear algebra (traits object to access the linear system).
 

Additional Inherited Members

- Static Public Member Functions inherited from CGAL::Parameterizer_traits_3< ParameterizationMesh_3 >
static const char * get_error_message (int error_code)
 Get message corresponding to an error code. More...
 
- Protected Types inherited from CGAL::Parameterizer_traits_3< ParameterizationMesh_3 >
typedef Adaptor::NT NT
 
typedef Adaptor::Point_2 Point_2
 
typedef Adaptor::Point_3 Point_3
 
typedef Adaptor::Vector_2 Vector_2
 
typedef Adaptor::Vector_3 Vector_3
 
typedef Adaptor::Facet Facet
 
typedef Adaptor::Facet_handle Facet_handle
 
typedef Adaptor::Facet_const_handle Facet_const_handle
 
typedef Adaptor::Facet_iterator Facet_iterator
 
typedef
Adaptor::Facet_const_iterator 
Facet_const_iterator
 
typedef Adaptor::Vertex Vertex
 
typedef Adaptor::Vertex_handle Vertex_handle
 
typedef
Adaptor::Vertex_const_handle 
Vertex_const_handle
 
typedef Adaptor::Vertex_iterator Vertex_iterator
 
typedef
Adaptor::Vertex_const_iterator 
Vertex_const_iterator
 
typedef
Adaptor::Border_vertex_iterator 
Border_vertex_iterator
 
typedef
Adaptor::Border_vertex_const_iterator 
Border_vertex_const_iterator
 
typedef
Adaptor::Vertex_around_facet_circulator 
Vertex_around_facet_circulator
 
typedef
Adaptor::Vertex_around_facet_const_circulator 
Vertex_around_facet_const_circulator
 
typedef
Adaptor::Vertex_around_vertex_circulator 
Vertex_around_vertex_circulator
 
typedef
Adaptor::Vertex_around_vertex_const_circulator 
Vertex_around_vertex_const_circulator
 

Constructor & Destructor Documentation

template<class ParameterizationMesh_3 , class BorderParameterizer_3 = Circular_border_arc_length_parameterizer_3<ParameterizationMesh_3>, class SparseLinearAlgebraTraits_d = Eigen_solver_traits<Eigen::BiCGSTAB<Eigen_sparse_matrix<double>::EigenType, Eigen::IncompleteLUT< double > > >>
CGAL::Fixed_border_parameterizer_3< ParameterizationMesh_3, BorderParameterizer_3, SparseLinearAlgebraTraits_d >::Fixed_border_parameterizer_3 ( Border_param  border_param = Border_param(),
Sparse_LA  sparse_la = Sparse_LA() 
)

Constructor.

Parameters
border_paramObject that maps the surface's border to 2D space
sparse_laTraits object to access a sparse linear system

Member Function Documentation

template<class Adaptor , class Border_param , class Sparse_LA >
Fixed_border_parameterizer_3< Adaptor, Border_param, Sparse_LA >::Error_code CGAL::Fixed_border_parameterizer_3< Adaptor, Border_param, Sparse_LA >::check_parameterize_postconditions ( const Adaptor mesh,
const Matrix A,
const Vector Bu,
const Vector Bv 
)
protectedvirtual

Check parameterize() postconditions:

  • 3D -> 2D mapping is one-to-one.
template<class Adaptor , class Border_param , class Sparse_LA >
Fixed_border_parameterizer_3< Adaptor, Border_param, Sparse_LA >::Error_code CGAL::Fixed_border_parameterizer_3< Adaptor, Border_param, Sparse_LA >::check_parameterize_preconditions ( Adaptor mesh)
protectedvirtual

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.
template<class ParameterizationMesh_3 , class BorderParameterizer_3 = Circular_border_arc_length_parameterizer_3<ParameterizationMesh_3>, class SparseLinearAlgebraTraits_d = Eigen_solver_traits<Eigen::BiCGSTAB<Eigen_sparse_matrix<double>::EigenType, Eigen::IncompleteLUT< double > > >>
virtual NT CGAL::Fixed_border_parameterizer_3< ParameterizationMesh_3, BorderParameterizer_3, SparseLinearAlgebraTraits_d >::compute_w_ij ( const Adaptor mesh,
Vertex_const_handle  main_vertex_v_i,
Vertex_around_vertex_const_circulator  neighbor_vertex_v_j 
)
protectedpure virtual
template<class Adaptor , class Border_param , class Sparse_LA >
void CGAL::Fixed_border_parameterizer_3< Adaptor, Border_param, Sparse_LA >::initialize_system_from_mesh_border ( Matrix A,
Vector Bu,
Vector Bv,
const Adaptor mesh 
)
protected

Initialize A, Bu and Bv after border parameterization.

Fill the border vertices' lines in both linear systems: "u = constant" and "v = constant".

Precondition
Vertices must be indexed.
A, Bu and Bv must be allocated.
Border vertices must be parameterized.
template<class Adaptor , class Border_param , class Sparse_LA >
bool CGAL::Fixed_border_parameterizer_3< Adaptor, Border_param, Sparse_LA >::is_one_to_one_mapping ( const Adaptor mesh,
const Matrix A,
const Vector Bu,
const Vector Bv 
)
protectedvirtual
template<class Adaptor , class Border_param , class Sparse_LA >
Fixed_border_parameterizer_3< Adaptor, Border_param, Sparse_LA >::Error_code CGAL::Fixed_border_parameterizer_3< Adaptor, Border_param, Sparse_LA >::parameterize ( Adaptor mesh)
virtual

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.

Precondition
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.

Implements CGAL::Parameterizer_traits_3< ParameterizationMesh_3 >.

template<class Adaptor , class Border_param , class Sparse_LA >
Fixed_border_parameterizer_3< Adaptor, Border_param, Sparse_LA >::Error_code CGAL::Fixed_border_parameterizer_3< Adaptor, Border_param, Sparse_LA >::setup_inner_vertex_relations ( Matrix A,
Vector Bu,
Vector Bv,
const Adaptor mesh,
Vertex_const_handle  vertex 
)
protectedvirtual

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.
Precondition
Vertices must be indexed.
Vertex i musn't be already parameterized.
Line i of A must contain only zeros.