% +------------------------------------------------------------------------+
% | Reference manual page: Two_vertices_parameterizer_3.tex
% +------------------------------------------------------------------------+
% | 21.09.2005   Laurent Saboret, Pierre Alliez
% | Package: Parameterization
% |
\RCSdef{\RCSTwoverticesparameterizerRev}{$Revision$}
\RCSdefDate{\RCSTwoverticesparameterizerDate}{$Date$}
% |
%%RefPage: end of header, begin of main body
% +------------------------------------------------------------------------+


\begin{ccRefClass}{Two_vertices_parameterizer_3}  %% add template arg's if necessary

%% \ccHtmlCrossLink{}     %% add further rules for cross referencing links
%% \ccHtmlIndexC[class]{} %% add further index entries


\ccDefinition

Two\_vertices\_parameterizer\_3 is the default border parameterizer
for Least Squares Conformal Maps parameterization.

% The section below is automatically generated. Do not edit!
%START-AUTO(\ccDefinition)

The class Two\_vertices\_parameterizer\_3 parameterizes 2 extreme vertices of a 3D surface. This kind of border parameterization is used by free border parameterizations.

Implementation note: To simplify the implementation, BorderParameterizer\_3 models know only the ParameterizationMesh\_3 class. They do not know the parameterization algorithm requirements nor the kind of sparse linear system used.

%END-AUTO(\ccDefinition)

\ccInclude{CGAL/Two_vertices_parameterizer_3.h}


\ccIsModel

% The section below is automatically generated. Do not edit!
%START-AUTO(\ccIsModel)

Model of the BorderParameterizer\_3 concept.

%END-AUTO(\ccIsModel)


\ccHeading{Design Pattern}

% The section below is automatically generated. Do not edit!
%START-AUTO(\ccHeading{Design Pattern})

BorderParameterizer\_3 models are Strategies \cite{cgal:ghjv-dpero-95}: they implement a strategy of border parameterization for models of ParameterizationMesh\_3.

%END-AUTO(\ccHeading{Design Pattern})


\ccParameters

The full template declaration is:

% The section below is automatically generated. Do not edit!
%START-AUTO(\ccParameters)

template$<$  \\
class ParameterizationMesh\_3$>$   \\
class Two\_vertices\_parameterizer\_3;

%END-AUTO(\ccParameters)


\ccTypes

% The section below is automatically generated. Do not edit!
%START-AUTO(\ccTypes)

\ccNestedType{Adaptor}
{
Export ParameterizationMesh\_3 template parameter.
}
\ccGlue

%END-AUTO(\ccTypes)


\ccCreation
\ccCreationVariable{bp}  %% choose variable name for \ccMethod

\ccConstructor{Two_vertices_parameterizer_3();}{default constructor.}

% The section below is automatically generated. Do not edit!
%START-AUTO(\ccCreation)



%END-AUTO(\ccCreation)


\ccOperations

% The section below is automatically generated. Do not edit!
%START-AUTO(\ccOperations)

\ccMethod{Parameterizer_traits_3< Adaptor >::Error_code parameterize_border (Adaptor * mesh);}
{
Map 2 extreme vertices of the 3D mesh and mark them as {\em parameterized}.
Map 2 extreme vertices of the 3D mesh and mark them as {\em parameterized}. Return false on error.
}
\ccGlue
\ccMethod{bool is_border_convex ();}
{
Indicate if border's shape is convex. Meaningless for free border parameterization algorithms.
}
\ccGlue

%END-AUTO(\ccOperations)


\ccSeeAlso

\ccRefIdfierPage{CGAL::Circular_border_arc_length_parameterizer_3}  \\
\ccRefIdfierPage{CGAL::Circular_border_uniform_parameterizer_3}  \\
\ccRefIdfierPage{CGAL::Square_border_arc_length_parameterizer_3}  \\
\ccRefIdfierPage{CGAL::Square_border_uniform_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 with
// the default border parameterization: Two_vertices_parameterizer_3
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
% +------------------------------------------------------------------------+

