mirror of https://github.com/CGAL/cgal
172 lines
5.2 KiB
TeX
172 lines
5.2 KiB
TeX
% +------------------------------------------------------------------------+
|
|
% | Reference manual page: LSCM_parameterizer_3.tex
|
|
% +------------------------------------------------------------------------+
|
|
% | 21.09.2005 Laurent Saboret, Pierre Alliez
|
|
% | Package: Parameterization
|
|
% |
|
|
\RCSdef{\RCSLSCMparameterizerRev}{$Id$}
|
|
\RCSdefDate{\RCSLSCMparameterizerDate}{$Date$}
|
|
% |
|
|
%%RefPage: end of header, begin of main body
|
|
% +------------------------------------------------------------------------+
|
|
|
|
|
|
\begin{ccRefClass}{LSCM_parameterizer_3} %% add template arg's if necessary
|
|
|
|
%% \ccHtmlCrossLink{} %% add further rules for cross referencing links
|
|
%% \ccHtmlIndexC[class]{} %% add further index entries
|
|
|
|
|
|
\ccDefinition
|
|
|
|
% The section below is automatically generated. Do not edit!
|
|
%START-AUTO(\ccDefinition)
|
|
|
|
The class LSCM\_parameterizer\_3 implements the Least Squares Conformal Maps (LSCM) parameterization \cite{cgal:lprm-lscm-02}.
|
|
|
|
This is a conformal parameterization, i.e. it attempts to preserve angles.
|
|
|
|
This is a free border parameterization. No need to map the surface's border onto a convex polygon (only 2 pinned vertices are needed to ensure a unique solution), but 1 to 1 mapping is NOT guaranteed.
|
|
|
|
As all parameterization algorithms of the package, this class is usually called via the global function parameterize().
|
|
|
|
\begin{description}
|
|
\item[Todo]Add to SparseLinearAlgebraTraits\_d the ability to solve linear systems in the least squares sense, then access to the solver via the traits class interface instead of calls specific to OpenNL.\end{description}
|
|
|
|
%END-AUTO(\ccDefinition)
|
|
|
|
\ccInclude{CGAL/LSCM_parameterizer_3.h}
|
|
|
|
|
|
\ccIsModel
|
|
|
|
% The section below is automatically generated. Do not edit!
|
|
%START-AUTO(\ccIsModel)
|
|
|
|
Model of the ParameterizerTraits\_3 concept.
|
|
|
|
%END-AUTO(\ccIsModel)
|
|
|
|
|
|
\ccParameters
|
|
|
|
The full template declaration is:
|
|
|
|
% The section below is automatically generated. Do not edit!
|
|
%START-AUTO(\ccParameters)
|
|
|
|
template$<$ \\
|
|
class ParameterizationMesh\_3, \\
|
|
class BorderParameterizer\_3 = Two\_vertices\_parameterizer\_3$<$ParameterizationMesh\_3$>$, \\
|
|
class SparseLinearAlgebraTraits\_d = OpenNL::SymmetricLinearSolverTraits$<$typename ParameterizationMesh\_3::NT$>$$>$ \\
|
|
class LSCM\_parameterizer\_3;
|
|
|
|
%END-AUTO(\ccParameters)
|
|
|
|
|
|
\ccTypes
|
|
|
|
% The section below is automatically generated. Do not edit!
|
|
%START-AUTO(\ccTypes)
|
|
|
|
\ccNestedType{Border_param}
|
|
{
|
|
Export BorderParameterizer\_3 template parameter.
|
|
}
|
|
\ccGlue
|
|
\ccNestedType{Sparse_LA}
|
|
{
|
|
Export SparseLinearAlgebraTraits\_d template parameter.
|
|
}
|
|
\ccGlue
|
|
|
|
%END-AUTO(\ccTypes)
|
|
|
|
|
|
\ccCreation
|
|
\ccCreationVariable{param} %% choose variable name for \ccMethod
|
|
|
|
% The section below is automatically generated. Do not edit!
|
|
%START-AUTO(\ccCreation)
|
|
|
|
\ccConstructor{LSCM_parameterizer_3 (Border_param border_param = Border_param(), Sparse_LA sparse_la = Sparse_LA());}
|
|
{
|
|
Constructor.
|
|
}
|
|
\ccGlue
|
|
\begin{description}
|
|
\item[Parameters: ]
|
|
\begin{description}
|
|
\item[border\_param]Object that maps the surface's border to 2D space \item[sparse\_la]Traits object to access a sparse linear system \end{description}
|
|
\end{description}
|
|
\ccGlue
|
|
|
|
%END-AUTO(\ccCreation)
|
|
|
|
|
|
\ccOperations
|
|
|
|
% The section below is automatically generated. Do not edit!
|
|
%START-AUTO(\ccOperations)
|
|
|
|
\ccMethod{Parameterizer_traits_3< Adaptor >::Error_code parameterize (Adaptor * mesh);}
|
|
{
|
|
Compute a 1 to 1 mapping from a triangular 3D surface 'mesh' to a piece of the 2D space. The mapping is linear by pieces (linear in each triangle). The result is the (u,v) pair image of each vertex of the 3D surface.
|
|
Preconditions:\begin{itemize}
|
|
\item 'mesh' must be a surface with 1 connected component.\item 'mesh' must be a triangular mesh. \end{itemize}
|
|
}
|
|
\ccGlue
|
|
|
|
%END-AUTO(\ccOperations)
|
|
|
|
|
|
\ccSeeAlso
|
|
|
|
\ccRefIdfierPage{CGAL::Parameterizer_traits_3} \\
|
|
\ccRefIdfierPage{CGAL::Fixed_border_parameterizer_3} \\
|
|
\ccRefIdfierPage{CGAL::Barycentric_mapping_parameterizer_3} \\
|
|
\ccRefIdfierPage{CGAL::Discrete_authalic_parameterizer_3} \\
|
|
\ccRefIdfierPage{CGAL::Discrete_conformal_map_parameterizer_3} \\
|
|
\ccRefIdfierPage{CGAL::Mean_value_coordinates_parameterizer_3} \\
|
|
|
|
|
|
\ccExample
|
|
|
|
\begin{ccExampleCode}
|
|
|
|
// CGAL kernel
|
|
typedef CGAL::Cartesian<double> Kernel;
|
|
|
|
// Mesh true type and parameterization adaptor
|
|
typedef CGAL::Polyhedron_3<Kernel> Polyhedron;
|
|
typedef CGAL::Parameterization_polyhedron_adaptor_3<Polyhedron>
|
|
Parameterization_polyhedron_adaptor;
|
|
|
|
// Least Squares Conformal Maps parameterization
|
|
typedef CGAL::LSCM_parameterizer_3<Parameterization_polyhedron_adaptor>
|
|
Parameterizer;
|
|
|
|
int main(int argc,char * argv[])
|
|
{
|
|
Polyhedron mesh;
|
|
...
|
|
|
|
// The parameterization package needs an adaptor to handle Polyhedron_3 meshes
|
|
// The mesh must be a topological disk
|
|
Parameterization_polyhedron_adaptor mesh_adaptor(&mesh);
|
|
|
|
Parameterizer::Error_code err = CGAL::parameterize(&mesh_adaptor, Parameterizer());
|
|
...
|
|
}
|
|
|
|
\end{ccExampleCode}
|
|
|
|
|
|
\end{ccRefClass}
|
|
|
|
% +------------------------------------------------------------------------+
|
|
%%RefPage: end of main body, begin of footer
|
|
% EOF
|
|
% +------------------------------------------------------------------------+
|
|
|