CGAL 5.6 - Planar Parameterization of Triangulated Surface Meshes
Loading...
Searching...
No Matches
CGAL::Surface_mesh_parameterization::Iterative_authalic_parameterizer_3< TriangleMesh_, BorderParameterizer_, SolverTraits_ > Class Template Reference

#include <CGAL/Surface_mesh_parameterization/Iterative_authalic_parameterizer_3.h>

Definition

template<class TriangleMesh_, class BorderParameterizer_ = Default, class SolverTraits_ = Default>
class CGAL::Surface_mesh_parameterization::Iterative_authalic_parameterizer_3< TriangleMesh_, BorderParameterizer_, SolverTraits_ >

The class Iterative_authalic_parameterizer_3 implements the Iterative Parameterization algorithm, as described by Jain et al.

[6].

This parameterization is a fixed border parameterization and is part of the authalic parameterization family, meaning that it aims to minimize area distortion between the input surface mesh and the parameterized output. More precisely, the approach used by this parameterizer is to iteratively redistribute the \( L_2\) stretch - as defined by Sander et al. [11] - over the mesh.

Template Parameters
TriangleMesh_must be a model of FaceGraph.
BorderParameterizer_is a strategy to parameterize the surface border and must be a model of Parameterizer_3.
Default:
This class parameterizes the border of a 3D surface onto a circle, with an arc-length parameterizatio...
Definition: Circular_border_parameterizer_3.h:244
SolverTraits_must be a model of SparseLinearAlgebraTraits_d.
Note that the system is not symmetric because border vertices are not removed from the system.
Default: If Eigen 3.1 (or greater) is available and CGAL_EIGEN3_ENABLED is defined, then an overload of Eigen_solver_traits is provided as default parameter:
Eigen::BiCGSTAB<Eigen_sparse_matrix<double>::EigenType,
Eigen::IncompleteLUT< double > > >
See also
CGAL::Surface_mesh_parameterization::Discrete_authalic_parameterizer_3<TriangleMesh, BorderParameterizer, SolverTraits>
CGAL::Surface_mesh_parameterization::ARAP_parameterizer_3<TriangleMesh, BorderParameterizer, SolverTraits>

Public Types

typedef Border_parameterizer_ Border_parameterizer
 Border parameterizer type.
 
typedef SolverTraits_ Solver_traits
 Solver traits type.
 
typedef TriangleMesh_ Triangle_mesh
 Triangle mesh type.
 

Public Member Functions

 Iterative_authalic_parameterizer_3 (Border_parameterizer border_parameterizer=Border_parameterizer(), Solver_traits sparse_la=Solver_traits())
 Constructor.
 
template<typename VertexUVmap , typename VertexIndexMap >
void initialize_system_from_mesh_border (Matrix &A, Vector &Bu, Vector &Bv, const Triangle_mesh &tmesh, halfedge_descriptor bhd, VertexUVmap uvmap, VertexIndexMap vimap) const
 initializes A, Bu, and Bv after border parameterization.
 
template<typename VertexUVmap , typename VertexIndexMap , typename VertexParameterizedMap >
Error_code parameterize (Triangle_mesh &tmesh, halfedge_descriptor bhd, VertexUVmap uvmap, VertexIndexMap vimap, VertexParameterizedMap vpmap, const unsigned int &iterations=15)
 computes a one-to-one mapping from a triangular 3D surface mesh to a piece of the 2D space.
 

Protected Member Functions

Border_parameterizerget_border_parameterizer ()
 Get the object that maps the surface's border onto a 2D space.
 
Solver_traitsget_linear_algebra_traits ()
 Get the sparse linear algebra (traits object to access the linear system).
 

Constructor & Destructor Documentation

◆ Iterative_authalic_parameterizer_3()

template<class TriangleMesh_ , class BorderParameterizer_ = Default, class SolverTraits_ = Default>
CGAL::Surface_mesh_parameterization::Iterative_authalic_parameterizer_3< TriangleMesh_, BorderParameterizer_, SolverTraits_ >::Iterative_authalic_parameterizer_3 ( Border_parameterizer  border_parameterizer = Border_parameterizer(),
Solver_traits  sparse_la = Solver_traits() 
)

Constructor.

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

Member Function Documentation

◆ initialize_system_from_mesh_border()

template<class TriangleMesh_ , class BorderParameterizer_ = Default, class SolverTraits_ = Default>
template<typename VertexUVmap , typename VertexIndexMap >
void CGAL::Surface_mesh_parameterization::Iterative_authalic_parameterizer_3< TriangleMesh_, BorderParameterizer_, SolverTraits_ >::initialize_system_from_mesh_border ( Matrix A,
Vector Bu,
Vector Bv,
const Triangle_mesh tmesh,
halfedge_descriptor  bhd,
VertexUVmap  uvmap,
VertexIndexMap  vimap 
) const

initializes A, Bu, and Bv after border parameterization.

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

Template Parameters
VertexUVmapmust be a model of ReadWritePropertyMap with boost::graph_traits<Triangle_mesh>::vertex_descriptor as key type and Point_2 (type deduced from Triangle_mesh using Kernel_traits) as value type.
VertexIndexMapmust be a model of ReadablePropertyMap with boost::graph_traits<Triangle_mesh>::vertex_descriptor as key type and a unique integer as value type.
Parameters
Athe matrix in both linear system
Buthe right hand side vector in the linear system of x coordinates
Bvthe right hand side vector in the linear system of y coordinates
tmesha triangulated surface
bhda halfedge descriptor on the boundary of mesh
uvmapan instantiation of the class VertexUVmap
vimapan instantiation of the class VertexIndexMap
Precondition
Vertices must be indexed (vimap must be initialized).
A, Bu, and Bv must be allocated.
Border vertices must be parameterized.

◆ parameterize()

template<class TriangleMesh_ , class BorderParameterizer_ = Default, class SolverTraits_ = Default>
template<typename VertexUVmap , typename VertexIndexMap , typename VertexParameterizedMap >
Error_code CGAL::Surface_mesh_parameterization::Iterative_authalic_parameterizer_3< TriangleMesh_, BorderParameterizer_, SolverTraits_ >::parameterize ( Triangle_mesh tmesh,
halfedge_descriptor  bhd,
VertexUVmap  uvmap,
VertexIndexMap  vimap,
VertexParameterizedMap  vpmap,
const unsigned int &  iterations = 15 
)

computes a one-to-one mapping from a triangular 3D surface mesh to a piece of the 2D space.

The mapping is piecewise linear (linear in each triangle). The result is the (u,v) pair image of each vertex of the 3D surface.

Template Parameters
VertexUVmapmust be a model of ReadWritePropertyMap with boost::graph_traits<Triangle_mesh>::vertex_descriptor as key type and Point_2 (type deduced from Triangle_mesh using Kernel_traits) as value type.
VertexIndexMapmust be a model of ReadablePropertyMap with boost::graph_traits<Triangle_mesh>::vertex_descriptor as key type and a unique integer as value type.
VertexParameterizedMapmust be a model of ReadWritePropertyMap with boost::graph_traits<Triangle_mesh>::vertex_descriptor as key type and a Boolean as value type.
Parameters
tmesha triangulated surface
bhda halfedge descriptor on the boundary of mesh
uvmapan instantiation of the class VertexUVmap
vimapan instantiation of the class VertexIndexMap
vpmapan instantiation of the class VertexParameterizedMap
iterationsan integer number of iterations to run the parameterization
Precondition
tmesh must be a triangular mesh.
The mesh border must be mapped onto a convex polygon.
The vertices must be indexed (vimap must be initialized).