CGAL 4.14 - Planar Parameterization of Triangulated Surface Meshes
|
#include <CGAL/Surface_mesh_parameterization/Fixed_border_parameterizer_3.h>
The class Fixed_border_parameterizer_3
is the base class of fixed border parameterization methods (Tutte, Floater, ...).
A one-to-one mapping is guaranteed if the border of the surface is mapped onto a convex polygon.
This class is a pure virtual class and thus cannot be instantiated. Nevertheless, it implements most of the parameterization algorithm parameterize()
. Subclasses are Strategies [5] that modify the behavior of this algorithm:
BorderParameterizer_
and SolverTraits_
.compute_w_ij()
to compute w_ij = (i, j), coefficient of matrix A for j neighbor vertex of i.
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::ARAP_parameterizer_3<TriangleMesh, BorderParameterizer, SolverTraits>
CGAL::Surface_mesh_parameterization::Barycentric_mapping_parameterizer_3<TriangleMesh, BorderParameterizer, SolverTraits>
CGAL::Surface_mesh_parameterization::Discrete_authalic_parameterizer_3<TriangleMesh, BorderParameterizer, SolverTraits>
CGAL::Surface_mesh_parameterization::Discrete_conformal_map_parameterizer_3<TriangleMesh, BorderParameterizer, SolverTraits>
CGAL::Surface_mesh_parameterization::Mean_value_coordinates_parameterizer_3<TriangleMesh, BorderParameterizer, SolverTraits>
Public Types | |
typedef Border_parameterizer_ | Border_parameterizer |
typedef SolverTraits_ | Solver_traits |
typedef TriangleMesh_ | TriangleMesh |
Public Member Functions | |
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. | |
template<typename VertexUVmap , typename VertexIndexMap , typename VertexParameterizedMap > | |
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 Types | |
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 |
Protected Member Functions | |
template<typename VertexUVmap , typename VertexIndexMap > | |
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... | |
virtual NT | compute_w_ij (const TriangleMesh &mesh, vertex_descriptor main_vertex_v_i, vertex_around_target_circulator neighbor_vertex_v_j) const =0 |
Compute w_ij, coefficient of matrix A for j neighbor vertex of i. More... | |
template<typename VertexIndexMap > | |
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). | |
CGAL::Surface_mesh_parameterization::Fixed_border_parameterizer_3< TriangleMesh_, BorderParameterizer_, SolverTraits_ >::Fixed_border_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 |
|
protectedpure virtual |
Compute w_ij, coefficient of matrix A for j neighbor vertex of i.
Implementation note: Subclasses must at least implement compute_w_ij().
mesh | a triangulated surface. |
main_vertex_v_i | the vertex of mesh with index i |
neighbor_vertex_v_j | the vertex of mesh with index j |
Implemented in CGAL::Surface_mesh_parameterization::Mean_value_coordinates_parameterizer_3< TriangleMesh_, BorderParameterizer_, SolverTraits_ >, CGAL::Surface_mesh_parameterization::Barycentric_mapping_parameterizer_3< TriangleMesh_, BorderParameterizer_, SolverTraits_ >, CGAL::Surface_mesh_parameterization::Discrete_authalic_parameterizer_3< TriangleMesh_, BorderParameterizer_, SolverTraits_ >, and CGAL::Surface_mesh_parameterization::Discrete_conformal_map_parameterizer_3< TriangleMesh_, BorderParameterizer_, SolverTraits_ >.
|
protected |
Initialize A, Bu and Bv after border parameterization.
Fill the border vertices' lines in both linear systems: "u = constant" and "v = constant".
VertexUVmap | must be a model of ReadWritePropertyMap with boost::graph_traits<TriangleMesh>::vertex_descriptor as key type and Point_2 (type deduced from TriangleMesh using Kernel_traits ) as value type. |
VertexIndexMap | must be a model of ReadablePropertyMap with boost::graph_traits<TriangleMesh>::vertex_descriptor as key type and a unique integer as value type. |
A | the matrix in both linear system |
Bu | the right hand side vector in the linear system of x coordinates |
Bv | the right hand side vector in the linear system of y coordinates |
mesh | a triangulated surface. |
bhd | a halfedge descriptor on the boundary of mesh . |
uvmap | an instanciation of the class VertexUVmap . |
vimap | an instanciation of the class VertexIndexMap . |
vimap
must be initialized). Error_code CGAL::Surface_mesh_parameterization::Fixed_border_parameterizer_3< TriangleMesh_, BorderParameterizer_, SolverTraits_ >::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.
The mapping is piecewise linear (linear in each triangle). The result is the (u,v) pair image of each vertex of the 3D surface.
VertexUVmap | must be a model of ReadWritePropertyMap with boost::graph_traits<TriangleMesh>::vertex_descriptor as key type and Point_2 (type deduced from TriangleMesh using Kernel_traits ) as value type. |
VertexIndexMap | must be a model of ReadablePropertyMap with boost::graph_traits<TriangleMesh>::vertex_descriptor as key type and a unique integer as value type. |
VertexParameterizedMap | must be a model of ReadWritePropertyMap with boost::graph_traits<TriangleMesh>::vertex_descriptor as key type and a Boolean as value type. |
mesh | a triangulated surface. |
bhd | a halfedge descriptor on the boundary of mesh . |
uvmap | an instanciation of the class VertexUVmap . |
vimap | an instanciation of the class VertexIndexMap . |
vpmap | an instanciation of the class VertexParameterizedMap . |
mesh
must be a triangular mesh. vimap
must be initialized)
|
protected |
Compute the line i of matrix A for i inner vertex: