CGAL 6.0.2 - Planar Parameterization of Triangulated Surface Meshes

Loading...
Searching...
No Matches
List of all members | Public Types | Public Member Functions
CGAL::Surface_mesh_parameterization::LSCM_parameterizer_3< TriangleMesh_, BorderParameterizer_, SolverTraits_ > Class Template Reference
Triangulated Surface Mesh Parameterization Reference » Surface Parameterization Methods

`#include <CGAL/Surface_mesh_parameterization/LSCM_parameterizer_3.h>`

## Definition

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

The class `LSCM_parameterizer_3` implements the Least Squares Conformal Maps (LSCM) parameterization [8].

This is a conformal parameterization, i.e. it attempts to preserve angles.

This is a free border parameterization. There is no need to map the border of the surface onto a convex polygon (only two pinned vertices are needed to ensure a unique solution), but a one-to-one mapping is not guaranteed.

Is model of
  `Parameterizer_3`

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: Two_vertices_parameterizer_3<TriangleMesh_> CGAL::Surface_mesh_parameterization::Two_vertices_parameterizer_3 The class Two_vertices_parameterizer_3 parameterizes two extreme vertices of a 3D surface. Definition: Two_vertices_parameterizer_3.h:56
  SolverTraits_ | must be a model of `SparseLinearAlgebraTraits_d`. Note: We may use a symmetric definite positive solver because LSCM solves the system in the least squares sense. 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: CGAL::Eigen_solver_traits<Eigen::SimplicialLDLT< Eigen::SparseMatrix<double> > > CGAL::Eigen_solver_traits

See also
  `CGAL::Surface_mesh_parameterization::Two_vertices_parameterizer_3<TriangleMesh, BorderParameterizer, SolverTraits>`

## Public Types
typedef Border_parameterizer_ | Border_parameterizer
| The border parameterizer.
typedef SolverTraits_ | Solver_traits
| Solver traits type.
typedef TriangleMesh_ | Triangle_mesh
| Triangle mesh type.
typedef boost::graph_traits< Triangle_mesh >::halfedge_descriptor | halfedge_descriptor
| Mesh halfedge type.

## Public Member Functions
| LSCM_parameterizer_3 (Border_parameterizer border_param=Border_parameterizer(), Solver_traits sparse_la=Solver_traits())
| Constructor.
template<typename VertexUVMap >
bool | 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.
template<typename VertexUVmap , typename VertexIndexMap , typename VertexParameterizedMap >
Error_code | parameterize (Triangle_mesh &mesh, halfedge_descriptor bhd, VertexUVmap uvmap, VertexIndexMap vimap, VertexParameterizedMap vpmap)
| computes a one-to-one mapping from a triangular 3D surface mesh to a piece of the 2D space.

## Constructor & Destructor Documentation

## ◆ LSCM_parameterizer_3()

template<class TriangleMesh_ , class BorderParameterizer_ = Default, class SolverTraits_ = Default>

CGAL::Surface_mesh_parameterization::LSCM_parameterizer_3< TriangleMesh_, BorderParameterizer_, SolverTraits_ >::LSCM_parameterizer_3 | ( | Border_parameterizer | border_param = `Border_parameterizer()`,
|  | Solver_traits | sparse_la = `Solver_traits()`
| ) |  |

Constructor.

Parameters

  border_param | Object that maps the surface's border to 2D space
  sparse_la | Traits object to access a sparse linear system

## Member Function Documentation

## ◆ parameterize()

template<class TriangleMesh_ , class BorderParameterizer_ = Default, class SolverTraits_ = Default>
template<typename VertexUVmap , typename VertexIndexMap , typename VertexParameterizedMap >

Error_code CGAL::Surface_mesh_parameterization::LSCM_parameterizer_3< TriangleMesh_, BorderParameterizer_, SolverTraits_ >::parameterize | ( | Triangle_mesh & | mesh,
|  | halfedge_descriptor | bhd,
|  | VertexUVmap | uvmap,
|  | VertexIndexMap | vimap,
|  | VertexParameterizedMap | vpmap
| ) |  |

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

  VertexUVmap | must 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.
  VertexIndexMap | must be a model of `ReadablePropertyMap` with `boost::graph_traits<Triangle_mesh>::vertex_descriptor` as key type and a unique integer as value type.
  VertexParameterizedMap | must be a model of `ReadWritePropertyMap` with `boost::graph_traits<Triangle_mesh>::vertex_descriptor` as key type and a Boolean as value type.

Parameters

  mesh | a triangulated surface.
  bhd | a halfedge descriptor on the boundary of `mesh`.
  uvmap | an instantiation of the class `VertexUVmap`.
  vimap | an instantiation of the class `VertexIndexMap`.
  vpmap | an instantiation of the class `VertexParameterizedMap`.

Precondition
  `mesh` must be a triangular mesh.
  The vertices must be indexed (`vimap` must be initialized).