\( \newcommand{\E}{\mathrm{E}} \) \( \newcommand{\A}{\mathrm{A}} \) \( \newcommand{\R}{\mathrm{R}} \) \( \newcommand{\N}{\mathrm{N}} \) \( \newcommand{\Q}{\mathrm{Q}} \) \( \newcommand{\Z}{\mathrm{Z}} \) \( \def\ccSum #1#2#3{ \sum_{#1}^{#2}{#3} } \def\ccProd #1#2#3{ \sum_{#1}^{#2}{#3} }\)
CGAL 4.4 - Planar Parameterization of Triangulated Surface Meshes
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
CGAL::Parameterizer_traits_3< ParameterizationMesh_3 > Class Template Referenceabstract

#include <CGAL/Parameterizer_traits_3.h>

Inherited by CGAL::Fixed_border_parameterizer_3< ParameterizationMesh_3, BorderParameterizer_3, SparseLinearAlgebraTraits_d >, and CGAL::LSCM_parameterizer_3< ParameterizationMesh_3, BorderParameterizer_3, SparseLinearAlgebraTraits_d >.

Definition

The class Parameterizer_traits_3 is the base class of all parameterization methods.

This class is a pure virtual class, thus cannot be instantiated.

This class doesn't do much. Its main goal is to ensure that subclasses will be proper models of the ParameterizerTraits_3 concept:

Is Model Of:
ParameterizerTraits_3

Design Pattern

ParameterizerTraits_3 models are Strategies: they implement a strategy of surface parameterization for models of ParameterizationMesh_3.

See Also
CGAL::Fixed_border_parameterizer_3<ParameterizationMesh_3, BorderParameterizer_3, SparseLinearAlgebraTraits_d>
CGAL::Barycentric_mapping_parameterizer_3<ParameterizationMesh_3, BorderParameterizer_3, SparseLinearAlgebraTraits_d>
CGAL::Discrete_authalic_parameterizer_3<ParameterizationMesh_3, BorderParameterizer_3, SparseLinearAlgebraTraits_d>
CGAL::Discrete_conformal_map_parameterizer_3<ParameterizationMesh_3, BorderParameterizer_3, SparseLinearAlgebraTraits_d>
CGAL::LSCM_parameterizer_3<ParameterizationMesh_3, BorderParameterizer_3, SparseLinearAlgebraTraits_d>
CGAL::Mean_value_coordinates_parameterizer_3<ParameterizationMesh_3, BorderParameterizer_3, SparseLinearAlgebraTraits_d>
Examples:
Surface_mesh_parameterization/Mesh_cutting_parameterization.cpp, Surface_mesh_parameterization/polyhedron_ex_parameterization.cpp, and Surface_mesh_parameterization/Simple_parameterization.cpp.

Public Types

enum  Error_code {
  OK, ERROR_EMPTY_MESH, ERROR_NON_TRIANGULAR_MESH, ERROR_NO_TOPOLOGICAL_DISC,
  ERROR_BORDER_TOO_SHORT, ERROR_NON_CONVEX_BORDER, ERROR_CANNOT_SOLVE_LINEAR_SYSTEM, ERROR_NO_1_TO_1_MAPPING,
  ERROR_OUT_OF_MEMORY, ERROR_WRONG_PARAMETER
}
 List of errors detected by this package. More...
 
typedef ParameterizationMesh_3 Adaptor
 Export ParameterizationMesh_3 template parameter.
 

Public Member Functions

virtual ~Parameterizer_traits_3 ()
 Destructor of base class should be virtual.
 
virtual Error_code parameterize (Adaptor &mesh)=0
 Compute a one-to-one mapping from a 3D surface mesh to a piece of the 2D space. More...
 

Static Public Member Functions

static const char * get_error_message (int error_code)
 Get message corresponding to an error code. More...
 

Protected Types

typedef Adaptor::NT NT
 
typedef Adaptor::Point_2 Point_2
 
typedef Adaptor::Point_3 Point_3
 
typedef Adaptor::Vector_2 Vector_2
 
typedef Adaptor::Vector_3 Vector_3
 
typedef Adaptor::Facet Facet
 
typedef Adaptor::Facet_handle Facet_handle
 
typedef Adaptor::Facet_const_handle Facet_const_handle
 
typedef Adaptor::Facet_iterator Facet_iterator
 
typedef
Adaptor::Facet_const_iterator 
Facet_const_iterator
 
typedef Adaptor::Vertex Vertex
 
typedef Adaptor::Vertex_handle Vertex_handle
 
typedef
Adaptor::Vertex_const_handle 
Vertex_const_handle
 
typedef Adaptor::Vertex_iterator Vertex_iterator
 
typedef
Adaptor::Vertex_const_iterator 
Vertex_const_iterator
 
typedef
Adaptor::Border_vertex_iterator 
Border_vertex_iterator
 
typedef
Adaptor::Border_vertex_const_iterator 
Border_vertex_const_iterator
 
typedef
Adaptor::Vertex_around_facet_circulator 
Vertex_around_facet_circulator
 
typedef
Adaptor::Vertex_around_facet_const_circulator 
Vertex_around_facet_const_circulator
 
typedef
Adaptor::Vertex_around_vertex_circulator 
Vertex_around_vertex_circulator
 
typedef
Adaptor::Vertex_around_vertex_const_circulator 
Vertex_around_vertex_const_circulator
 

Member Enumeration Documentation

template<class ParameterizationMesh_3>
enum CGAL::Parameterizer_traits_3::Error_code

List of errors detected by this package.

Enumerator
OK 

Success.

ERROR_EMPTY_MESH 

Input mesh is empty.

ERROR_NON_TRIANGULAR_MESH 

Input mesh is not triangular.

ERROR_NO_TOPOLOGICAL_DISC 

Input mesh is not a topological disc.

ERROR_BORDER_TOO_SHORT 

This border parameterization requires a longer border.

ERROR_NON_CONVEX_BORDER 

This parameterization method requires a convex border.

ERROR_CANNOT_SOLVE_LINEAR_SYSTEM 

Cannot solve linear system.

ERROR_NO_1_TO_1_MAPPING 

Parameterization failed: no one-to-one mapping.

ERROR_OUT_OF_MEMORY 

Not enough memory.

ERROR_WRONG_PARAMETER 

A method received an unexpected parameter.

Member Function Documentation

template<class ParameterizationMesh_3>
static const char* CGAL::Parameterizer_traits_3< ParameterizationMesh_3 >::get_error_message ( int  error_code)
static

Get message corresponding to an error code.

Parameters
error_codeThe code returned by parameterize()
Returns
The string describing the error code
template<class ParameterizationMesh_3>
virtual Error_code CGAL::Parameterizer_traits_3< ParameterizationMesh_3 >::parameterize ( Adaptor mesh)
pure virtual

Compute a one-to-one mapping from a 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.

Precondition
mesh must be a surface with one connected component.
mesh must be a triangular mesh.

Implemented in CGAL::Fixed_border_parameterizer_3< ParameterizationMesh_3, BorderParameterizer_3, SparseLinearAlgebraTraits_d >, and CGAL::LSCM_parameterizer_3< ParameterizationMesh_3, BorderParameterizer_3, SparseLinearAlgebraTraits_d >.