cgal/Surface_mesh_parameterization/doc_tex/Surface_mesh_parameterization/basics.tex

82 lines
3.0 KiB
TeX

\section{Basics}
\subsection{Default Parameterization}
From the user point of view, the simplest entry point to this package
is the following function:
\ccFunction{Parameterizer_traits_3<ParameterizationMesh_3>::Error_code parameterize (ParameterizationMesh_3 & mesh);}
{
Compute a one-to-one mapping from a 3D triangle surface 'mesh' to a 2D circle, using Floater Mean Value Coordinates algorithm. A one-to-one mapping is guaranteed.
The mapping is piecewise linear on the input mesh triangles. The result is a (u,v) pair of parameter coordinates for each vertex of the input mesh.
Preconditions:\begin{itemize}
\item 'mesh' must be a surface with one connected component.\item 'mesh' must be a triangular mesh.\end{itemize}
}
The CGAL::parameterize() function provides a default parameterization
method: Floater Mean Value Coordinates~\cite{cgal:f-mvc-03}, with an
arc-length circular border parameterization, and using OpenNL sparse
linear solver~\cite{cgal:l-nmdgp-05}.
The result is stored into the (u,v) fields of the mesh vertices and/or
halfedges.
\subsection{List of Supported Meshes and Concept}
The general definition of input meshes handled by the package is:
\begin{itemize}
\item Triangulated.
\item 2-manifold.
\item Oriented.
\item All surface parameterization methods only deal with topological discs.
The input mesh can be of any genus and have an arbitrary number of
connected components. If it is not a topological disc, it has to come
with a description of a border (a list of vertices) which is the
border of a topological disc. If no border is given as input, we
assume that the surface border is the longest border already
present in the input mesh (the other borders are considered as
holes).
Note that this way the user is responsible for cutting a closed mesh
of arbitrary genus (even a topological disc with an intricate seam
cut), as long as this condition is fulfilled.
The package will only parameterize the inside part of the given
border, thus only one connected component.
\end{itemize}
The package accesses such meshes through the
\ccc{ParameterizationMesh_3} concept. Among other things, this concept
defines the accessor to the (u,v) values computed by
parameterizations.
The package provides a model of the concept
\ccc{ParameterizationMesh_3} to access \cgal\ \ccc{Polyhedron_3}:
\ccc{CGAL::Parameterization_polyhedron_adaptor_3<Polyhedron_3_>} \\
Note that these interfaces are decorators which add {\em on the fly}
the necessary fields to unmodified CGAL data structures (using STL
maps). For better performances, it is recommended to use CGAL data
structures enriched with the proper fields. See \ccc{Polyhedron_ex}
class in \ccc{polyhedron_ex_parameterization.C} example.
\subsection{Default Parameterization Example}
\ccc{Simple_parameterization.C} applies the default parameterization to a
\ccc{Polyhedron_3} mesh (must be a topological disk).
Eventually, it extracts the result from halfedges and prints it.
\ccIncludeExampleCode{Surface_mesh_parameterization/Simple_parameterization.C}