CGAL 5.1.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 [10].
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 = (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 |
typedef SolverTraits_ | SolverTraits |
typedef TriangleMesh_ | TriangleMesh |
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 |
typedef Default::Get< SolverTraits_, SolverTraits_ >::type | Solver_traits |
typedef TriangleMesh_ | TriangleMesh |
Public Member Functions | |
Barycentric_mapping_parameterizer_3 (Border_parameterizer border_param=Border_parameterizer(), Solver_traits sparse_la=Solver_traits()) | |
Constructor. More... | |
template<typename VertexUVMap , typename Faces_Container > | |
bool | is_one_to_one_mapping (const TriangleMesh &mesh, halfedge_descriptor bhd, const VertexUVMap uvmap) const |
Check if the 3D -> 2D mapping is one-to-one. More... | |
Public Member Functions 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 > | |
Fixed_border_parameterizer_3 (Border_parameterizer border_param=Border_parameterizer(), Solver_traits sparse_la=Solver_traits()) | |
Constructor. More... | |
virtual | ~Fixed_border_parameterizer_3 () |
Destructor of base class should be virtual. | |
Error_code | parameterize (TriangleMesh &mesh, halfedge_descriptor bhd, VertexUVmap uvmap, VertexIndexMap vimap, VertexParameterizedMap vpmap) |
Compute a one-to-one mapping from a triangular 3D surface mesh to a piece of the 2D space. More... | |
Protected Member Functions | |
virtual NT | compute_w_ij (const TriangleMesh &, vertex_descriptor, vertex_around_target_circulator) const |
Compute w_ij = (i,j), coefficient of matrix A for j neighbor vertex of i. More... | |
Protected Member Functions 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 > | |
void | initialize_system_from_mesh_border (Matrix &A, Vector &Bu, Vector &Bv, const TriangleMesh &mesh, halfedge_descriptor bhd, VertexUVmap uvmap, VertexIndexMap vimap) const |
Initialize A, Bu and Bv after border parameterization. More... | |
Error_code | setup_inner_vertex_relations (Matrix &A, Vector &, Vector &, const TriangleMesh &mesh, vertex_descriptor vertex, VertexIndexMap vimap) const |
Compute the line i of matrix A for i inner vertex: More... | |
Border_parameterizer & | get_border_parameterizer () |
Get the object that maps the surface's border onto a 2D space. | |
Solver_traits & | get_linear_algebra_traits () |
Get the sparse linear algebra (traits object to access the linear system). | |
Additional Inherited Members | |
Protected 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 internal::Kernel_traits< TriangleMesh >::Kernel | Kernel |
typedef internal::Kernel_traits< TriangleMesh >::PPM | PPM |
typedef Kernel::FT | NT |
typedef Kernel::Point_2 | Point_2 |
typedef Kernel::Point_3 | Point_3 |
typedef Kernel::Vector_3 | Vector_3 |
typedef Solver_traits::Vector | Vector |
typedef Solver_traits::Matrix | Matrix |
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 |
Compute w_ij = (i,j), 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 TriangleMesh & | mesh, |
halfedge_descriptor | bhd, | ||
const VertexUVMap | uvmap | ||
) | const |
Check if 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 = 1 (for j vertex neighbor of i), thus a valid embedding is guaranteed if the surface border is mapped onto a 2D convex polygon.