CGAL 5.6.1 - Planar Parameterization of Triangulated Surface Meshes
|
#include <CGAL/Surface_mesh_parameterization/Barycentric_mapping_parameterizer_3.h>
The class Barycentric_mapping_parameterizer_3
implements Tutte Barycentric Mapping algorithm.
This algorithm is also called Tutte Uniform Weights by other authors [12].
A one-to-one mapping is guaranteed if the surface's border is mapped to a convex polygon.
This class is a strategy called by the main parameterization algorithm Fixed_border_parameterizer_3::parameterize()
and it:
BorderParameterizer_
and SolverTraits_
.w_ij
, the (i,j)
-coefficient of the matrix A
for j
neighbor vertex of i
, based on Tutte Barycentric Mapping method.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: Circular_border_arc_length_parameterizer_3<TriangleMesh_> |
SolverTraits_ | must be a model of SparseLinearAlgebraTraits_d .Note that the system is not symmetric because Fixed_border_parameterizer_3 does not remove border vertices 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 > > > |
CGAL::Surface_mesh_parameterization::Fixed_border_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. | |
typedef boost::graph_traits< Triangle_mesh >::vertex_descriptor | vertex_descriptor |
Mesh vertex type. | |
typedef boost::graph_traits< Triangle_mesh >::halfedge_descriptor | halfedge_descriptor |
Mesh halfedge type. | |
Public Types inherited from CGAL::Surface_mesh_parameterization::Fixed_border_parameterizer_3< TriangleMesh_, Default::Get< BorderParameterizer_, Circular_border_arc_length_parameterizer_3< TriangleMesh_ > >::type, Default::Get< SolverTraits_, SolverTraits_ >::type > | |
typedef Border_parameterizer_ | Border_parameterizer |
Border parameterizer type. | |
typedef Default::Get< SolverTraits_, SolverTraits_ >::type | Solver_traits |
Solver traits type. | |
typedef TriangleMesh_ | Triangle_mesh |
Triangle mesh type. | |
typedef boost::graph_traits< Triangle_mesh >::vertex_descriptor | vertex_descriptor |
Mesh vertex type. | |
typedef boost::graph_traits< Triangle_mesh >::halfedge_descriptor | halfedge_descriptor |
Mesh halfedge type. | |
typedef Solver_traits::Vector | Vector |
Solver vector type. | |
typedef Solver_traits::Matrix | Matrix |
Solver matrix type. | |
CGAL::Surface_mesh_parameterization::Barycentric_mapping_parameterizer_3< TriangleMesh_, BorderParameterizer_, SolverTraits_ >::Barycentric_mapping_parameterizer_3 | ( | Border_parameterizer | border_param = Border_parameterizer() , |
Solver_traits | sparse_la = Solver_traits() |
||
) |
Constructor.
border_param | Object that maps the surface's border to 2D space. |
sparse_la | Traits object to access a sparse linear system. |
|
protectedvirtual |
computes w_ij
, the coefficient of matrix A
for j
neighbor vertex of i
.
In the Tutte Barycentric Mapping algorithm, we have w_ij = 1
, for j
neighbor vertex of i
.
bool CGAL::Surface_mesh_parameterization::Barycentric_mapping_parameterizer_3< TriangleMesh_, BorderParameterizer_, SolverTraits_ >::is_one_to_one_mapping | ( | const Triangle_mesh & | mesh, |
halfedge_descriptor | bhd, | ||
const VertexUVMap | uvmap | ||
) | const |
returns whether the 3D -> 2D mapping is one-to-one.
Theorem: A one-to-one mapping is guaranteed if all w_ij
coefficients are > 0 (for j
vertex neighbor of i
) and if the surface border is mapped onto a 2D convex polygon. Here, all w_ij
coefficients are equal to 1
(for j
vertex neighbor of i
), thus a valid embedding is guaranteed if the surface border is mapped onto a 2D convex polygon.