Add basic Surface_mesh_parameterization, grouping and some moves to
internal are still missing
|
|
@ -5615,6 +5615,22 @@ Subdivision_method_3/test/Subdivision_method_3/data/corner_with_hole.off -text s
|
|||
Subdivision_method_3/test/Subdivision_method_3/data/corner_with_sharp_edge.off -text svneol=unset#application/octet-stream
|
||||
Subdivision_method_3/test/Subdivision_method_3/data/cross.off -text svneol=unset#application/octet-stream
|
||||
Subdivision_method_3/test/Subdivision_method_3/data/quint_tris.off -text svneol=unset#application/octet-stream
|
||||
Surface_mesh_parameterization/doc/Surface_mesh_parameterization/Classified.txt -text
|
||||
Surface_mesh_parameterization/doc/Surface_mesh_parameterization/PackageDescription.txt -text
|
||||
Surface_mesh_parameterization/doc/Surface_mesh_parameterization/Surface_mesh_parameterization.txt -text
|
||||
Surface_mesh_parameterization/doc/Surface_mesh_parameterization/fig/LSCM.png -text svneol=unset#image/png
|
||||
Surface_mesh_parameterization/doc/Surface_mesh_parameterization/fig/authalic.png -text svneol=unset#image/png
|
||||
Surface_mesh_parameterization/doc/Surface_mesh_parameterization/fig/bimba.jpg -text svneol=unset#image/jpeg
|
||||
Surface_mesh_parameterization/doc/Surface_mesh_parameterization/fig/bimbaDetail.png -text svneol=unset#image/png
|
||||
Surface_mesh_parameterization/doc/Surface_mesh_parameterization/fig/border.png -text svneol=unset#image/png
|
||||
Surface_mesh_parameterization/doc/Surface_mesh_parameterization/fig/conformal.png -text svneol=unset#image/png
|
||||
Surface_mesh_parameterization/doc/Surface_mesh_parameterization/fig/cut.png -text svneol=unset#image/png
|
||||
Surface_mesh_parameterization/doc/Surface_mesh_parameterization/fig/floater.png -text svneol=unset#image/png
|
||||
Surface_mesh_parameterization/doc/Surface_mesh_parameterization/fig/introduction.jpg -text svneol=unset#image/jpeg
|
||||
Surface_mesh_parameterization/doc/Surface_mesh_parameterization/fig/parameterizer_class_diagram.png -text svneol=unset#image/png
|
||||
Surface_mesh_parameterization/doc/Surface_mesh_parameterization/fig/parameterizer_class_diagram_simplified.png -text svneol=unset#image/png
|
||||
Surface_mesh_parameterization/doc/Surface_mesh_parameterization/fig/parameterizers_class_hierarchy.png -text svneol=unset#image/png
|
||||
Surface_mesh_parameterization/doc/Surface_mesh_parameterization/fig/uniform.png -text svneol=unset#image/png
|
||||
Surface_mesh_parameterization/doc/specification/param.pdf -text svneol=unset#application/pdf
|
||||
Surface_mesh_parameterization/doc_tex/Surface_mesh_parameterization/LSCM.png -text svneol=unset#image/png
|
||||
Surface_mesh_parameterization/doc_tex/Surface_mesh_parameterization/authalic.png -text svneol=unset#image/png
|
||||
|
|
|
|||
|
|
@ -735,7 +735,11 @@ EXCLUDE_PATTERNS =
|
|||
# wildcard * is used, a substring. Examples: ANamespace, AClass,
|
||||
# AClass::ANamespace, ANamespace::*Test
|
||||
|
||||
EXCLUDE_SYMBOLS =
|
||||
EXCLUDE_SYMBOLS = Tr \
|
||||
Vb \
|
||||
Cb \
|
||||
Fb \
|
||||
K
|
||||
|
||||
# If the value of the EXAMPLE_PATH tag contains directories, you can use the
|
||||
# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
|
||||
|
|
|
|||
|
|
@ -78,6 +78,24 @@ namespace for the XML file to be processed properly. -->
|
|||
</doxygen>
|
||||
</project>
|
||||
|
||||
<project>
|
||||
<name>Planar Parameterization of Triangulated Surface Meshes</name>
|
||||
<input>../Surface_mesh_parameterization/doc/Surface_mesh_parameterization</input>
|
||||
<input>../Surface_mesh_parameterization/doc/concepts</input>
|
||||
<input>../Surface_mesh_parameterization/include</input>
|
||||
<doxygen>
|
||||
<!-- <string name="STRIP_FROM_PATH">../Surface_mesh_parameterization/doc/Surface_mesh_parameterization/</string> -->
|
||||
<string name="STRIP_FROM_INC_PATH">../Surface_mesh_parameterization/include</string>
|
||||
<string name="GENERATE_TAGFILE">./tags/Surface_mesh_parameterization.tag</string>
|
||||
<string name="IMAGE_PATH">../Surface_mesh_parameterization/doc/Surface_mesh_parameterization/fig</string>
|
||||
<string name="EXAMPLE_PATH">../Surface_mesh_parameterization/examples</string>
|
||||
<bool name="EXTRACT_ALL">false</bool>
|
||||
<!-- <bool name="HIDE_UNDOC_MEMBERS">true</bool> -->
|
||||
<bool name="HIDE_UNDOC_CLASSES">true</bool>
|
||||
<bool name="SHOW_INCLUDE_FILES">false</bool>
|
||||
</doxygen>
|
||||
</project>
|
||||
|
||||
<project>
|
||||
<name>2D Conforming Triangulations and Meshes</name>
|
||||
<input>../Mesh_2/doc</input>
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ iterators) for accessing the elements of a container.
|
|||
\deprecated This class is deprecated, and will be removed in some future \cgal release.
|
||||
Please use CGAL::cpp11::array instead.
|
||||
|
||||
\tparam `T` must be `Assignable`.
|
||||
\tparam T must be `Assignable`.
|
||||
|
||||
*/
|
||||
template< typename T >
|
||||
|
|
|
|||
|
|
@ -0,0 +1,243 @@
|
|||
|
||||
\authors Laurent Saboret, Pierre Alliez and Bruno Lévy
|
||||
|
||||
Parameterizing a surface amounts to finding a one-to-one mapping from
|
||||
a suitable domain to the surface. A good mapping is the one which
|
||||
minimizes either angle or area distortions in some sense. In this
|
||||
package, we focus on triangulated surfaces that are homeomorphic to a
|
||||
disk and on piecewise linear mappings into a planar domain.
|
||||
|
||||
# Classified Reference Pages #
|
||||
|
||||
HEADING:Main Function
|
||||
--------------
|
||||
|
||||
\ref ::CGAL::parameterize
|
||||
|
||||
HEADING:Concepts
|
||||
--------------
|
||||
|
||||
\ref ::ParameterizerTraits_3
|
||||
|
||||
\ref ::BorderParameterizer_3
|
||||
|
||||
\ref ::ParameterizationMesh_3
|
||||
|
||||
\ref ::ParameterizationPatchableMesh_3
|
||||
|
||||
\ref ::SparseLinearAlgebraTraits_d
|
||||
|
||||
\ref ::PolyhedronTraitsWithKernel_3
|
||||
|
||||
HEADING:Surface Parameterization Methods
|
||||
--------------
|
||||
|
||||
This \cgal package implements some of
|
||||
the state-of-the-art parameterization methods:
|
||||
|
||||
<UL>
|
||||
|
||||
<LI>Fixed border:
|
||||
|
||||
<UL>
|
||||
|
||||
<LI>Tutte Barycentric Mapping \cite t-hdg-63.
|
||||
One-to-one mapping is guaranteed for convex border.
|
||||
|
||||
<LI>Floater Mean Value Coordinates \cite cgal:f-mvc-03.
|
||||
One-to-one mapping is guaranteed for convex border.
|
||||
|
||||
<LI>Discrete Conformal Map \cite cgal:eddhls-maam-95.
|
||||
Conditionally guaranteed if all weights are positive and border is convex.
|
||||
|
||||
<LI>Discrete Authalic parameterization \cite cgal:dma-ipsm-02.
|
||||
Conditionally guaranteed if all weights are positive and border is convex.
|
||||
|
||||
</UL>
|
||||
|
||||
<LI>Free border:
|
||||
|
||||
<UL>
|
||||
|
||||
<LI>Least Squares Conformal Maps \cite cgal:lprm-lscm-02.
|
||||
|
||||
</UL>
|
||||
|
||||
</UL>
|
||||
|
||||
\ref ::CGAL::Parameterizer_traits_3<ParameterizationMesh_3>
|
||||
|
||||
\ref ::CGAL::Fixed_border_parameterizer_3<ParameterizationMesh_3, BorderParameterizer_3, SparseLinearAlgebraTraits_d>
|
||||
|
||||
\ref ::CGAL::Barycentric_mapping_parameterizer_3<ParameterizationMesh_3, BorderParameterizer_3, SparseLinearAlgebraTraits_d>
|
||||
|
||||
\ref ::CGAL::Discrete_authalic_parameterizer_3<ParameterizationMesh_3, BorderParameterizer_3, SparseLinearAlgebraTraits_d>
|
||||
|
||||
\ref ::CGAL::Discrete_conformal_map_parameterizer_3<ParameterizationMesh_3, BorderParameterizer_3, SparseLinearAlgebraTraits_d>
|
||||
|
||||
\ref ::CGAL::LSCM_parameterizer_3<ParameterizationMesh_3, BorderParameterizer_3, SparseLinearAlgebraTraits_d>
|
||||
|
||||
\ref ::CGAL::Mean_value_coordinates_parameterizer_3<ParameterizationMesh_3, BorderParameterizer_3, SparseLinearAlgebraTraits_d>
|
||||
|
||||
HEADING:Border Parameterization Methods
|
||||
--------------
|
||||
|
||||
Border parameterization methods define a
|
||||
set of constraints (a constraint specifies two (u,v) coordinates for
|
||||
each instance of a vertex along the border).
|
||||
|
||||
This package implements all common border parameterization methods:
|
||||
<UL>
|
||||
|
||||
<LI>For fixed border methods:
|
||||
|
||||
<UL>
|
||||
|
||||
<LI>the user can select a border
|
||||
parameterization among two common methods: uniform or
|
||||
arc-length parameterizations.
|
||||
|
||||
<LI>one convex shape specified by:
|
||||
|
||||
<UL>
|
||||
|
||||
<LI>one shape among a set of standard ones (circle, square).
|
||||
|
||||
</UL>
|
||||
|
||||
</UL>
|
||||
|
||||
<LI>For free border methods: at least two constraints (the pinned
|
||||
vertices).
|
||||
|
||||
</UL>
|
||||
|
||||
\ref ::CGAL::Circular_border_arc_length_parameterizer_3<ParameterizationMesh_3>
|
||||
|
||||
\ref ::CGAL::Circular_border_uniform_parameterizer_3<ParameterizationMesh_3>
|
||||
|
||||
\ref ::CGAL::Square_border_arc_length_parameterizer_3<ParameterizationMesh_3>
|
||||
|
||||
\ref ::CGAL::Square_border_uniform_parameterizer_3<ParameterizationMesh_3>
|
||||
|
||||
\ref ::CGAL::Two_vertices_parameterizer_3<ParameterizationMesh_3>
|
||||
|
||||
HEADING:Mesh
|
||||
--------------
|
||||
|
||||
The general definition of input meshes handled <I>directly</I> by `CGAL::parameterize()` is:
|
||||
|
||||
<UL>
|
||||
|
||||
<LI>Model of `ParameterizationMesh_3`.
|
||||
|
||||
<LI>Triangulated.
|
||||
|
||||
<LI>2-manifold.
|
||||
|
||||
<LI>Oriented.
|
||||
|
||||
<LI>Homeomorphic to a disc (may have holes).
|
||||
|
||||
</UL>
|
||||
|
||||
This package provides a model of the `ParameterizationMesh_3` concept
|
||||
to access `CGAL::Polyhedron_3<Traits>`:
|
||||
|
||||
`CGAL::Parameterization_polyhedron_adaptor_3<Polyhedron_3_>`
|
||||
|
||||
The meshes supported <I>indirectly</I> by the package can be of any genus and
|
||||
have any number of connected components. If it is not a topological
|
||||
disc, the input mesh has to come with a description of a cutting path (an oriented list of
|
||||
vertices) which is the border of a topological disc. If no cutting path is
|
||||
given as input, we assume that the surface border is the longest border already
|
||||
in the input mesh (the other borders will be considered as holes).
|
||||
|
||||
The `CGAL::Parameterization_mesh_patch_3<ParameterizationPatchableMesh_3>`
|
||||
class is responsible for <I>virtually</I> cutting
|
||||
a patch in a `ParameterizationPatchableMesh_3` mesh.
|
||||
The resulting patch is a topological
|
||||
disk (if the input cutting path is correct)
|
||||
and provides a `ParameterizationMesh_3` interface. It can be used as
|
||||
parameter of `CGAL::parameterize()`.
|
||||
|
||||
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 provides an interface with `CGAL::Polyhedron_3<Traits>`:
|
||||
|
||||
\ref ::CGAL::Parameterization_polyhedron_adaptor_3<Polyhedron_3_>
|
||||
|
||||
HEADING:Output
|
||||
--------------
|
||||
|
||||
A \f$ (u,v)\f$ pair is computed for
|
||||
each inner vertex (i.e. its halfedges share the same \f$ (u,v)\f$ pair),
|
||||
while a \f$ (u,v)\f$ pair is computed for each border halfedge.
|
||||
The user must iterate over the mesh halfedges to get the result.
|
||||
|
||||
HEADING:Sparse Linear Algebra
|
||||
--------------
|
||||
|
||||
Since parameterizing meshes requires
|
||||
efficient representation of sparse matrices and efficient iterative or
|
||||
direct linear solvers, we provide an interface to several
|
||||
sparse linear solvers:
|
||||
<UL>
|
||||
<LI><span class="textsc">Eigen</span> 3.1 (or greater) is the library recommended by \cgalfor solving sparse systems.
|
||||
<LI>OpenNL (authored by Bruno Lévy) is shipped with \cgaland is the default solver.
|
||||
<LI><span class="textsc">Taucs</span> is a direct solver for sparse symmetric matrices.
|
||||
It also includes an out-of-core general solver.
|
||||
</UL>
|
||||
|
||||
`OpenNL::DefaultLinearSolverTraits<COEFFTYPE, MATRIX, VECTOR, SOLVER>` in OpenNL package
|
||||
|
||||
`OpenNL::SymmetricLinearSolverTraits<COEFFTYPE, MATRIX, VECTOR, SOLVER>` in OpenNL package
|
||||
|
||||
\ref ::CGAL::Eigen_solver_traits<T>
|
||||
|
||||
\ref ::CGAL::Taucs_solver_traits<T>
|
||||
|
||||
\ref ::CGAL::Taucs_symmetric_solver_traits<T>
|
||||
|
||||
HEADING:Helper Classes
|
||||
--------------
|
||||
|
||||
\ref ::CGAL::Parameterization_mesh_feature_extractor<ParameterizationMesh_3>
|
||||
|
||||
HEADING:Checks and Assertions
|
||||
--------------
|
||||
|
||||
The package performs the next checks:
|
||||
|
||||
For <I>fixed</I> border parameterizations:
|
||||
<UL>
|
||||
<LI>Preconditions:
|
||||
<UL>
|
||||
<LI>check that the border is mapped onto a convex polygon.
|
||||
<LI>check that the input mesh is triangular.
|
||||
<LI>check that the input mesh is a surface with one connected component.
|
||||
</UL>
|
||||
<LI>Postconditions:
|
||||
<UL>
|
||||
<LI>check one-to-one mapping.
|
||||
</UL>
|
||||
</UL>
|
||||
|
||||
For <I>free</I> border parameterizations:
|
||||
<UL>
|
||||
<LI>Preconditions:
|
||||
<UL>
|
||||
<LI>check that the input mesh is triangular.
|
||||
<LI>check that the input mesh is a surface with one connected component.
|
||||
</UL>
|
||||
<LI>Postconditions:
|
||||
<UL>
|
||||
<LI>check one-to-one mapping.
|
||||
</UL>
|
||||
</UL>
|
||||
|
||||
Assertions are optional checks. The assertion flags for the package
|
||||
use `SURFACE_MESH_PARAMETERIZATION` in their names (<I>e.g.</I>,
|
||||
`CGAL_SURFACE_MESH_PARAMETERIZATION_NO_ASSERTIONS`).
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
/// \defgroup PkgSurfaceParameterization Planar Parameterization of Triangulated Surface Meshes
|
||||
/// \defgroup PkgSurfaceParameterizationConcepts Concepts
|
||||
/// \ingroup PkgSurfaceParameterization
|
||||
s
|
||||
/*!
|
||||
\addtogroup PkgSurfaceParameterization
|
||||
\todo check generated documentation
|
||||
\PkgDescriptionBegin{Planar Parameterization of Triangulated Surface Meshes}
|
||||
\PkgPicture{bimbaDetail.png}
|
||||
\PkgAuthor{Laurent Saboret, Pierre Alliez and Bruno Lévy}
|
||||
\PkgDesc{Parameterizing a surface amounts to finding a one-to-one mapping from a suitable domain to the surface. In this package, we focus on triangulated surfaces that are homeomorphic to a disk and on piecewise linear mappings into a planar domain. This package implements some of the state-of-the-art surface mesh parameterization methods, such as least squares conformal maps, discrete conformal map, discrete authalic parameterization, Floater mean value coordinates or Tutte barycentric mapping.}
|
||||
\PkgSince{3.2}
|
||||
\cgalbib{cgal:sal-pptsm2}
|
||||
\license{\ref licensesGPL "GPL"}
|
||||
\PkgDescriptionEnd
|
||||
*/
|
||||
|
|
@ -0,0 +1,908 @@
|
|||
*
|
||||
\page chapsurface_mesh_parameterization Planar Parameterization of Triangulated Surface Meshes
|
||||
|
||||
namespace CGAL {
|
||||
/*!
|
||||
|
||||
\mainpage Planar Parameterization of Triangulated Surface Meshes
|
||||
|
||||
\anchor chapsurface_mesh_parameterization
|
||||
|
||||
\authors Laurent Saboret, Pierre Alliez and Bruno Lévy
|
||||
|
||||
# Introduction #
|
||||
|
||||
Parameterizing a surface amounts to finding a one-to-one mapping from
|
||||
a suitable domain to the surface. A good mapping is the one which
|
||||
minimizes either angle distortions (conformal parameterization) or
|
||||
area distortions (equiareal parameterization) in some sense. In this
|
||||
package, we focus on parameterizing triangulated surfaces which are
|
||||
homeomorphic to a disk, and on piecewise linear mappings onto a planar
|
||||
domain.
|
||||
|
||||
Although the main motivation behind the first parameterization methods
|
||||
was the application to texture mapping, it is now frequently used for
|
||||
mapping more sophisticated modulation signals (such as normal,
|
||||
transparency, reflection or light modulation maps), fitting scattered
|
||||
data, re-parameterizing spline surfaces, repairing CAD models,
|
||||
approximating surfaces and remeshing.
|
||||
|
||||
This \cgal package implements some of the state-of-the-art
|
||||
surface parameterization methods, such as least squares conformal maps,
|
||||
discrete conformal map, discrete authalic
|
||||
parameterization, Floater mean value coordinates or Tutte barycentric
|
||||
mapping. These methods mainly distinguish by the distortion they
|
||||
minimize (angles vs. areas), by the constrained border onto the
|
||||
planar domain (convex polygon vs. free border) and by the guarantees
|
||||
provided in terms of bijective mapping.
|
||||
|
||||
The package proposes currently an interface with `CGAL::Polyhedron_3<Traits>`
|
||||
data structure.
|
||||
|
||||
Since parameterizing meshes require efficient representation of sparse
|
||||
matrices and efficient iterative or direct linear solvers, we provide
|
||||
a unified interface to linear solver libraries (<span class="textsc">Eigen</span> and <span class="textsc">Taucs</span>),
|
||||
and propose a separate package devoted to OpenNL sparse
|
||||
linear solver.
|
||||
|
||||
Note that linear solvers commonly use double precision floating point
|
||||
numbers. Therefore, this package is intended to be used with a \cgal Cartesian kernel with doubles.
|
||||
|
||||
The intended audience of this package is researchers, developers or
|
||||
students developing algorithms around parameterization of triangle
|
||||
meshes for geometry processing as well as for signal mapping on
|
||||
triangulated surfaces.
|
||||
|
||||
\anchor Surface_mesh_parameterizationfigintroduction
|
||||
\image html introduction.jpg
|
||||
<center><b>
|
||||
Texture mapping via Least Squares Conformal Maps parameterization. Top: original mesh and texture. Bottom: parameterizedmesh (left: parameter space, right: textured mesh).
|
||||
</b></center>
|
||||
|
||||
# Basics #
|
||||
|
||||
## Default Surface Parameterization ##
|
||||
|
||||
From the user point of view, the simplest entry point to this package
|
||||
is the following function:
|
||||
|
||||
\code{.cpp}
|
||||
|
||||
// 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 piecewise linear mapping is guaranteed. The result is a
|
||||
// pair of (u,v) parameter coordinates for each vertex of the input mesh.
|
||||
//
|
||||
// Preconditions: mesh must be a triangle mesh surface with one connected component.
|
||||
Parameterizer_traits_3<ParameterizationMesh_3>::Error_code parameterize (ParameterizationMesh_3 & mesh);
|
||||
\endcode
|
||||
|
||||
The function `CGAL::parameterize()` applies a default surface 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 `ParameterizationMesh_3` concept defines the input meshes handled by `CGAL::parameterize()`. See Section \ref secInputMeshforparameterize. The result is stored into the (u,v) fields of the mesh halfedges.
|
||||
|
||||
Note: `CGAL::Parameterizer_traits_3<ParameterizationMesh_3>` is the (pure virtual) superclass of all surface parameterizations and defines the error codes.
|
||||
|
||||
\subsection secInputMeshforparameterize Input Mesh for parameterize()
|
||||
|
||||
The input meshes handled <I>directly</I> by `CGAL::parameterize()` must be models of `ParameterizationMesh_3`, triangulated, 2-manifold, oriented, and homeomorphic to discs (possibly with holes).
|
||||
|
||||
Note: `ParameterizationMesh_3` is a general concept to access a
|
||||
polyhedral mesh. It is optimized for the `Surface_mesh_parameterization` package
|
||||
only in the sense that it
|
||||
defines the accessors to fields specific to the parameterization domain
|
||||
(`index`, `u`, `v`, `is_parameterized`).
|
||||
The extra constraints needed by the surface parameterization methods (triangulated,
|
||||
2-manifold, homeomorphic to a disc) are not part of the concept and
|
||||
are checked at runtime.
|
||||
|
||||
This package provides a model of the `ParameterizationMesh_3` concept
|
||||
to access `CGAL::Polyhedron_3<Traits>`:
|
||||
|
||||
`CGAL::Parameterization_polyhedron_adaptor_3<Polyhedron_3_>`
|
||||
|
||||
We will see later that `CGAL::parameterize()` can support <I>indirectly</I>
|
||||
meshes that are not topological disks.
|
||||
|
||||
## Default Parameterization Example ##
|
||||
|
||||
`Simple_parameterization.cpp` applies the default parameterization to a
|
||||
`CGAL::Polyhedron_3<Traits>` mesh (must be a topological disk).
|
||||
Eventually, it extracts the result from halfedges and prints it.
|
||||
|
||||
\cgalexample{Simple_parameterization.cpp}
|
||||
|
||||
## Enhanced parameterize() function ##
|
||||
|
||||
This package provides a second `CGAL::parameterize()` entry point
|
||||
where the user can specify a parameterization method:
|
||||
|
||||
\code{.cpp}
|
||||
// Compute a one-to-one mapping from a 3D triangle surface 'mesh' to a
|
||||
// simple 2D domain. The mapping is piecewise linear on the triangle
|
||||
// mesh. The result is a pair (u,v) of parameter coordinates for each
|
||||
// vertex of the input mesh. One-to-one mapping may be guaranteed or
|
||||
// not, depending on the chosen `ParametizerTraits_3` algorithm.
|
||||
// Preconditions: 'mesh' must be a triangle surface mesh with one
|
||||
// connected component, and the mesh border must be mapped onto a convex
|
||||
// polygon (for fixed border parameterizations).
|
||||
Parameterizer_traits_3<ParameterizationMesh_3>::Error_code parameterize (ParameterizationMesh_3 & mesh, ParameterizerTraits_3 parameterizer);
|
||||
\endcode
|
||||
|
||||
## Introduction to the Package Concepts ##
|
||||
|
||||
## The ParameterizerTraits_3 concept ##
|
||||
|
||||
This \cgal package implements some of the state-of-the-art
|
||||
surface parameterization methods, such as Least Squares Conformal Maps,
|
||||
Discrete Conformal Map, Discrete Authalic
|
||||
Parameterization, Floater Mean Value Coordinates or Tutte Barycentric
|
||||
Mapping. These methods are provided as models of the
|
||||
`ParameterizerTraits_3` concept. See Section \ref secSurfaceParameterizationMethods.
|
||||
|
||||
Each of these surface parameterization methods is templated by
|
||||
the input mesh type, a border parameterization and a solver:
|
||||
|
||||
\anchor Surface_mesh_parameterizationfigparameterizer_class_diagram_simplified
|
||||
\image html parameterizer_class_diagram_simplified.png "A parameterizer UML class diagram (simplified)."
|
||||
|
||||
## The BorderParameterizer_3 concept ##
|
||||
|
||||
Parameterization methods for
|
||||
borders are used as traits classes modifying the behavior of
|
||||
`ParameterizerTraits_3` models.
|
||||
They are provided as models of the `BorderParameterizer_3` concept.
|
||||
See Sections \ref secBorderParameterizationsforFixedMethods
|
||||
and \ref secBorderParameterizationsforFreeMethods.
|
||||
|
||||
## The SparseLinearAlgebraTraits_d concept ##
|
||||
|
||||
This package solves sparse linear systems using solvers which are models
|
||||
of `SparseLinearAlgebraTraits_d`. See Section \ref secSparseLinearAlgebra.
|
||||
|
||||
## The ParameterizationMesh_3 and ParameterizationPatchableMesh_3 Concepts ##
|
||||
|
||||
As described in Section \ref secInputMeshforparameterize
|
||||
the input meshes handled by `CGAL::parameterize()`
|
||||
must be models of the `ParameterizationMesh_3` concept. The surface parameterization methods provided by this package only support
|
||||
surfaces which are homeomorphic to disks, possibly with holes. Nevertheless meshed with arbitrary topology and number of connected components can be parameterized, provided that the user specifies a <I>cut graph</I> (an oriented list of
|
||||
vertices) which is the border of a topological disc. If no cut graph is
|
||||
specified as input, the longest border of the input mesh is taken by default, the others being considered as holes.
|
||||
|
||||
For this purpose, the
|
||||
`CGAL::Parameterization_mesh_patch_3<ParameterizationPatchableMesh_3>`
|
||||
class is responsible for <I>virtually</I> cutting
|
||||
a patch into a `ParameterizationPatchableMesh_3` mesh.
|
||||
The resulting patch is a topological
|
||||
disk (if the input cutting path is correct)
|
||||
and provides a `ParameterizationMesh_3` interface. It can be used as
|
||||
parameter for the function `CGAL::parameterize()`.
|
||||
|
||||
`ParameterizationPatchableMesh_3` inherits from `ParameterizationMesh_3`,
|
||||
thus is a concept for a 3D surface mesh.
|
||||
`ParameterizationPatchableMesh_3` adds the ability to support patches and
|
||||
virtual seams. <I>Patches</I> are a subset of a 3D mesh.
|
||||
<I>Virtual seams</I> behave as if the surface was cut along a cut graph. More information is provided in Section \ref secCuttingaMesh.
|
||||
|
||||
\section secSurfaceParameterizationMethods Surface Parameterization Methods
|
||||
|
||||
This \cgal package implements some of the state-of-the-art
|
||||
surface parameterization methods, such as Least Squares Conformal Maps,
|
||||
Discrete Conformal Map, Discrete Authalic
|
||||
Parameterization, Floater Mean Value Coordinates or Tutte Barycentric
|
||||
Mapping. These methods are provided as models of the
|
||||
`ParameterizerTraits_3` concept.
|
||||
|
||||
## Fixed Border Surface Parameterizations ##
|
||||
|
||||
Fixed Border Surface Parameterizations need a set of constraints: two
|
||||
(u,v) coordinates for each vertex along the border.
|
||||
Such border parameterizations are described in Section
|
||||
\ref secBorderParameterizationsforFixedMethods.
|
||||
|
||||
## Tutte Barycentric Mapping ##
|
||||
|
||||
`CGAL::Barycentric_mapping_parameterizer_3<ParameterizationMesh_3, BorderParameterizer_3, SparseLinearAlgebraTraits_d>`
|
||||
|
||||
The Barycentric Mapping parameterization method has been introduced by
|
||||
Tutte \cite t-hdg-63. In parameter space, each vertex is
|
||||
placed at the barycenter of its neighbors to achieve the so-called
|
||||
convex combination condition. This algorithm amounts to solve one
|
||||
sparse linear solver for each set of parameter coordinates, with a
|
||||
#vertices x #vertices sparse and symmetric positive definite matrix
|
||||
(if the border vertices are eliminated from the linear system).
|
||||
A coefficient \f$ (i, j)\f$ of the matrix is set to 1 for an edge linking
|
||||
the vertex \f$ v_i\f$ to the vertex \f$ v_j\f$, to minus the degree of the
|
||||
vertex \f$ v_i\f$ for a diagonal element, and to 0 for any other matrix
|
||||
entry. Although a bijective mapping is guaranteed when the border is convex,
|
||||
this method does not minimize angles nor areas distortion.
|
||||
|
||||
\anchor Surface_mesh_parameterizationfiguniform
|
||||
\iamge html uniform.png "Left: Tutte barycentric mapping parameterization (the red line depicts the cut graph). Right: parameter space."
|
||||
|
||||
## Discrete Conformal Map ##
|
||||
|
||||
`CGAL::Discrete_conformal_map_parameterizer_3<ParameterizationMesh_3, BorderParameterizer_3, SparseLinearAlgebraTraits_d>`
|
||||
|
||||
Discrete conformal map parameterization has been introduced by Eck et
|
||||
al. to the graphics community \cite cgal:eddhls-maam-95. It attempts to
|
||||
lower angle deformation by minimizing a discrete version of the
|
||||
Dirichlet energy as derived by Pinkall and
|
||||
Polthier \cite cgal:pp-cdmsc-93. A one-to-one mapping is guaranteed
|
||||
only when the two following conditions are fulfilled: the barycentric mapping
|
||||
condition (each vertex in parameter space is a convex combination if
|
||||
its neighboring vertices), and the border is convex.
|
||||
This method solves two #vertices x #vertices sparse linear
|
||||
systems. The matrix (the same for both systems) is sparse and symmetric definite
|
||||
positive (if the border vertices are eliminated from the linear system
|
||||
and if the mesh contains no hole),
|
||||
thus can be efficiently solved using dedicated linear solvers.
|
||||
|
||||
\anchor Surface_mesh_parameterizationfigconformal
|
||||
\image html conformal.png "Left: discrete conformal map. Right: parameter space."
|
||||
|
||||
## Floater Mean Value Coordinates ##
|
||||
|
||||
`CGAL::Mean_value_coordinates_parameterizer_3<ParameterizationMesh_3, BorderParameterizer_3, SparseLinearAlgebraTraits_d>`
|
||||
|
||||
The mean value coordinates parameterization method has been introduced
|
||||
by Floater \cite cgal:f-mvc-03. Each vertex in parameter space is
|
||||
optimized so as to be a convex combination of its neighboring
|
||||
vertices. The barycentric coordinates are this time unconditionally
|
||||
positive, by deriving an application of the mean theorem for harmonic
|
||||
functions. This method is in essence an approximation of the discrete conformal
|
||||
maps, with a guaranteed one-to-one mapping when the border is convex.
|
||||
This method solves two #vertices x #vertices sparse linear systems. The matrix (the
|
||||
same for both systems) is asymmetric.
|
||||
|
||||
\anchor Surface_mesh_parameterizationfigfloater
|
||||
\image html floater.png "Floater Mean Value Coordinates"
|
||||
|
||||
## Discrete Authalic parameterization ##
|
||||
|
||||
`CGAL::Discrete_authalic_parameterizer_3<ParameterizationMesh_3, BorderParameterizer_3, SparseLinearAlgebraTraits_d>`
|
||||
|
||||
The discrete authalic parameterization method has been introduced by
|
||||
Desbrun et al. \cite cgal:dma-ipsm-02. It corresponds to
|
||||
a weak formulation of an area-preserving method, and in essence
|
||||
locally minimizes the area distortion. A one-to-one mapping is
|
||||
guaranteed only if the convex combination condition is fulfilled and
|
||||
the border is convex. This method solves two
|
||||
#vertices x #vertices sparse linear systems. The matrix (the same
|
||||
for both systems) is asymmetric.
|
||||
|
||||
\anchor Surface_mesh_parameterizationfigauthalic
|
||||
\image html authalic.png "Discrete Authalic Parameterization"
|
||||
|
||||
\subsection secBorderParameterizationsforFixedMethods Border Parameterizations for Fixed Methods
|
||||
|
||||
Parameterization methods for
|
||||
borders are used as traits classes modifying the behavior of
|
||||
`ParameterizerTraits_3` models.
|
||||
They are provided as models of the `BorderParameterizer_3` concept.
|
||||
Border parameterizations for fixed border surface parameterizations
|
||||
are a family of methods to define a set of constraints, namely two
|
||||
\f$ u,v\f$ coordinates for each vertex along the border.
|
||||
|
||||
<UL>
|
||||
|
||||
<LI>The user can select a border parameterization among
|
||||
two commonly used methods: uniform or arc-length parameterization.
|
||||
|
||||
<I>Usage:</I>
|
||||
|
||||
Uniform border parameterization is more stable, although it gives
|
||||
poor visual results. The
|
||||
arc-length border parameterization is used by default.
|
||||
|
||||
<LI>One convex shape specified by one shape among two standard ones:
|
||||
a circle or a square.
|
||||
|
||||
<I>Usage:</I>
|
||||
|
||||
The circular border parameterization is used by default as it
|
||||
corresponds to the simplest convex shape. The square border
|
||||
parameterization is commonly used for texture mapping.
|
||||
|
||||
</UL>
|
||||
|
||||
`CGAL::Circular_border_arc_length_parameterizer_3<ParameterizationMesh_3>`
|
||||
|
||||
`CGAL::Circular_border_uniform_parameterizer_3<ParameterizationMesh_3>`
|
||||
|
||||
`CGAL::Square_border_arc_length_parameterizer_3<ParameterizationMesh_3>`
|
||||
|
||||
`CGAL::Square_border_uniform_parameterizer_3<ParameterizationMesh_3>`
|
||||
|
||||
\anchor Surface_mesh_parameterizationfigcircular_border
|
||||
\image html border.png "Left: Julius Cesar mask parameterization with Authalic/circular border. Right: Julius Cesar mask's image with Floater/square border."
|
||||
|
||||
## Free Border Surface Parameterizations ##
|
||||
|
||||
## Least Squares Conformal Maps ##
|
||||
|
||||
`CGAL::LSCM_parameterizer_3<ParameterizationMesh_3, BorderParameterizer_3, SparseLinearAlgebraTraits_d>`
|
||||
|
||||
The Least Squares Conformal Maps (LSCM) parameterization method has
|
||||
been introduced by Lévy et al. \cite cgal:lprm-lscm-02.
|
||||
It corresponds to a conformal method with a free border (at least two
|
||||
vertices have to be constrained to obtain a unique solution), which
|
||||
allows further lowering of the angle distortion. A one-to-one mapping
|
||||
is not guaranteed by this method. It solves a (2 \f$ \times\f$
|
||||
#triangles) \f$ \times\f$ #vertices sparse linear system in the least squares sense,
|
||||
which implies solving a symmetric matrix.
|
||||
|
||||
\anchor Surface_mesh_parameterizationfigLSCM
|
||||
\image html LSCM.png "Least squares conformal maps."
|
||||
|
||||
\subsection secBorderParameterizationsforFreeMethods Border Parameterizations for Free Methods
|
||||
|
||||
Parameterization methods for
|
||||
borders are used as traits classes modifying the behavior of
|
||||
`ParameterizerTraits_3` models. They are provided as models of the `BorderParameterizer_3` concept.
|
||||
The border parameterizations associated to free border surface
|
||||
parameterization methods define only two constraints: the pinned vertices.
|
||||
|
||||
<UL>
|
||||
|
||||
<LI>`CGAL::Two_vertices_parameterizer_3<ParameterizationMesh_3>`
|
||||
|
||||
<I>Usage:</I>
|
||||
|
||||
`CGAL::Two_vertices_parameterizer_3<ParameterizationMesh_3>` is the default
|
||||
free border parameterization, and is the only one available
|
||||
in the current version of this package.
|
||||
|
||||
</UL>
|
||||
|
||||
## Discrete Authalic Parameterization Example ##
|
||||
|
||||
`Authalic_parameterization.cpp` computes a Discrete Authalic parameterization
|
||||
over a `CGAL::Polyhedron_3<Traits>` mesh. Specifying a specific surface parameterization
|
||||
instead of the default one means using the second parameter of `CGAL::parameterize()`. The
|
||||
differences with the first example `Simple_parameterization.cpp` are:
|
||||
|
||||
\code{.cpp}
|
||||
|
||||
#include <CGAL/Discrete_authalic_parameterizer_3.h>
|
||||
|
||||
...
|
||||
|
||||
//***************************************
|
||||
// Discrete Authalic Parameterization
|
||||
//***************************************
|
||||
|
||||
typedef CGAL::Discrete_authalic_parameterizer_3<Parameterization_polyhedron_adaptor>
|
||||
Parameterizer;
|
||||
|
||||
Parameterizer::Error_code err = CGAL::parameterize(mesh_adaptor, Parameterizer());
|
||||
|
||||
...
|
||||
|
||||
\endcode
|
||||
|
||||
## Square Border Arc Length Parameterization Example ##
|
||||
|
||||
`Square_border_parameterization.cpp` computes a Floater mean value coordinates
|
||||
parameterization with a square border arc length parameterization.
|
||||
Specifying a specific border parameterization
|
||||
instead of the default one means using the second parameter of
|
||||
`CGAL::Mean_value_coordinates_parameterizer_3<ParameterizationMesh_3, BorderParameterizer_3, SparseLinearAlgebraTraits_d>`.
|
||||
The differences with the first example `Simple_parameterization.cpp` are:
|
||||
|
||||
\code{.cpp}
|
||||
|
||||
#include <CGAL/Square_border_parameterizer_3.h>
|
||||
|
||||
...
|
||||
|
||||
//***************************************
|
||||
// Floater Mean Value Coordinates parameterization
|
||||
// with square border
|
||||
//***************************************
|
||||
|
||||
// Square border parameterizer
|
||||
typedef CGAL::Square_border_arc_length_parameterizer_3<Parameterization_polyhedron_adaptor>
|
||||
Border_parameterizer;
|
||||
|
||||
// Floater Mean Value Coordinates parameterizer with square border
|
||||
typedef CGAL::Mean_value_coordinates_parameterizer_3<Parameterization_polyhedron_adaptor,
|
||||
Border_parameterizer>
|
||||
Parameterizer;
|
||||
|
||||
Parameterizer::Error_code err = CGAL::parameterize(mesh_adaptor, Parameterizer());
|
||||
|
||||
...
|
||||
|
||||
\endcode
|
||||
|
||||
\section secSparseLinearAlgebra Sparse Linear Algebra
|
||||
|
||||
Parameterizing triangle meshes requires both efficient representation
|
||||
of sparse matrices and efficient iterative or direct linear
|
||||
solvers. We provide links to libraries (<span class="textsc">Eigen</span>, <span class="textsc">Taucs</span>)
|
||||
and include a separate package devoted to OpenNL sparse linear solver.
|
||||
|
||||
## List of Solvers ##
|
||||
|
||||
We provide an interface to several sparse linear solvers, as models
|
||||
of the `SparseLinearAlgebraTraits_d` concept:
|
||||
|
||||
<UL>
|
||||
<LI>An interface to sparse solvers from the \ref thirdpartyOpenNL library \cite cgal:l-nmdgp-05 is provided through classes
|
||||
`OpenNL::DefaultLinearSolverTraits<COEFFTYPE, MATRIX, VECTOR, SOLVER>` and
|
||||
`OpenNL::SymmetricLinearSolverTraits<COEFFTYPE, MATRIX, VECTOR, SOLVER>`. The OpenNL library version shipped with \cgal is a lightweight default sparse linear solver. It does not support large systems, but it is portable and
|
||||
supports exact number types.
|
||||
|
||||
<LI>An interface to all sparse solvers from the \ref thirdpartyEigen library is provided through the class
|
||||
`CGAL::Eigen_solver_traits<T>`. This solver traits class can be used for an iterative or a direct,
|
||||
symmetric or general sparse solvers. The <span class="textsc">Eigen</span> solver to be used must be given as template parameter.
|
||||
|
||||
<LI>An interface to sparse solvers from the\ref thirdpartyTaucs library is provided through the classes
|
||||
`CGAL::Taucs_solver_traits<T>` (out-of-core general sparse solver) and
|
||||
`CGAL::Taucs_symmetric_solver_traits<T>` (direct symmetric sparse solver).
|
||||
\ref thirdpartyTaucs is no longer maintained and we recommend to use \ref thirdpartyEigen instead.
|
||||
|
||||
</UL>
|
||||
|
||||
## <span class="textsc">Eigen</span> Solver Example ##
|
||||
|
||||
The example `examples/Surface_mesh_parameterization/Eigen_parameterization.cpp` computes the
|
||||
default parameterization method (Floater mean value coordinates with a circular border),
|
||||
but specifically instantiates an <span class="textsc">Eigen</span> solver. Specifying a specific solver
|
||||
instead of the default one (OpenNL) means using the third parameter of
|
||||
`CGAL::Mean_value_coordinates_parameterizer_3<ParameterizationMesh_3, BorderParameterizer_3, SparseLinearAlgebraTraits_d>`. The differences with the first
|
||||
example `examples/Surface_mesh_parameterization/Simple_parameterization.cpp` are:
|
||||
|
||||
\code{.cpp}
|
||||
|
||||
#include <CGAL/Eigen_solver_traits.h>
|
||||
|
||||
...
|
||||
|
||||
//***************************************
|
||||
// Floater Mean Value Coordinates parameterization
|
||||
// (circular border) with Eigen solver
|
||||
//***************************************
|
||||
|
||||
// Circular border parameterizer (the default)
|
||||
typedef CGAL::Circular_border_arc_length_parameterizer_3<Parameterization_polyhedron_adaptor>
|
||||
Border_parameterizer;
|
||||
// Eigen solver
|
||||
typedef CGAL::Eigen_solver_traits<> Solver;
|
||||
|
||||
// Floater Mean Value Coordinates parameterization
|
||||
// (circular border) with Eigen solver
|
||||
typedef CGAL::Mean_value_coordinates_parameterizer_3<Parameterization_polyhedron_adaptor,
|
||||
Border_parameterizer,
|
||||
Solver>
|
||||
Parameterizer;
|
||||
|
||||
Parameterizer::Error_code err = CGAL::parameterize(mesh_adaptor, Parameterizer());
|
||||
|
||||
...
|
||||
|
||||
\endcode
|
||||
|
||||
\section secCuttingaMesh Cutting a Mesh
|
||||
|
||||
## Computing a Cut Graph ##
|
||||
|
||||
All surface parameterization methods proposed in this package only
|
||||
deal with meshes which are homeomorphic (topologically equivalent) to discs.
|
||||
Nevertheless meshes with arbitrary topology and number of connected components car be parameterized, provided that the user specifies a cut graph (an oriented list of vertices), which is the border of a topological disc. If no cut graph is
|
||||
provided as input, the longest border already
|
||||
in the input mesh is taken as default border, all other borders being considered as holes. Note that only the inside part (i.e., one connected component) of the given border is parameterized.
|
||||
|
||||
\anchor Surface_mesh_parameterizationfigcut
|
||||
\image html cut.png "Cut Graph"
|
||||
|
||||
This package does not provide any algorithm to transform an arbitrary mesh
|
||||
into a topological disk, the user being responsible
|
||||
for generating such a cut graph. Nevertheless, we provide in
|
||||
`polyhedron_ex_parameterization.cpp`
|
||||
a simple cutting algorithm for the sake of completeness.
|
||||
|
||||
## Applying a Cut ##
|
||||
|
||||
The surface parameterization classes in this package only <I>directly</I> support
|
||||
surfaces which are homeomorphic to disks (models of
|
||||
`ParameterizationMesh_3`). This software design simplifies the
|
||||
implementation of all new parameterization methods.
|
||||
|
||||
The `CGAL::Parameterization_mesh_patch_3<ParameterizationPatchableMesh_3>`
|
||||
class is responsible for <I>virtually</I> cutting
|
||||
a patch in a `ParameterizationPatchableMesh_3` mesh.
|
||||
The resulting patch is a topological
|
||||
disk (if the cut graph is correct)
|
||||
and provides a `ParameterizationMesh_3` interface. It can be used as
|
||||
parameter of `CGAL::parameterize()`.
|
||||
|
||||
`ParameterizationPatchableMesh_3` inherits from concept `ParameterizationMesh_3`,
|
||||
thus is a concept for a 3D surface mesh.
|
||||
`ParameterizationPatchableMesh_3` adds the ability to support patches and
|
||||
virtual seams. <I>Patches</I> are a subset of a 3D mesh.
|
||||
<I>Virtual seams</I> behave exactly as if the surface was cut along a certain graph.
|
||||
|
||||
The `ParameterizationMesh_3` interface with the Polyhedron is both a model of
|
||||
`ParameterizationMesh_3` and `ParameterizationPatchableMesh_3`:
|
||||
|
||||
`CGAL::Parameterization_polyhedron_adaptor_3<Polyhedron_3_>`
|
||||
|
||||
Note that this class is a decorator which adds <I>on the fly</I>
|
||||
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 `Polyhedron_ex`
|
||||
class in `polyhedron_ex_parameterization.cpp` example.
|
||||
|
||||
## Cutting a Mesh Example ##
|
||||
|
||||
`Mesh_cutting_parameterization.cpp` <I>virtually</I> cuts a
|
||||
`CGAL::Polyhedron_3<Traits>` mesh
|
||||
to make it a topological disk, then applies the default parameterization:
|
||||
|
||||
\cgalexample{Mesh_cutting_parameterization.cpp}
|
||||
|
||||
# Output #
|
||||
|
||||
Parameterization methods compute \f$ (u,v)\f$ fields for each vertex
|
||||
of the input mesh, with the seam vertices being virtually duplicated (thanks
|
||||
to `CGAL::Parameterization_mesh_patch_3<ParameterizationPatchableMesh_3>`).
|
||||
To support this duplication,
|
||||
`CGAL::Parameterization_polyhedron_adaptor_3<Polyhedron_3_>` stores
|
||||
the result in the \f$ (u,v)\f$ fields of the input mesh halfedges.
|
||||
A \f$ (u,v)\f$ pair is computed for
|
||||
each inner vertex (i.e. its halfedges share the same \f$ (u,v)\f$ pair),
|
||||
while a \f$ (u,v)\f$ pair is computed for each border halfedge.
|
||||
The user has to iterate over the mesh halfedges to get the result.
|
||||
Note that \f$ (u,v)\f$ fields do not exist in `CGAL::Polyhedron_3<Traits>`,
|
||||
thus the output traversal is specific to the way the (u,v) fields are implemented by the adaptor.
|
||||
|
||||
## EPS Output Example ##
|
||||
|
||||
`Complete_parameterization_example.cpp` is a complete parameterization
|
||||
example which outputs the resulting parameterization to a EPS file. It gets the \f$ (u,v)\f$ fields computed by a parameterization method over a `CGAL::Polyhedron_3<Traits>` mesh with a
|
||||
`CGAL::Parameterization_polyhedron_adaptor_3<Polyhedron_3_>` adaptor:
|
||||
|
||||
\cgalexample{Complete_parameterization_example.cpp}
|
||||
|
||||
# Complexity and Guarantees #
|
||||
|
||||
## Parameterization Methods and Guarantees ##
|
||||
|
||||
<UL>
|
||||
|
||||
<LI>Fixed boundaries
|
||||
|
||||
<UL>
|
||||
|
||||
<LI>One-to-one mapping
|
||||
|
||||
Tutte's theorem guarantees a one-to-one mapping provided that the weights are all positive
|
||||
and the border convex.
|
||||
It is the case for Tutte barycentric mapping and Floater mean value coordinates.
|
||||
It is not always the case for discrete conformal map (cotangents) and
|
||||
discrete authalic parameterization.
|
||||
|
||||
<LI>Non-singularity of the matrix
|
||||
|
||||
Geshorgin's theorem guarantees the convergence of the solver if the matrix is diagonal dominant.
|
||||
This is the case with positive weights (Tutte barycentric mapping and Floater mean value coordinates).
|
||||
|
||||
</UL>
|
||||
|
||||
<LI>Free boundaries
|
||||
|
||||
<UL>
|
||||
|
||||
<LI>One-to-one mapping
|
||||
|
||||
No guarantee is provided by LSCM (both global overlaps and triangle flips can
|
||||
occur).
|
||||
|
||||
<LI>Non-singularity of the matrix
|
||||
|
||||
For LSCM, the matrix of the system is the Gram matrix of a matrix with maximal rank,
|
||||
and is therefore non-singular (Gram theorem).
|
||||
|
||||
</UL>
|
||||
|
||||
</UL>
|
||||
|
||||
## Precision ##
|
||||
|
||||
Two algorithms of this package construct the sparse linear system(s)
|
||||
using trigonometric functions, and are this incompatible with exact arithmetic:
|
||||
|
||||
<UL>
|
||||
|
||||
<LI>Floater mean value coordinates
|
||||
|
||||
<LI>Circular border parameterization
|
||||
|
||||
</UL>
|
||||
|
||||
On the other hand, linear solvers commonly use double precision floating point
|
||||
numbers.
|
||||
|
||||
OpenNL's BICGSTAB solver (accessible through the
|
||||
`OpenNL::DefaultLinearSolverTraits<COEFFTYPE, MATRIX, VECTOR, SOLVER>` interface)
|
||||
is the only solver supported by this package which
|
||||
computes exact results, when used with an exact arithmetic. This package is
|
||||
intended to be used mainly with a \cgal Cartesian kernel with doubles.
|
||||
|
||||
## OpenNL's BICGSTAB Solver with an Exact Arithmetic ##
|
||||
|
||||
The BICGSTAB conjugate gradient is in disguise a direct solver.
|
||||
In a nutshell, it computes a vector basis
|
||||
orthogonal with respect to the matrix, and the coordinates of the solution in this vector basis.
|
||||
Each iteration computes one component of the basis and one coordinate, therefore the algorithm
|
||||
converges to the solution in \f$ n\f$ iterations, where \f$ n\f$ is the dimension of the matrix. More precisely, it is shown to converge in \f$ k\f$ iteration, where \f$ k\f$ is the number of distinct eigenvalues of the matrix.
|
||||
|
||||
## Solvers with a Floating Point Arithmetic ##
|
||||
|
||||
<I>OpenNL's BICGSTAB example:</I>
|
||||
|
||||
When inexact numerical types are used (e.g. doubles), accumulated errors slow down convergence
|
||||
(in practice, it requires approximately \f$ 5k\f$ iterations to converge).
|
||||
The required number of iterations depends on the eigenvalues of the matrix, and these eigenvalues depend
|
||||
on the shape of the triangles. The optimum is when the triangles are equilateral (then the solver converges
|
||||
in less than 10 iterations). The worst case is obtained when the mesh has a large number of skinny triangles (near-singular Jacobian matrix of the triangle). In this case, the spectrum of the matrix
|
||||
is wide (many different eigenvalues), and the solver requires nearly \f$ 5n\f$ iterations to converge.
|
||||
|
||||
## Algorithmic Complexity ##
|
||||
|
||||
In this package, we focus on piecewise linear mappings onto a planar
|
||||
domain. All surface parameterization methods are based on solving one (or two)
|
||||
sparse linear system(s).
|
||||
The algorithmic complexity is dominated by the resolution of the sparse linear system(s).
|
||||
|
||||
<I>OpenNL's BICGSTAB example:</I>
|
||||
|
||||
At each iteration, the operation of highest complexity is the product between the sparse-matrix and a vector.
|
||||
The sparse matrix has a fixed number of non-zero coefficients per row,
|
||||
therefore the matrix / vector product has \f$ O(n)\f$ complexity.
|
||||
Since convergence is reached after \f$ k\f$ iterations, the complexity is \f$ O(k.n)\f$
|
||||
(where \f$ k\f$ is the number of distinct eigenvalues of the matrix).
|
||||
Therefore, best case complexity is \f$ O(n)\f$ (equilateral triangles),
|
||||
and worst case complexity is \f$ O(n^2)\f$ (skinny triangles).
|
||||
|
||||
# Software Design #
|
||||
|
||||
## Global Function parameterize() ##
|
||||
|
||||
This package's entry point is:
|
||||
|
||||
\code{.cpp}
|
||||
|
||||
// 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.
|
||||
template <class ParameterizationMesh_3>
|
||||
typename Parameterizer_traits_3<ParameterizationMesh_3>::Error_code
|
||||
parameterize(ParameterizationMesh_3& mesh) // 3D mesh, model of ParameterizationMesh_3 concept
|
||||
{
|
||||
Mean_value_coordinates_parameterizer_3<ParameterizationMesh_3> parameterizer;
|
||||
return parameterizer.parameterize(mesh);
|
||||
}
|
||||
|
||||
// Compute a one-to-one mapping from a 3D triangle surface 'mesh' to a
|
||||
// simple 2D domain.
|
||||
// One-to-one mapping may be guaranteed or not,
|
||||
// depending on the chosen ParametizerTraits_3 algorithm.
|
||||
template <class ParameterizationMesh_3, class ParameterizerTraits_3>
|
||||
typename Parameterizer_traits_3<ParameterizationMesh_3>::Error_code
|
||||
parameterize(ParameterizationMesh_3& mesh, // 3D mesh, model of ParameterizationMesh_3
|
||||
ParameterizerTraits_3 parameterizer) // Parameterization method for 'mesh'
|
||||
{
|
||||
return parameterizer.parameterize(mesh);
|
||||
}
|
||||
|
||||
\endcode
|
||||
|
||||
You may notice that these global functions simply call the
|
||||
parameterize() method of a `ParameterizerTraits_3` object.
|
||||
The purpose of these global functions is:
|
||||
<UL>
|
||||
<LI>to be consistent with other \cgal algorithms that are also provided as
|
||||
global functions, e.g. `CGAL::convex_hull_2()`,
|
||||
<LI>to provide a default parameterization method (Floater Mean Value Coordinates),
|
||||
which wouldn't be possible with a direct call to an object's method.
|
||||
</UL>
|
||||
|
||||
You may also wonder why there is not just one `CGAL::parameterize()` function
|
||||
with a default `ParameterizerTraits_3` argument equal to
|
||||
`CGAL::Mean_value_coordinates_parameterizer_3<ParameterizationMesh_3>`.
|
||||
The reason is simply that this is not allowed by the C++ standard (see
|
||||
\cite cgal:ansi-is14882-98, paragraph 14.1/9).
|
||||
|
||||
## No Common Parameterization Algorithm ##
|
||||
|
||||
`ParameterizerTraits_3` models modify the behavior of the global function
|
||||
`CGAL::parameterize()` - hence the <I>Traits</I> in the name.
|
||||
On the other hand, `ParameterizerTraits_3` models do not modify the behavior
|
||||
of a common parameterization algorithm - as you might expect.
|
||||
|
||||
In this package, we focus on triangulated surfaces that are homeomorphic to a
|
||||
disk and on piecewise linear mappings onto planar domains.
|
||||
A consequence is that the skeleton of all parameterization methods of this
|
||||
package is the same:
|
||||
<UL>
|
||||
<LI>Allocate a sparse linear system \f$ A.X = B\f$
|
||||
<LI>Parameterize the mesh border and initialize \f$ B\f$
|
||||
<LI>Parameterize the inner points of the mesh and set \f$ A\f$ coefficients
|
||||
<LI>Solve the system
|
||||
</UL>
|
||||
|
||||
It is tempting to make the parameterization method a traits class that
|
||||
modifies the behavior of a common parameterization algorithm.
|
||||
On the other hand, there are several differences among methods:
|
||||
<UL>
|
||||
<LI>Fixed border methods need to parameterize all border vertices,
|
||||
while free border methods parameterize only two vertices.
|
||||
<LI>Some methods create symmetric definite positive systems,
|
||||
which may be solved more efficiently than general systems.
|
||||
<LI>Most parameterization methods use two #vertices x #vertices systems,
|
||||
where Least Squares Conformal Maps uses one (2 * #triangles) x #vertices system.
|
||||
<LI>Most parameterization methods invert the \f$ A\f$ matrix,
|
||||
when Least Squares Conformal Maps solves the system in the least squares sense.
|
||||
</UL>
|
||||
|
||||
Therefore, the software design chosen is:
|
||||
<UL>
|
||||
<LI>Each `ParameterizerTraits_3` model implements its own version
|
||||
of the parameterization algorithm as a parameterize() method.
|
||||
<LI>Each `ParameterizerTraits_3` model has template arguments
|
||||
defining the border parameterization and sparse linear solver to use,
|
||||
with default values adapted to the method.
|
||||
<LI>Code factorization is achieved using a class hierarchy and (few) virtual methods.
|
||||
</UL>
|
||||
|
||||
\anchor Surface_mesh_parameterizationfigparameterizer_class_diagram
|
||||
\image html parameterizer_class_diagram.png "A parameterizer UML class diagram (main types and methods only)"
|
||||
|
||||
\anchor Surface_mesh_parameterizationfigparameterizers_class_hierarchy
|
||||
\image html parameterizers_class_hierarchy.png "Surface parameterizer classes hierarchy"
|
||||
|
||||
\note `CGAL::Parameterizer_traits_3<ParameterizationMesh_3>` is the (pure virtual)
|
||||
superclass of all surface parameterization classes.
|
||||
|
||||
## Fixed_border_parameterizer_3 Class ##
|
||||
|
||||
Linear fixed border parameterization algorithms are very close. They mainly
|
||||
differ by the energy that they try to minimize, i.e. by the value of the \f$ w_{ij}\f$
|
||||
coefficient of the \f$ A\f$ matrix, for \f$ v_i\f$ and \f$ v_j\f$ neighbor vertices of the mesh
|
||||
\cite cgal:fh-survey-05. One consequence is that most of the code of the fixed border methods is factorized in the
|
||||
`CGAL::Fixed_border_parameterizer_3<ParameterizationMesh_3, BorderParameterizer_3, SparseLinearAlgebraTraits_d>` class.
|
||||
|
||||
Subclasses:
|
||||
<UL>
|
||||
<LI>must provide `BorderParameterizer_3` and `SparseLinearAlgebraTraits_d`
|
||||
default template parameters that make sense,
|
||||
<LI>must implement `compute_w_ij`() to compute \f$ w_{ij}\f$ = (i, j) coefficient
|
||||
of matrix \f$ A\f$ for \f$ v_j\f$ neighbor vertex of \f$ v_i\f$,
|
||||
<LI>may implement an optimized version of `is_one_to_one_mapping`().
|
||||
</UL>
|
||||
|
||||
See `CGAL::Barycentric_mapping_parameterizer_3<ParameterizationMesh_3, BorderParameterizer_3, SparseLinearAlgebraTraits_d>`
|
||||
class as an example.
|
||||
|
||||
## Border Parameterizations ##
|
||||
|
||||
Border Parameterizations are models of the `BorderParameterizer_3` concept.
|
||||
To simplify the implementation, `BorderParameterizer_3` models know only the
|
||||
`ParameterizationMesh_3` mesh class. They do not know the parameterization algorithm or the sparse linear solver used.
|
||||
|
||||
## ParameterizationMesh_3 and ParameterizationPatchableMesh_3 Concepts ##
|
||||
|
||||
All parameterization methods are templated by the kind of mesh they are applied on.
|
||||
The mesh type must be a model of `ParameterizationMesh_3`.
|
||||
|
||||
The purpose of such a model is to:
|
||||
<OL>
|
||||
<LI>Support several kind of meshes.
|
||||
<LI>Hide the implementation of extra fields specific to the parameterization domain
|
||||
(`index`, `u`, `v`, `is_parameterized`).
|
||||
<LI>Handle in the mesh type the complexity of <I>virtually</I> cutting a mesh
|
||||
to make it homeomorphic to a disk (instead of duplicating this
|
||||
code in each parameterization method).
|
||||
</OL>
|
||||
|
||||
Two options are possible for 1) and 2):
|
||||
<UL>
|
||||
<LI>Pass to all classes and methods a mesh pointer, a traits class to manipulate it,
|
||||
and accessors to the extra field arrays.
|
||||
This is the choice of the Boost Graph Library with `boost::graph_traits<>`
|
||||
and the property maps.
|
||||
<LI>Pass to all classes and methods an object that points to the actual mesh and knows
|
||||
how to access to its fields. This is the Adaptor concept \cite cgal:ghjv-dpero-95.
|
||||
</UL>
|
||||
|
||||
The current design of this package uses the second option, which is simpler.
|
||||
Of course, we may decide at some point to switch to the first one to reach a deeper integration
|
||||
of \cgal with Boost.
|
||||
|
||||
Point 3) is solved by class `CGAL::Parameterization_mesh_patch_3<ParameterizationPatchableMesh_3>`,
|
||||
which takes care of <I>virtually</I> cutting
|
||||
a patch in a `ParameterizationPatchableMesh_3` mesh, to make it appear as a topological disk
|
||||
with a `ParameterizationMesh_3` interface.
|
||||
`ParameterizationPatchableMesh_3` inherits from concept `ParameterizationMesh_3` and adds
|
||||
the ability to support patches and virtual seams.
|
||||
|
||||
This mainly means that:
|
||||
<UL>
|
||||
<LI>vertices can be tagged as inside or outside the patch to parameterize,
|
||||
<LI>the fields specific to parameterizations (`index`, `u`, `v`, `is_parameterized`)
|
||||
can be set <I>per corner</I> (which is a more general way of saying <I>per half-edge</I>).
|
||||
</UL>
|
||||
|
||||
## SparseLinearAlgebraTraits_d Concept ##
|
||||
|
||||
This package solves sparse linear systems using solvers which are models
|
||||
of `SparseLinearAlgebraTraits_d`.
|
||||
|
||||
`SparseLinearAlgebraTraits_d` is a sub-concept of the `LinearAlgebraTraits_d` concept
|
||||
in `Kernel_d`.
|
||||
The goal is to adapt easily code written for dense matrices to sparse ones,
|
||||
and vice-versa.
|
||||
|
||||
## Cutting a Mesh ##
|
||||
|
||||
In this package, we focus on triangulated surfaces that are homeomorphic to a
|
||||
disk.
|
||||
|
||||
Computing a cutting path that transforms a closed mesh of arbitrary genus into
|
||||
a topological disk is a research topic on its own. This package does
|
||||
not intend to cover this topic at the moment.
|
||||
|
||||
# Extending the Package and Reusing Code #
|
||||
|
||||
## Reusing Mesh Adaptors ##
|
||||
|
||||
`ParameterizationMesh_3` defines a concept to access to a
|
||||
general polyhedral mesh.
|
||||
It is optimized for the `Surface_mesh_parameterization` package
|
||||
only in the sense that it
|
||||
defines the accessors to fields specific to the parameterization domain
|
||||
(`index`, `u`, `v`, `is_parameterized`).
|
||||
|
||||
It may be easily generalized.
|
||||
|
||||
## Reusing Sparse Linear Algebra ##
|
||||
|
||||
The `SparseLinearAlgebraTraits_d` concept and the traits classes
|
||||
for <span class="textsc">Eigen</span>, OpenNL and <span class="textsc">Taucs</span> are independent of the rest of the
|
||||
`Surface_mesh_parameterization` package, and may be reused by
|
||||
\cgal developers for other purposes.
|
||||
|
||||
## Adding New Parameterization Methods ##
|
||||
|
||||
Implementing a new fixed border linear parameterization is easy. Most
|
||||
of the code of the fixed border methods is factorized in the
|
||||
`CGAL::Fixed_border_parameterizer_3<ParameterizationMesh_3, BorderParameterizer_3, SparseLinearAlgebraTraits_d>`
|
||||
class. Subclasses must mainly
|
||||
implement a `compute_w_ij`() method which computes each
|
||||
\f$ w_{ij}\f$ = \f$ (i, j)\f$ coefficient of the matrix \f$ A\f$ for \f$ v_j\f$ neighboring
|
||||
vertices of \f$ v_i\f$.
|
||||
|
||||
Although implementing a new free border linear parameterization
|
||||
method is more challenging, the Least Squares Conformal Maps
|
||||
parameterization method provides a good starting point.
|
||||
|
||||
Implementing <I>non</I> linear parameterizations is a natural extension
|
||||
to this package, although only the mesh adaptors can be reused.
|
||||
|
||||
## Adding New Border Parameterization Methods ##
|
||||
|
||||
Implementing a new border parameterization method is easy.
|
||||
Square, circular and two-points border parameterizations are good starting points.
|
||||
|
||||
## Mesh Cutting ##
|
||||
|
||||
Obviously, this package would benefit of having robust algorithms
|
||||
which transform arbitrary meshes into topological disks.
|
||||
|
||||
*/
|
||||
} /* namespace CGAL */
|
||||
|
||||
|
After Width: | Height: | Size: 87 KiB |
|
After Width: | Height: | Size: 92 KiB |
|
After Width: | Height: | Size: 60 KiB |
|
After Width: | Height: | Size: 16 KiB |
|
After Width: | Height: | Size: 82 KiB |
|
After Width: | Height: | Size: 88 KiB |
|
After Width: | Height: | Size: 53 KiB |
|
After Width: | Height: | Size: 87 KiB |
|
After Width: | Height: | Size: 53 KiB |
|
After Width: | Height: | Size: 23 KiB |
|
After Width: | Height: | Size: 5.7 KiB |
|
After Width: | Height: | Size: 6.8 KiB |
|
After Width: | Height: | Size: 83 KiB |
|
|
@ -19,6 +19,8 @@
|
|||
// Author(s) : Laurent Saboret, Pierre Alliez, Bruno Levy
|
||||
|
||||
|
||||
/// \ingroup PkgSurfaceParameterizationConcepts
|
||||
/// \cgalconcept
|
||||
/// BorderParameterizer_3 is a concept of class that parameterizes a given type of mesh,
|
||||
/// 'Adaptor', which is a model of the ParameterizationMesh_3 concept.
|
||||
///
|
||||
|
|
@ -27,7 +29,7 @@
|
|||
/// ParameterizationMesh_3 class. They do not know the parameterization algorithm
|
||||
/// requirements or the kind of sparse linear system used.
|
||||
///
|
||||
/// @heading Design Pattern:
|
||||
/// ## Design Pattern ##
|
||||
/// BorderParameterizer_3 models are Strategies [GHJV95]: they implement
|
||||
/// a strategy of border parameterization for models of ParameterizationMesh_3.
|
||||
|
||||
|
|
|
|||
|
|
@ -21,59 +21,4 @@
|
|||
namespace SparseLinearAlgebraTraits_d {
|
||||
|
||||
|
||||
/// SparseLinearAlgebraTraits_d::Matrix
|
||||
/// is a concept of a sparse matrix class.
|
||||
///
|
||||
/// @heading Has Models:
|
||||
/// - Taucs_matrix<T>
|
||||
/// - Taucs_symmetric_matrix<T>
|
||||
/// - OpenNL::SparseMatrix<T> in OpenNL package
|
||||
|
||||
class Matrix : public LinearAlgebraTraits_d::Matrix
|
||||
{
|
||||
// Public types
|
||||
public:
|
||||
typedef xxx NT;
|
||||
|
||||
// Public operations
|
||||
public:
|
||||
/// Create a square matrix initialized with zeros.
|
||||
Matrix(int dimension);
|
||||
|
||||
/// Create a rectangular matrix initialized with zeros.
|
||||
Matrix (int rows, int columns);
|
||||
|
||||
/// Return the matrix number of rows.
|
||||
int row_dimension () const;
|
||||
|
||||
/// Return the matrix number of columns.
|
||||
int column_dimension () const;
|
||||
|
||||
/// Read access to a matrix coefficient.
|
||||
///
|
||||
/// @commentheading Preconditions:
|
||||
/// - 0 <= row < row_dimension().
|
||||
/// - 0 <= column < column_dimension().
|
||||
NT get_coef (int row, int column) const;
|
||||
|
||||
/// Write access to a matrix coefficient: a_ij <- a_ij + val.
|
||||
///
|
||||
/// @commentheading Preconditions:
|
||||
/// - 0 <= row < row_dimension().
|
||||
/// - 0 <= column < column_dimension().
|
||||
void add_coef(int row, int column, NT value);
|
||||
|
||||
/// Write access to a matrix coefficient: a_ij <- val.
|
||||
///
|
||||
/// Optimization:
|
||||
/// - Caller can optimize this call by setting 'new_coef' to true
|
||||
/// if the coefficient does not already exist in the matrix.
|
||||
///
|
||||
/// @commentheading Preconditions:
|
||||
/// - 0 <= i < row_dimension().
|
||||
/// - 0 <= j < column_dimension().
|
||||
void set_coef(int row, int column, NT value, bool new_coef = false);
|
||||
};
|
||||
|
||||
|
||||
} // namespace SparseLinearAlgebraTraits_d
|
||||
|
|
|
|||
|
|
@ -18,7 +18,8 @@
|
|||
//
|
||||
// Author(s) : Laurent Saboret, Pierre Alliez, Bruno Levy
|
||||
|
||||
|
||||
/// \ingroup PkgSurfaceParameterizationConcepts
|
||||
/// \cgalconcept
|
||||
/// ParameterizationMesh_3 is a concept for a 3D surface mesh.
|
||||
/// Its main purpose is to allow the parameterization methods to access meshes in a uniform manner.
|
||||
///
|
||||
|
|
@ -44,12 +45,10 @@
|
|||
/// as parameterization methods deal only with topological disks, ParameterizationMesh_3
|
||||
/// defines an interface oriented towards topological disks.
|
||||
///
|
||||
/// @heading Has Models:
|
||||
/// We provide 2 models of this concept:
|
||||
/// - Parameterization_polyhedron_adaptor_3<Polyhedron_3_>
|
||||
/// - Parameterization_mesh_patch_3<ParameterizationPatchableMesh_3>
|
||||
/// \hasModel Parameterization_polyhedron_adaptor_3<Polyhedron_3_>
|
||||
/// \hasModel Parameterization_mesh_patch_3<ParameterizationPatchableMesh_3>
|
||||
///
|
||||
/// @heading Design Pattern:
|
||||
/// ## Design Pattern ##
|
||||
/// ParameterizationMesh_3 is an Adaptor [GHJV95]: it changes the
|
||||
/// interface of a 3D mesh to match the interface expected by the parameterization methods.
|
||||
|
||||
|
|
|
|||
|
|
@ -19,6 +19,8 @@
|
|||
// Author(s) : Laurent Saboret, Pierre Alliez, Bruno Levy
|
||||
|
||||
|
||||
/// \ingroup PkgSurfaceParameterizationConcepts
|
||||
/// \cgalconcept
|
||||
/// ParameterizationPatchableMesh_3 inherits from concept ParameterizationMesh_3,
|
||||
/// thus is a concept of a 3D surface mesh.
|
||||
///
|
||||
|
|
@ -34,14 +36,13 @@
|
|||
/// The main purpose of this feature is to allow the Surface_mesh_parameterization package
|
||||
/// to parameterize any 3D surface by decomposing it as a list of topological disks.
|
||||
///
|
||||
/// @heading Design Pattern:
|
||||
/// ## Design Pattern ##
|
||||
/// ParameterizationPatchableMesh_3 is an Adaptor [GHJV95]: it changes the
|
||||
/// interface of a 3D mesh to match the interface expected by class Parameterization_mesh_patch_3.
|
||||
///
|
||||
/// @heading Has Models:
|
||||
/// Adaptator for Polyhedron_3 is provided.
|
||||
|
||||
class ParameterizationPatchableMesh_3 : public ParameterizationMesh_3
|
||||
/// \refines ParameterizationMesh_3
|
||||
/// \hasModel Adaptator for Polyhedron_3 is provided.
|
||||
class ParameterizationPatchableMesh_3
|
||||
{
|
||||
// Public types
|
||||
public:
|
||||
|
|
|
|||
|
|
@ -19,14 +19,15 @@
|
|||
// Author(s) : Laurent Saboret, Pierre Alliez, Bruno Levy
|
||||
|
||||
|
||||
/// \ingroup PkgSurfaceParameterizationConcepts
|
||||
/// \cgalconcept
|
||||
/// ParameterizerTraits_3 is a concept of parameterization object
|
||||
/// for a given type of mesh, 'Adaptor', which is a model of the
|
||||
/// ParameterizationMesh_3 concept.
|
||||
///
|
||||
/// @heading Design Pattern:
|
||||
/// ## Design Pattern ##
|
||||
/// ParameterizerTraits_3 models are Strategies [GHJV95]: they implement
|
||||
/// a strategy of surface parameterization for models of ParameterizationMesh_3.
|
||||
|
||||
class ParameterizerTraits_3
|
||||
{
|
||||
// Public types
|
||||
|
|
@ -55,9 +56,8 @@ public:
|
|||
/// 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.
|
||||
///
|
||||
/// @commentheading Preconditions:
|
||||
/// - 'mesh' must be a surface with one connected component and no hole.
|
||||
/// - 'mesh' must be a triangular mesh.
|
||||
/// \pre 'mesh' must be a surface with one connected component and no hole.
|
||||
/// \pre 'mesh' must be a triangular mesh.
|
||||
Error_code parameterize (Adaptor& mesh);
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -19,12 +19,13 @@
|
|||
// Author(s) : Laurent Saboret, Pierre Alliez, Bruno Levy
|
||||
|
||||
|
||||
/// \ingroup PkgSurfaceParameterizationConcepts
|
||||
/// \cgalconcept
|
||||
/// The concept SparseLinearAlgebraTraits_d
|
||||
/// is used to solve sparse linear systems "A*X = B".
|
||||
|
||||
class SparseLinearAlgebraTraits_d : public LinearAlgebraTraits_d
|
||||
/// \refines LinearAlgebraTraits_d
|
||||
class SparseLinearAlgebraTraits_d
|
||||
{
|
||||
// Public types
|
||||
public:
|
||||
typedef xxx Matrix ;
|
||||
typedef xxx Vector ;
|
||||
|
|
@ -38,9 +39,8 @@ public:
|
|||
/// Solve the sparse linear system "A*X = B".
|
||||
/// Return true on success. The solution is then (1/D) * X.
|
||||
///
|
||||
/// @commentheading Preconditions:
|
||||
/// - A.row_dimension() == B.dimension().
|
||||
/// - A.column_dimension() == X.dimension().
|
||||
/// \pre A.row_dimension() == B.dimension().
|
||||
/// \pre A.column_dimension() == X.dimension().
|
||||
bool linear_solver (const Matrix& A, const Vector& B, Vector& X, NT& D);
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -20,15 +20,15 @@
|
|||
|
||||
namespace SparseLinearAlgebraTraits_d {
|
||||
|
||||
|
||||
/// \ingroup PkgSurfaceParameterizationConcepts
|
||||
/// \cgalconcept
|
||||
/// SparseLinearAlgebraTraits_d::Vector
|
||||
/// is a concept of a vector that can be multiplied by a sparse matrix.
|
||||
///
|
||||
/// @heading Has Models:
|
||||
/// - CGAL::Taucs_vector<T>
|
||||
/// - OpenNL::FullVector<T> in OpenNL package
|
||||
|
||||
class Vector : public LinearAlgebraTraits_d::Vector
|
||||
/// \refines LinearAlgebraTraits_d::Vector
|
||||
/// \hasModel CGAL::Taucs_vector<T>
|
||||
/// \hasModel OpenNL::FullVector<T> in OpenNL package
|
||||
class Vector
|
||||
{
|
||||
// Public types
|
||||
public:
|
||||
|
|
@ -52,10 +52,62 @@ public:
|
|||
|
||||
/// Read/write access to a vector coefficient.
|
||||
///
|
||||
/// @commentheading Precondition: 0 <= row < dimension().
|
||||
/// \pre 0 <= row < dimension().
|
||||
NT operator[] (int row) const;
|
||||
NT& operator[] (int row);
|
||||
};
|
||||
|
||||
/// \ingroup PkgSurfaceParameterizationConcepts
|
||||
/// \cgalconcept
|
||||
/// SparseLinearAlgebraTraits_d::Matrix
|
||||
/// is a concept of a sparse matrix class.
|
||||
///
|
||||
/// \refines LinearAlgebraTraits_d::Matrix
|
||||
/// \hasModel Taucs_matrix<T>
|
||||
/// \hasModel Taucs_symmetric_matrix<T>
|
||||
/// \hasModel OpenNL::SparseMatrix<T> in OpenNL package
|
||||
class Matrix
|
||||
{
|
||||
// Public types
|
||||
public:
|
||||
typedef xxx NT;
|
||||
|
||||
} // namespace SparseLinearAlgebraTraits_d
|
||||
// Public operations
|
||||
public:
|
||||
/// Create a square matrix initialized with zeros.
|
||||
Matrix(int dimension);
|
||||
|
||||
/// Create a rectangular matrix initialized with zeros.
|
||||
Matrix (int rows, int columns);
|
||||
|
||||
/// Return the matrix number of rows.
|
||||
int row_dimension () const;
|
||||
|
||||
/// Return the matrix number of columns.
|
||||
int column_dimension () const;
|
||||
|
||||
/// Read access to a matrix coefficient.
|
||||
///
|
||||
/// \pre 0 <= row < row_dimension().
|
||||
/// \pre 0 <= column < column_dimension().
|
||||
NT get_coef (int row, int column) const;
|
||||
|
||||
/// Write access to a matrix coefficient: a_ij <- a_ij + val.
|
||||
///
|
||||
/// \pre 0 <= row < row_dimension().
|
||||
/// \pre 0 <= column < column_dimension().
|
||||
void add_coef(int row, int column, NT value);
|
||||
|
||||
/// Write access to a matrix coefficient: a_ij <- val.
|
||||
///
|
||||
/// Optimization:
|
||||
/// - Caller can optimize this call by setting 'new_coef' to true
|
||||
/// if the coefficient does not already exist in the matrix.
|
||||
///
|
||||
/// \pre 0 <= i < row_dimension().
|
||||
/// \pre 0 <= j < column_dimension().
|
||||
void set_coef(int row, int column, NT value, bool new_coef = false);
|
||||
};
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@
|
|||
// It can have have any number of borders. Its "main border"
|
||||
// will be the mesh's longest border (if there is at least one border).
|
||||
//
|
||||
// @heading Design Pattern:
|
||||
// @heading Design Pattern
|
||||
// Parameterization_polyhedron_adaptor_ex is an Adaptor [GHJV95]: it changes the
|
||||
// Polyhedron_ex interface to match the ParameterizationPatchableMesh_3 concept
|
||||
|
||||
|
|
|
|||
|
|
@ -41,14 +41,13 @@ namespace CGAL {
|
|||
/// for j neighbor vertex of i based on Tutte Barycentric Mapping method.
|
||||
/// - It implements an optimized version of is_one_to_one_mapping().
|
||||
///
|
||||
/// @heading Is Model for the Concepts: Model of the ParameterizerTraits_3 concept.
|
||||
/// \models ParameterizerTraits_3
|
||||
///
|
||||
/// @heading Design Pattern:
|
||||
/// ## Design Pattern ##
|
||||
/// Barycentric_mapping_parameterizer_3 class is a
|
||||
/// Strategy [GHJV95]: it implements a strategy of surface parameterization
|
||||
/// for models of ParameterizationMesh_3.
|
||||
///
|
||||
/// @heading Parameters:
|
||||
/// @param ParameterizationMesh_3 3D surface mesh.
|
||||
/// @param BorderParameterizer_3 Strategy to parameterize the surface border.
|
||||
/// @param SparseLinearAlgebraTraits_d Traits class to solve a sparse linear system.
|
||||
|
|
|
|||
|
|
@ -44,10 +44,9 @@ namespace CGAL {
|
|||
/// ParameterizationMesh_3 class. They do not know the parameterization algorithm
|
||||
/// requirements or the kind of sparse linear system used.
|
||||
///
|
||||
/// @heading Is Model for the Concepts:
|
||||
/// Model of the BorderParameterizer_3 concept (although you cannot instantiate this class).
|
||||
/// \models BorderParameterizer_3 (although you cannot instantiate this class).
|
||||
///
|
||||
/// @heading Design Pattern:
|
||||
/// ## Design Pattern ##
|
||||
/// BorderParameterizer_3 models are Strategies [GHJV95]: they implement
|
||||
/// a strategy of border parameterization for models of ParameterizationMesh_3.
|
||||
|
||||
|
|
@ -211,9 +210,9 @@ Circular_border_parameterizer_3<Adaptor>::parameterize_border(Adaptor& mesh)
|
|||
/// algorithm. This class implements only compute_edge_length() to compute a
|
||||
/// segment's length.
|
||||
///
|
||||
/// @heading Is Model for the Concepts: Model of the BorderParameterizer_3 concept.
|
||||
/// \models BorderParameterizer_3
|
||||
///
|
||||
/// @heading Design Pattern:
|
||||
/// ## Design Pattern ##
|
||||
/// BorderParameterizer_3 models are Strategies [GHJV95]: they implement
|
||||
/// a strategy of border parameterization for models of ParameterizationMesh_3
|
||||
|
||||
|
|
@ -291,9 +290,9 @@ protected:
|
|||
/// algorithm. This class implements only compute_edge_length() to compute a
|
||||
/// segment's length.
|
||||
///
|
||||
/// @heading Is Model for the Concepts: Model of the BorderParameterizer_3 concept.
|
||||
/// \models BorderParameterizer_3
|
||||
///
|
||||
/// @heading Design Pattern:
|
||||
/// ## Design Pattern ##
|
||||
/// BorderParameterizer_3 models are Strategies [GHJV95]: they implement
|
||||
/// a strategy of border parameterization for models of ParameterizationMesh_3
|
||||
|
||||
|
|
|
|||
|
|
@ -46,8 +46,8 @@ class Convertible_circulator_project
|
|||
|
||||
public:
|
||||
|
||||
/// CREATION
|
||||
/// --------
|
||||
/// \name Creation
|
||||
/// @{
|
||||
|
||||
Convertible_circulator_project() {}
|
||||
Convertible_circulator_project(Base base) : Base(base) {}
|
||||
|
|
@ -55,8 +55,10 @@ public:
|
|||
Convertible_circulator_project(const Self& cir) : Base(cir) {}
|
||||
Self& operator=(const Self& cir) { Base::operator=(cir); return *this; }
|
||||
|
||||
/// OPERATIONS Forward Category
|
||||
/// ---------------------------
|
||||
/// @}
|
||||
|
||||
/// \name Forward Category
|
||||
///@{
|
||||
|
||||
bool operator==(Nullptr_t ptr) const { return (const Base&)*this == ptr; }
|
||||
bool operator!=(Nullptr_t ptr) const { return ! (*this == ptr); }
|
||||
|
|
@ -65,18 +67,24 @@ public:
|
|||
|
||||
Self& operator++() { Base::operator++(); return *this; }
|
||||
Self operator++(int) { Self tmp(*this); ++(*this); return tmp; }
|
||||
///@}
|
||||
|
||||
/// OPERATIONS Bidirectional Category
|
||||
/// ---------------------------------
|
||||
/// \name Bidirectional Category
|
||||
/// @{
|
||||
|
||||
Self& operator--() { Base::operator--(); return *this; }
|
||||
Self operator--(int) { Self tmp(*this); --(*this); return tmp; }
|
||||
|
||||
/// EXTRA CASTS
|
||||
/// -----------
|
||||
/// @}
|
||||
|
||||
/// \name Conversion
|
||||
/// @{
|
||||
|
||||
operator Handle() { return Base::operator->(); }
|
||||
operator ConstHandle() const { return Base::operator->(); }
|
||||
|
||||
/// @}
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -44,9 +44,8 @@ class Convertible_filter_iterator
|
|||
|
||||
public:
|
||||
|
||||
/// CREATION
|
||||
/// --------
|
||||
|
||||
/// \name Creation
|
||||
/// @{
|
||||
Convertible_filter_iterator() {}
|
||||
Convertible_filter_iterator(Base base)
|
||||
: Base(base) {}
|
||||
|
|
@ -58,9 +57,10 @@ public:
|
|||
Convertible_filter_iterator(const Self& it) : Base(it) {}
|
||||
Self& operator=(const Self& it) { Base::operator=(it); return *this; }
|
||||
|
||||
/// OPERATIONS Forward Category
|
||||
/// ---------------------------
|
||||
/// @}
|
||||
|
||||
/// \name Forward Category
|
||||
/// @{
|
||||
bool operator==(Nullptr_t ptr) const { return (const Base&)*this == ptr; }
|
||||
bool operator!=(Nullptr_t ptr) const { return ! (*this == ptr); }
|
||||
bool operator==(const Self& it) const { return (const Base&)*this == it; }
|
||||
|
|
@ -68,18 +68,23 @@ public:
|
|||
|
||||
Self& operator++() { Base::operator++(); return *this; }
|
||||
Self operator++(int) { Self tmp(*this); ++(*this); return tmp; }
|
||||
/// @}
|
||||
|
||||
/// OPERATIONS Bidirectional Category
|
||||
/// ---------------------------------
|
||||
/// \name Bidirectional Category
|
||||
/// @{
|
||||
|
||||
Self& operator--() { Base::operator--(); return *this; }
|
||||
Self operator--(int) { Self tmp(*this); --(*this); return tmp; }
|
||||
|
||||
/// EXTRA CASTS
|
||||
/// -----------
|
||||
/// @}
|
||||
|
||||
/// \name Conversion
|
||||
/// @{
|
||||
|
||||
operator Handle() { return Base::operator->(); }
|
||||
operator ConstHandle() const { return Base::operator->(); }
|
||||
|
||||
/// @}
|
||||
};
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -44,17 +44,18 @@ class Convertible_iterator_project
|
|||
|
||||
public:
|
||||
|
||||
/// CREATION
|
||||
/// --------
|
||||
|
||||
/// \name Creation
|
||||
/// @{
|
||||
Convertible_iterator_project() {}
|
||||
Convertible_iterator_project(Base base) : Base(base) {}
|
||||
|
||||
Convertible_iterator_project(const Self& it) : Base(it) {}
|
||||
Self& operator=(const Self& it) { Base::operator=(it); return *this; }
|
||||
|
||||
/// OPERATIONS Forward Category
|
||||
/// ---------------------------
|
||||
/// @}
|
||||
|
||||
/// \name Forward Category
|
||||
/// @{
|
||||
|
||||
bool operator==(Nullptr_t ptr) const { return (const Base&)*this == ptr; }
|
||||
bool operator!=(Nullptr_t ptr) const { return ! (*this == ptr); }
|
||||
|
|
@ -64,17 +65,22 @@ public:
|
|||
Self& operator++() { Base::operator++(); return *this; }
|
||||
Self operator++(int) { Self tmp(*this); ++(*this); return tmp; }
|
||||
|
||||
/// OPERATIONS Bidirectional Category
|
||||
/// ---------------------------------
|
||||
/// @}
|
||||
|
||||
/// \name Bidirectional Category
|
||||
/// @{
|
||||
|
||||
Self& operator--() { Base::operator--(); return *this; }
|
||||
Self operator--(int) { Self tmp(*this); --(*this); return tmp; }
|
||||
|
||||
/// EXTRA CASTS
|
||||
/// -----------
|
||||
/// @}
|
||||
|
||||
/// \name Conversion
|
||||
/// @{
|
||||
operator Handle() { return Base::operator->(); }
|
||||
operator ConstHandle() const { return Base::operator->(); }
|
||||
/// @}
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -45,9 +45,9 @@ namespace CGAL {
|
|||
/// - It implements compute_w_ij() to compute w_ij = (i, j) coefficient of matrix A
|
||||
/// for j neighbor vertex of i based on Discrete Authalic Parameterization algorithm.
|
||||
///
|
||||
/// @heading Is Model for the Concepts: Model of the ParameterizerTraits_3 concept.
|
||||
/// \models ParameterizerTraits_3
|
||||
///
|
||||
/// @heading Design Pattern:
|
||||
/// ## Design Pattern ##
|
||||
/// Discrete_authalic_parameterizer_3 class is a
|
||||
/// Strategy [GHJV95]: it implements a strategy of surface parameterization
|
||||
/// for models of ParameterizationMesh_3.
|
||||
|
|
|
|||
|
|
@ -44,14 +44,13 @@ namespace CGAL {
|
|||
/// - It implements compute_w_ij() to compute w_ij = (i, j) coefficient of matrix A
|
||||
/// for j neighbor vertex of i based on Discrete Conformal Map method.
|
||||
///
|
||||
/// @heading Is Model for the Concepts: Model of the ParameterizerTraits_3 concept.
|
||||
/// \models ParameterizerTraits_3
|
||||
///
|
||||
/// @heading Design Pattern:
|
||||
/// ## Design Pattern ##
|
||||
/// Discrete_conformal_map_parameterizer_3 class is a
|
||||
/// Strategy [GHJV95]: it implements a strategy of surface parameterization
|
||||
/// for models of ParameterizationMesh_3.
|
||||
///
|
||||
/// @heading Parameters:
|
||||
/// @param ParameterizationMesh_3 3D surface mesh.
|
||||
/// @param BorderParameterizer_3 Strategy to parameterize the surface border.
|
||||
/// @param SparseLinearAlgebraTraits_d Traits class to solve a sparse linear system.
|
||||
|
|
|
|||
|
|
@ -58,10 +58,9 @@ namespace CGAL {
|
|||
/// from the linear systems in order to have a symmetric positive definite
|
||||
/// matrix for Tutte Barycentric Mapping and Discrete Conformal Map algorithms.
|
||||
///
|
||||
/// @heading Is Model for the Concepts:
|
||||
/// Model of the ParameterizerTraits_3 concept (although you cannot instantiate this class).
|
||||
/// \models ParameterizerTraits_3 (although you cannot instantiate this class).
|
||||
///
|
||||
/// @heading Design Pattern:
|
||||
/// ## Design Pattern ##
|
||||
/// Fixed_border_parameterizer_3 class is a
|
||||
/// Strategy [GHJV95]: it implements (part of) a strategy of surface parameterization
|
||||
/// for models of ParameterizationMesh_3.
|
||||
|
|
@ -157,10 +156,9 @@ public:
|
|||
/// 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.
|
||||
///
|
||||
/// @commentheading Preconditions:
|
||||
/// - 'mesh' must be a surface with one connected component.
|
||||
/// - 'mesh' must be a triangular mesh.
|
||||
/// - The mesh border must be mapped onto a convex polygon.
|
||||
/// \pre 'mesh' must be a surface with one connected component.
|
||||
/// \pre 'mesh' must be a triangular mesh.
|
||||
/// \pre The mesh border must be mapped onto a convex polygon.
|
||||
virtual Error_code parameterize(Adaptor& mesh);
|
||||
|
||||
// Protected operations
|
||||
|
|
@ -175,10 +173,9 @@ protected:
|
|||
/// Fill the border vertices' lines in both linear systems:
|
||||
/// "u = constant" and "v = constant".
|
||||
///
|
||||
/// @commentheading Preconditions:
|
||||
/// - Vertices must be indexed.
|
||||
/// - A, Bu and Bv must be allocated.
|
||||
/// - Border vertices must be parameterized.
|
||||
/// \pre Vertices must be indexed.
|
||||
/// \pre A, Bu and Bv must be allocated.
|
||||
/// \pre Border vertices must be parameterized.
|
||||
void initialize_system_from_mesh_border (Matrix& A, Vector& Bu, Vector& Bv,
|
||||
const Adaptor& mesh);
|
||||
|
||||
|
|
@ -193,10 +190,9 @@ protected:
|
|||
/// - call compute_w_ij() to compute the A coefficient w_ij for each neighbor v_j.
|
||||
/// - compute w_ii = - sum of w_ijs.
|
||||
///
|
||||
/// @commentheading Preconditions:
|
||||
/// - Vertices must be indexed.
|
||||
/// - Vertex i musn't be already parameterized.
|
||||
/// - Line i of A must contain only zeros.
|
||||
/// \pre Vertices must be indexed.
|
||||
/// \pre Vertex i musn't be already parameterized.
|
||||
/// \pre Line i of A must contain only zeros.
|
||||
virtual Error_code setup_inner_vertex_relations(Matrix& A,
|
||||
Vector& Bu,
|
||||
Vector& Bv,
|
||||
|
|
|
|||
|
|
@ -48,9 +48,9 @@ namespace CGAL {
|
|||
/// onto a convex polygon (only two pinned vertices are needed to ensure a
|
||||
/// unique solution), but one-to-one mapping is *not* guaranteed.
|
||||
///
|
||||
/// @heading Is Model for the Concepts: Model of the ParameterizerTraits_3 concept.
|
||||
/// \models ParameterizerTraits_3
|
||||
///
|
||||
/// @heading Design Pattern:
|
||||
/// ## Design Pattern ##
|
||||
/// LSCM_parameterizer_3 class is a
|
||||
/// Strategy [GHJV95]: it implements a strategy of surface parameterization
|
||||
/// for models of ParameterizationMesh_3.
|
||||
|
|
@ -149,9 +149,8 @@ public:
|
|||
/// 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.
|
||||
///
|
||||
/// @commentheading Preconditions:
|
||||
/// - 'mesh' must be a surface with one connected component.
|
||||
/// - 'mesh' must be a triangular mesh.
|
||||
/// \pre 'mesh' must be a surface with one connected component.
|
||||
/// \pre 'mesh' must be a triangular mesh.
|
||||
virtual Error_code parameterize(Adaptor& mesh);
|
||||
|
||||
// Private operations
|
||||
|
|
@ -164,10 +163,9 @@ private:
|
|||
/// Initialize "A*X = B" linear system after
|
||||
/// (at least two) border vertices are parameterized.
|
||||
///
|
||||
/// @commentheading Preconditions:
|
||||
/// - Vertices must be indexed.
|
||||
/// - X and B must be allocated and empty.
|
||||
/// - At least 2 border vertices must be parameterized.
|
||||
/// \pre Vertices must be indexed.
|
||||
/// \pre X and B must be allocated and empty.
|
||||
/// \pre At least 2 border vertices must be parameterized.
|
||||
void initialize_system_from_mesh_border(LeastSquaresSolver& solver,
|
||||
const Adaptor& mesh) ;
|
||||
|
||||
|
|
@ -179,7 +177,7 @@ private:
|
|||
|
||||
/// Create two lines in the linear system per triangle (one for u, one for v).
|
||||
///
|
||||
/// @commentheading Precondition: vertices must be indexed.
|
||||
/// \pre vertices must be indexed.
|
||||
Error_code setup_triangle_relations(LeastSquaresSolver& solver,
|
||||
const Adaptor& mesh,
|
||||
Facet_const_handle facet) ;
|
||||
|
|
|
|||
|
|
@ -44,9 +44,9 @@ namespace CGAL {
|
|||
/// for j neighbor vertex of i based on Floater Mean Value Coordinates parameterization.
|
||||
/// - It implements an optimized version of is_one_to_one_mapping().
|
||||
///
|
||||
/// @heading Is Model for the Concepts: Model of the ParameterizerTraits_3 concept.
|
||||
/// \models ParameterizerTraits_3
|
||||
///
|
||||
/// @heading Design Pattern:
|
||||
/// ## Design Pattern ##
|
||||
/// Mean_value_coordinates_parameterizer_3 class is a
|
||||
/// Strategy [GHJV95]: it implements a strategy of surface parameterization
|
||||
/// for models of ParameterizationMesh_3.
|
||||
|
|
|
|||
|
|
@ -47,9 +47,6 @@ template<class MeshPatchType, ///< = [const] Parameterization_mesh_patch_3
|
|||
class Mesh_patch_vertex_around_vertex_cir
|
||||
: public VertexHandleType
|
||||
{
|
||||
// PRIVATE TYPES
|
||||
// -------------
|
||||
|
||||
/// Base and self classes
|
||||
typedef VertexHandleType Base;
|
||||
typedef Mesh_patch_vertex_around_vertex_cir Self;
|
||||
|
|
@ -59,8 +56,8 @@ class Mesh_patch_vertex_around_vertex_cir
|
|||
|
||||
public:
|
||||
|
||||
// PUBLIC TYPES
|
||||
// ------------
|
||||
/// \name Types
|
||||
/// @{
|
||||
|
||||
// Export template parameter types
|
||||
typedef MeshPatchType Parameterization_mesh_patch_3;
|
||||
|
|
@ -78,8 +75,10 @@ public:
|
|||
typedef typename Vertex_handle::reference reference;
|
||||
typedef typename Vertex_handle::pointer pointer;
|
||||
|
||||
/// CREATION
|
||||
/// --------
|
||||
/// @}
|
||||
|
||||
/// \name Creation
|
||||
/// @{
|
||||
|
||||
/// Circulator pointing to NULL
|
||||
Mesh_patch_vertex_around_vertex_cir()
|
||||
|
|
@ -131,8 +130,10 @@ public:
|
|||
return *this;
|
||||
}
|
||||
|
||||
/// OPERATIONS Forward Category
|
||||
/// ---------------------------
|
||||
/// @}
|
||||
|
||||
/// \name Forward Category
|
||||
/// @{
|
||||
|
||||
bool operator==(const Self& cir) const { return (const Base&)*this == cir; }
|
||||
bool operator!=(const Self& cir) const { return !(*this == cir); }
|
||||
|
|
@ -254,8 +255,10 @@ public:
|
|||
return tmp;
|
||||
}
|
||||
|
||||
/// OPERATIONS Bidirectional Category
|
||||
/// ---------------------------------
|
||||
/// @}
|
||||
|
||||
/// \name Bidirectional Category
|
||||
/// @{
|
||||
|
||||
/// Counter-clockwise rotation
|
||||
Self& operator--()
|
||||
|
|
@ -373,7 +376,7 @@ public:
|
|||
private:
|
||||
/// Update the inherited vertex handle.
|
||||
///
|
||||
/// @commentheading Precondition: m_adaptor_circulator and m_center are valid.
|
||||
/// \pre m_adaptor_circulator and m_center are valid.
|
||||
void update_inherited_handle()
|
||||
{
|
||||
Vertex_handle current_decorated_vertex = NULL;
|
||||
|
|
@ -569,7 +572,7 @@ public:
|
|||
private:
|
||||
/// Update the inherited vertex handle.
|
||||
///
|
||||
/// @commentheading Precondition: m_adaptor_circulator is valid.
|
||||
/// \pre m_adaptor_circulator is valid.
|
||||
void update_inherited_handle()
|
||||
{
|
||||
Vertex_handle current_decorated_vertex = NULL;
|
||||
|
|
|
|||
|
|
@ -151,7 +151,7 @@ private:
|
|||
/// Param_mesh_patch_vertex object, thus has the same behavior
|
||||
/// as Param_mesh_patch_vertex* pointer type.
|
||||
///
|
||||
/// @heading Design Pattern:
|
||||
/// ## Design Pattern ##
|
||||
/// Param_mesh_patch_vertex_handle is a Bridge [GHJV95].
|
||||
///
|
||||
/// Implementation note:
|
||||
|
|
@ -295,7 +295,7 @@ private:
|
|||
/// Param_mesh_patch_vertex object, thus has the same behavior
|
||||
/// as const Param_mesh_patch_vertex* pointer type.
|
||||
///
|
||||
/// @heading Design Pattern:
|
||||
/// ## Design Pattern ##
|
||||
/// Param_mesh_patch_vertex_const_handle is a Bridge [GHJV95].
|
||||
///
|
||||
/// Implementation note:
|
||||
|
|
|
|||
|
|
@ -45,17 +45,16 @@ namespace CGAL {
|
|||
/// describes the border of a topological disc. This border may be an actual
|
||||
/// border of the mesh or a virtual border.
|
||||
///
|
||||
/// @heading Is Model for the Concepts:
|
||||
/// Model of ParameterizationMesh_3 concept, whose purpose is to allow
|
||||
/// the Surface_mesh_parameterization package to access meshes in a uniform manner.
|
||||
/// \models ParameterizationMesh_3 concept, whose purpose is to allow
|
||||
/// the Surface_mesh_parameterization package to access meshes in a
|
||||
/// uniform manner.
|
||||
///
|
||||
/// @heading Design Pattern:
|
||||
/// ## Design Pattern ##
|
||||
/// Parameterization_mesh_patch_3 is a Decorator [GHJV95]: it changes the behavior
|
||||
/// of a ParameterizationPatchableMesh_3 3D surface while keeping its
|
||||
/// ParameterizationMesh_3 interface.
|
||||
///
|
||||
/// @heading Parameters:
|
||||
/// @param ParameterizationPatchableMesh_3 3D surface mesh.
|
||||
/// @param ParameterizationPatchableMesh_3 3D surface mesh.
|
||||
|
||||
template<class ParameterizationPatchableMesh_3>
|
||||
class Parameterization_mesh_patch_3
|
||||
|
|
@ -75,9 +74,7 @@ public:
|
|||
typedef ParameterizationPatchableMesh_3 Adaptor;
|
||||
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
/// @subheading Types implementing the ParameterizationMesh_3 interface
|
||||
////////////////////////////////////////////////////////////////////
|
||||
/// \name Types implementing the ParameterizationMesh_3 interface
|
||||
/// @{
|
||||
|
||||
/// Number type to represent coordinates.
|
||||
|
|
@ -159,11 +156,10 @@ public:
|
|||
/// describes the border of a topological disc. This border may be an actual
|
||||
/// border of the mesh or a virtual border.
|
||||
///
|
||||
/// @commentheading Preconditions:
|
||||
/// - first_seam_vertex -> end_seam_vertex defines the outer seam,
|
||||
/// \pre first_seam_vertex -> end_seam_vertex defines the outer seam,
|
||||
/// i.e. Parameterization_mesh_patch_3 will export the "right" of the seam.
|
||||
/// - The "seam" is given as a container of Adaptor::Vertex_handle elements.
|
||||
/// - The "seam" is implicitely a loop. The first vertex should *not* be
|
||||
/// \pre The "seam" is given as a container of Adaptor::Vertex_handle elements.
|
||||
/// \pre The "seam" is implicitely a loop. The first vertex should *not* be
|
||||
/// duplicated at the end.
|
||||
template<class InputIterator>
|
||||
Parameterization_mesh_patch_3(Adaptor& mesh,
|
||||
|
|
@ -258,9 +254,7 @@ public:
|
|||
Adaptor& get_decorated_mesh() { return *m_mesh_adaptor; }
|
||||
const Adaptor& get_decorated_mesh() const { return *m_mesh_adaptor; }
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
/// @subheading Methods implementing the ParameterizationMesh_3 interface
|
||||
////////////////////////////////////////////////////////////////////
|
||||
/// \name Methods implementing the ParameterizationMesh_3 interface
|
||||
/// @{
|
||||
|
||||
// MESH INTERFACE
|
||||
|
|
@ -602,11 +596,10 @@ private:
|
|||
/// w.r.t. the first_seam_vertex -> end_seam_vertex border
|
||||
/// (outer seam edges are marked BORDER).
|
||||
///
|
||||
/// @commentheading Preconditions:
|
||||
/// - first_seam_vertex -> end_seam_vertex defines the outer seam,
|
||||
/// \pre first_seam_vertex -> end_seam_vertex defines the outer seam,
|
||||
/// i.e. Parameterization_mesh_patch_3 will export the "right" of the seam.
|
||||
/// - The "seam" is given as a container of Adaptor::Vertex_handle elements.
|
||||
/// - The "seam" is implicitely a loop. The first vertex should *not* be
|
||||
/// \pre The "seam" is given as a container of Adaptor::Vertex_handle elements.
|
||||
/// \pre The "seam" is implicitely a loop. The first vertex should *not* be
|
||||
/// duplicated at the end.
|
||||
template<class InputIterator>
|
||||
void set_mesh_seaming(InputIterator first_seam_vertex,
|
||||
|
|
@ -696,12 +689,11 @@ private:
|
|||
/// Set the seaming flag of inner vertices and edges to INNER
|
||||
/// by filling the topological disk.
|
||||
///
|
||||
/// @commentheading Preconditions:
|
||||
/// - Inner vertices are marked as OUTER, seam vertices as BORDER.
|
||||
/// - Inner edges are marked as OUTER,
|
||||
/// \pre Inner vertices are marked as OUTER, seam vertices as BORDER.
|
||||
/// \pre Inner edges are marked as OUTER,
|
||||
/// outer seam edges as BORDER, inner seam edges as INNER.
|
||||
/// - pSeedVertex is in the inner region.
|
||||
/// - pSeedVertex != NULL.
|
||||
/// \pre pSeedVertex is in the inner region.
|
||||
/// \pre pSeedVertex != NULL.
|
||||
///
|
||||
/// Implementation note:
|
||||
/// The seaming status of inner edges is unused, thus this part is not tested.
|
||||
|
|
@ -748,13 +740,12 @@ private:
|
|||
|
||||
// Check that the seam is valid, i.e. that the cut mesh is 2-manifold.
|
||||
///
|
||||
/// @commentheading Preconditions:
|
||||
/// - first_seam_vertex -> end_seam_vertex defines the outer seam,
|
||||
/// \pre first_seam_vertex -> end_seam_vertex defines the outer seam,
|
||||
/// i.e. Parameterization_mesh_patch_3 will export the "right" of the seam.
|
||||
/// - The "seam" is given as a container of Adaptor::Vertex_handle elements.
|
||||
/// - The "seam" is implicitely a loop. The first vertex should *not* be
|
||||
/// \pre The "seam" is given as a container of Adaptor::Vertex_handle elements.
|
||||
/// \pre The "seam" is implicitely a loop. The first vertex should *not* be
|
||||
/// duplicated at the end.
|
||||
/// - The seaming flag of all vertices and edges to INNER, BORDER or OUTER
|
||||
/// \pre The seaming flag of all vertices and edges to INNER, BORDER or OUTER
|
||||
/// w.r.t. the first_seam_vertex -> end_seam_vertex border is set
|
||||
/// (outer seam edges are marked BORDER).
|
||||
template<class InputIterator>
|
||||
|
|
@ -843,9 +834,8 @@ private:
|
|||
|
||||
/// Create a patch vertex from an adaptor vertex + one of its neighbors.
|
||||
///
|
||||
/// @commentheading Preconditions:
|
||||
/// - adaptor_neighbor is a neighbor of adaptor_vertex.
|
||||
/// - (adaptor_vertex, adaptor_neighbor) must *not* be a seam (non-oriented) edge.
|
||||
/// \pre adaptor_neighbor is a neighbor of adaptor_vertex.
|
||||
/// \pre (adaptor_vertex, adaptor_neighbor) must *not* be a seam (non-oriented) edge.
|
||||
Vertex_const_handle get_decorated_vertex_from_inner_edge(
|
||||
typename Adaptor::Vertex_const_handle adaptor_vertex,
|
||||
typename Adaptor::Vertex_const_handle adaptor_neighbor) const
|
||||
|
|
@ -905,11 +895,10 @@ private:
|
|||
/// Create a patch vertex from a border/seam adaptor vertex
|
||||
/// + one of its neighbors on the seam.
|
||||
///
|
||||
/// @commentheading Preconditions:
|
||||
/// - adaptor_vertex is a border/seam vertex.
|
||||
/// - [first_cw_neighbor, last_cw_neighbor] defines the range
|
||||
/// \pre adaptor_vertex is a border/seam vertex.
|
||||
/// \pre [first_cw_neighbor, last_cw_neighbor] defines the range
|
||||
/// of the valid neighbors of adaptor_vertex (included) or are NULL.
|
||||
/// - Either first_cw_neighbor or last_cw_neighbor are not NULL.
|
||||
/// \pre Either first_cw_neighbor or last_cw_neighbor are not NULL.
|
||||
Vertex_const_handle get_decorated_vertex_from_border_edge(
|
||||
typename Adaptor::Vertex_const_handle adaptor_vertex,
|
||||
typename Adaptor::Vertex_const_handle last_cw_neighbor,
|
||||
|
|
|
|||
|
|
@ -58,11 +58,11 @@ namespace CGAL {
|
|||
/// "Patches" are a subset of a 3D mesh. "Virtual seams" are the ability
|
||||
/// to behave exactly as if the surface was cut following a certain path.
|
||||
///
|
||||
/// @heading Is Model for the Concepts:
|
||||
/// Model of ParameterizationPatchableMesh_3 concept, whose purpose is to allow
|
||||
/// the Surface_mesh_parameterization package to access meshes in a uniform manner.
|
||||
/// \models Model of ParameterizationPatchableMesh_3 concept, whose
|
||||
/// purpose is to allow the Surface_mesh_parameterization package to
|
||||
/// access meshes in a uniform manner.
|
||||
///
|
||||
/// @heading Design Pattern:
|
||||
/// ## Design Pattern ##
|
||||
/// Parameterization_polyhedron_adaptor_3 is an Adaptor [GHJV95]: it changes the
|
||||
/// Polyhedron interface to match the ParameterizationPatchableMesh_3 concept.
|
||||
|
||||
|
|
|
|||
|
|
@ -37,10 +37,9 @@ namespace CGAL {
|
|||
/// - Parameterizer_traits_3 defines the Error_code list of errors detected by this package
|
||||
/// - Parameterizer_traits_3 declares a pure virtual method parameterize()
|
||||
///
|
||||
/// @heading Is Model for the Concepts:
|
||||
/// Model of the ParameterizerTraits_3 concept (although you cannot instantiate this class).
|
||||
/// \models ParameterizerTraits_3 (although you cannot instantiate this class).
|
||||
///
|
||||
/// @heading Design Pattern:
|
||||
/// ## Design Pattern ##
|
||||
/// ParameterizerTraits_3 models are Strategies [GHJV95]: they implement
|
||||
/// a strategy of surface parameterization for models of ParameterizationMesh_3.
|
||||
|
||||
|
|
@ -113,9 +112,8 @@ public:
|
|||
/// 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.
|
||||
///
|
||||
/// @commentheading Preconditions:
|
||||
/// - 'mesh' must be a surface with one connected component.
|
||||
/// - 'mesh' must be a triangular mesh.
|
||||
/// \pre 'mesh' must be a surface with one connected component.
|
||||
/// \pre 'mesh' must be a triangular mesh.
|
||||
virtual Error_code parameterize (Adaptor& mesh) = 0;
|
||||
|
||||
/// Get message (in English) corresponding to an error code
|
||||
|
|
|
|||
|
|
@ -49,10 +49,9 @@ namespace CGAL {
|
|||
/// ParameterizationMesh_3 class. They do not know the parameterization algorithm
|
||||
/// requirements or the kind of sparse linear system used.
|
||||
///
|
||||
/// @heading Is Model for the Concepts:
|
||||
/// Model of the BorderParameterizer_3 concept (although you cannot instantiate this class).
|
||||
/// \models BorderParameterizer_3 (although you cannot instantiate this class).
|
||||
///
|
||||
/// @heading Design Pattern:
|
||||
/// ## Design Pattern ##
|
||||
/// BorderParameterizer_3 models are Strategies [GHJV95]: they implement
|
||||
/// a strategy of border parameterization for models of ParameterizationMesh_3.
|
||||
|
||||
|
|
@ -289,9 +288,9 @@ Square_border_parameterizer_3<Adaptor>::closest_iterator(Adaptor& mesh,
|
|||
/// algorithm. This class implements only compute_edge_length() to compute a
|
||||
/// segment's length.
|
||||
///
|
||||
/// @heading Is Model for the Concepts: Model of the BorderParameterizer_3 concept.
|
||||
/// \models BorderParameterizer_3
|
||||
///
|
||||
/// @heading Design Pattern:
|
||||
/// ## Design Pattern ##
|
||||
/// BorderParameterizer_3 models are Strategies [GHJV95]: they implement
|
||||
/// a strategy of border parameterization for models of ParameterizationMesh_3.
|
||||
|
||||
|
|
@ -370,9 +369,9 @@ protected:
|
|||
/// algorithm. This class implements only compute_edge_length() to compute a
|
||||
/// segment's length.
|
||||
///
|
||||
/// @heading Is Model for the Concepts: Model of the BorderParameterizer_3 concept.
|
||||
/// \models BorderParameterizer_3
|
||||
///
|
||||
/// @heading Design Pattern:
|
||||
/// ## Design Pattern ##
|
||||
/// BorderParameterizer_3 models are Strategies [GHJV95]: they implement
|
||||
/// a strategy of border parameterization for models of ParameterizationMesh_3
|
||||
|
||||
|
|
|
|||
|
|
@ -43,9 +43,8 @@ template<class T> struct Taucs_traits;
|
|||
/// This kind of matrix can be either symmetric or not. Symmetric
|
||||
/// matrices store only the lower triangle.
|
||||
///
|
||||
/// @heading Is Model for the Concepts: Model of the SparseLinearAlgebraTraits_d::Matrix concept.
|
||||
/// \models SparseLinearAlgebraTraits_d::Matrix
|
||||
///
|
||||
/// @heading Parameters:
|
||||
/// @param T Number type. Tested with T = taucs_single or taucs_double.
|
||||
/// May also work with T = taucs_dcomplex and taucs_scomplex.
|
||||
|
||||
|
|
@ -167,7 +166,7 @@ public:
|
|||
|
||||
/// Create a rectangular matrix initialized with zeros.
|
||||
///
|
||||
/// @commentheading Precondition: rows == columns if is_symmetric is true.
|
||||
/// \pre rows == columns if is_symmetric is true.
|
||||
Taucs_matrix(int rows, ///< Number of rows.
|
||||
int columns, ///< Number of columns.
|
||||
bool is_symmetric = false) ///< Symmetric/hermitian?
|
||||
|
|
@ -206,9 +205,8 @@ public:
|
|||
|
||||
/// Read access to a matrix coefficient.
|
||||
///
|
||||
/// @commentheading Preconditions:
|
||||
/// - 0 <= i < row_dimension().
|
||||
/// - 0 <= j < column_dimension().
|
||||
/// \pre 0 <= i < row_dimension().
|
||||
/// \pre 0 <= j < column_dimension().
|
||||
T get_coef(int i, int j) const
|
||||
{
|
||||
CGAL_precondition(i < m_row_dimension);
|
||||
|
|
@ -234,9 +232,8 @@ public:
|
|||
/// - Caller can optimize this call by setting 'new_coef' to true
|
||||
/// if the coefficient does not already exist in the matrix.
|
||||
///
|
||||
/// @commentheading Preconditions:
|
||||
/// - 0 <= i < row_dimension().
|
||||
/// - 0 <= j < column_dimension().
|
||||
/// \pre 0 <= i < row_dimension().
|
||||
/// \pre 0 <= j < column_dimension().
|
||||
void set_coef(int i, int j, T val, bool new_coef = false)
|
||||
{
|
||||
CGAL_precondition(i < m_row_dimension);
|
||||
|
|
@ -267,9 +264,8 @@ public:
|
|||
/// For symmetric matrices, Taucs_matrix stores only the lower triangle
|
||||
/// add_coef() does nothing if (i, j) belongs to the upper triangle.
|
||||
///
|
||||
/// @commentheading Preconditions:
|
||||
/// - 0 <= i < row_dimension().
|
||||
/// - 0 <= j < column_dimension().
|
||||
/// \pre 0 <= i < row_dimension().
|
||||
/// \pre 0 <= j < column_dimension().
|
||||
void add_coef(int i, int j, T val)
|
||||
{
|
||||
CGAL_precondition(i < m_row_dimension);
|
||||
|
|
@ -409,9 +405,8 @@ private:
|
|||
///
|
||||
/// Symmetric matrices store only the lower triangle.
|
||||
///
|
||||
/// @heading Is Model for the Concepts: Model of the SparseLinearAlgebraTraits_d::Matrix concept.
|
||||
/// \models SparseLinearAlgebraTraits_d::Matrix
|
||||
///
|
||||
/// @heading Parameters:
|
||||
/// @param T Number type. Tested with T = taucs_single or taucs_double.
|
||||
/// May also work with T = taucs_dcomplex and taucs_scomplex.
|
||||
|
||||
|
|
@ -435,7 +430,7 @@ public:
|
|||
|
||||
/// Create a square *symmetric* matrix initialized with zeros.
|
||||
///
|
||||
/// @commentheading Precondition: rows == columns.
|
||||
/// \pre rows == columns.
|
||||
Taucs_symmetric_matrix(int rows, ///< Number of rows.
|
||||
int columns) ///< Number of columns.
|
||||
: Taucs_matrix<T>(rows, columns, true /* symmetric */)
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ namespace CGAL {
|
|||
/// using TAUCS solvers family.
|
||||
/// The default solver is the Multifrontal Supernodal Cholesky Factorization.
|
||||
///
|
||||
/// @heading Is Model for the Concepts: Model of the SparseLinearAlgebraTraits_d concept.
|
||||
/// \models SparseLinearAlgebraTraits_d
|
||||
|
||||
template<class T> // Tested with T = taucs_single or taucs_double
|
||||
// May also work with T = taucs_dcomplex and taucs_scomplex
|
||||
|
|
@ -90,9 +90,8 @@ public:
|
|||
/// Solve the sparse linear system "A*X = B".
|
||||
/// Return true on success. The solution is then (1/D) * X.
|
||||
///
|
||||
/// @commentheading Preconditions:
|
||||
/// - A.row_dimension() == B.dimension().
|
||||
/// - A.column_dimension() == X.dimension().
|
||||
/// \pre A.row_dimension() == B.dimension().
|
||||
/// \pre A.column_dimension() == X.dimension().
|
||||
bool linear_solver (const Matrix& A, const Vector& B, Vector& X, NT& D)
|
||||
{
|
||||
D = 1; // TAUCS does not support homogeneous coordinates
|
||||
|
|
@ -191,7 +190,7 @@ private:
|
|||
/// is a traits class for solving GENERAL (aka unsymmetric) sparse linear systems
|
||||
/// using TAUCS out-of-core LU factorization.
|
||||
///
|
||||
/// @heading Is Model for the Concepts: Model of the SparseLinearAlgebraTraits_d concept.
|
||||
/// \models SparseLinearAlgebraTraits_d
|
||||
|
||||
template<class T> // Tested with T = taucs_single or taucs_double
|
||||
// May also work with T = taucs_dcomplex and taucs_scomplex
|
||||
|
|
@ -215,9 +214,8 @@ public:
|
|||
/// Solve the sparse linear system "A*X = B".
|
||||
/// Return true on success. The solution is then (1/D) * X.
|
||||
///
|
||||
/// @commentheading Preconditions:
|
||||
/// - A.row_dimension() == B.dimension().
|
||||
/// - A.column_dimension() == X.dimension().
|
||||
/// \pre A.row_dimension() == B.dimension().
|
||||
/// \pre A.column_dimension() == X.dimension().
|
||||
bool linear_solver (const Matrix& A, const Vector& B, Vector& X, NT& D)
|
||||
{
|
||||
D = 1; // TAUCS does not support homogeneous coordinates
|
||||
|
|
|
|||
|
|
@ -28,8 +28,7 @@ namespace CGAL {
|
|||
/// The class Taucs_vector
|
||||
/// is a C++ wrapper around TAUCS' vector type, which is a simple array.
|
||||
///
|
||||
/// @heading Is Model for the Concepts: Model of the SparseLinearAlgebraTraits_d::Vector concept.
|
||||
|
||||
/// \models SparseLinearAlgebraTraits_d::Vector
|
||||
template<class T> // Tested with T = taucs_single or taucs_double
|
||||
// May also work with T = taucs_dcomplex and taucs_scomplex
|
||||
class Taucs_vector
|
||||
|
|
@ -88,8 +87,7 @@ public:
|
|||
|
||||
/// Read/write access to a vector coefficient.
|
||||
///
|
||||
/// @commentheading Preconditions:
|
||||
/// 0 <= i < dimension().
|
||||
/// \pre 0 <= i < dimension().
|
||||
T operator[](int i) const {
|
||||
CGAL_precondition(i < m_dimension);
|
||||
return m_element[i];
|
||||
|
|
|
|||
|
|
@ -44,9 +44,9 @@ namespace CGAL {
|
|||
/// ParameterizationMesh_3 class. They do not know the parameterization algorithm
|
||||
/// requirements or the kind of sparse linear system used.
|
||||
///
|
||||
/// @heading Is Model for the Concepts: Model of the BorderParameterizer_3 concept.
|
||||
/// \models BorderParameterizer_3
|
||||
///
|
||||
/// @heading Design Pattern:
|
||||
/// ## Design Pattern ##
|
||||
/// BorderParameterizer_3 models are Strategies [GHJV95]: they implement
|
||||
/// a strategy of border parameterization for models of ParameterizationMesh_3.
|
||||
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@
|
|||
|
||||
namespace CGAL {
|
||||
|
||||
/// C++ class wrapping a Win32 structured exception.
|
||||
// C++ class wrapping a Win32 structured exception.
|
||||
class Win32_exception
|
||||
{
|
||||
// Data
|
||||
|
|
@ -45,6 +45,7 @@ public:
|
|||
};
|
||||
|
||||
|
||||
/// \internal
|
||||
/// Class Win32_exception_handler:
|
||||
/// - Translate Win32 structured exceptions to C++ exceptions.
|
||||
/// - Protect application against stack overflow using _resetstkoflw()
|
||||
|
|
|
|||
|
|
@ -33,9 +33,8 @@ namespace CGAL {
|
|||
/// 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.
|
||||
///
|
||||
/// @commentheading Preconditions:
|
||||
/// - 'mesh' must be a surface with one connected component.
|
||||
/// - 'mesh' must be a triangular mesh.
|
||||
/// \pre 'mesh' must be a surface with one connected component.
|
||||
/// \pre 'mesh' must be a triangular mesh.
|
||||
///
|
||||
template <class ParameterizationMesh_3>
|
||||
typename Parameterizer_traits_3<ParameterizationMesh_3>::Error_code
|
||||
|
|
@ -54,11 +53,10 @@ parameterize(ParameterizationMesh_3& mesh) ///< 3D mesh, model of Parameterizat
|
|||
/// One-to-one mapping may be guaranteed or
|
||||
/// not, depending on the chosen ParametizerTraits_3 algorithm.
|
||||
///
|
||||
/// @commentheading Preconditions:
|
||||
/// - 'mesh' must be a surface with one connected component.
|
||||
/// - 'mesh' must be a triangular mesh.
|
||||
/// - The mesh border must be mapped onto a convex polygon
|
||||
/// (for fixed border parameterizations).
|
||||
/// \pre 'mesh' must be a surface with one connected component.
|
||||
/// \pre 'mesh' must be a triangular mesh.
|
||||
/// \pre The mesh border must be mapped onto a convex polygon
|
||||
/// (for fixed border parameterizations).
|
||||
///
|
||||
template <class ParameterizationMesh_3, class ParameterizerTraits_3>
|
||||
typename Parameterizer_traits_3<ParameterizationMesh_3>::Error_code
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@
|
|||
// It can have have any number of borders. Its "main border"
|
||||
// will be the mesh's longest border (if there is at least one border).
|
||||
//
|
||||
// @heading Design Pattern:
|
||||
// @heading Design Pattern
|
||||
// Parameterization_polyhedron_adaptor_ex is an Adaptor [GHJV95]: it changes the
|
||||
// Polyhedron_ex interface to match the ParameterizationPatchableMesh_3 concept
|
||||
|
||||
|
|
|
|||
|
|
@ -9,15 +9,14 @@ to view a triangulated Delaunay graph as their dual subdivision, the
|
|||
Voronoi diagram. The class `Voronoi_diagram_2` is designed to provide an API
|
||||
that is similar to that of \cgal's arrangements.
|
||||
|
||||
\tparam DG The first template parameter of the `Voronoi_diagram_2` class corresponds to the triangulated Delaunay graph and must be a model of the `DelaunayGraph_2` concept.
|
||||
\tparam DG corresponds to the triangulated Delaunay graph and must be a model of the `DelaunayGraph_2` concept.
|
||||
|
||||
\tparam The second template parameter must be a model of the `AdaptationTraits_2` concept.
|
||||
\tparam AT must be a model of the `AdaptationTraits_2` concept.
|
||||
|
||||
\tparam The third template parameter must be a model of the `AdaptationPolicy_2` concept. The third template parameter defaults to `CGAL::Identity_policy_2<DG,AT>`.
|
||||
\tparam AP must be a model of the `AdaptationPolicy_2` concept. The third template parameter defaults to `CGAL::Identity_policy_2<DG,AT>`.
|
||||
|
||||
\refines ::DefaultConstructible, \refines ::CopyConstructible, \refines ::Assignable
|
||||
|
||||
|
||||
|
||||
\sa `CGAL::Delaunay_triangulation_2<Traits,Tds>`
|
||||
\sa `CGAL::Regular_triangulation_2<Traits,Tds>`
|
||||
|
|
|
|||