Rename Parameterization package as Surface_mesh_parameterization
|
|
@ -1183,36 +1183,6 @@ Optimisation_doc/doc_tex/Optimisation/polydist.gif -text svneol=unset#unset
|
|||
Optimisation_doc/doc_tex/Optimisation/polydist.pdf -text svneol=unset#unset
|
||||
PS_Stream/doc_tex/PS_Stream/exemple.ps -text
|
||||
PS_Stream/doc_tex/PS_Stream/style.ps -text
|
||||
Parameterization/doc/specification/param.pdf -text svneol=unset#unset
|
||||
Parameterization/doc_tex/Parameterization/LSCM.eps -text
|
||||
Parameterization/doc_tex/Parameterization/LSCM.png -text svneol=unset#unset
|
||||
Parameterization/doc_tex/Parameterization/authalic.eps -text
|
||||
Parameterization/doc_tex/Parameterization/authalic.png -text svneol=unset#unset
|
||||
Parameterization/doc_tex/Parameterization/conformal.eps -text
|
||||
Parameterization/doc_tex/Parameterization/conformal.png -text svneol=unset#unset
|
||||
Parameterization/doc_tex/Parameterization/floater.eps -text
|
||||
Parameterization/doc_tex/Parameterization/floater.png -text svneol=unset#unset
|
||||
Parameterization/doc_tex/Parameterization/introduction.eps -text
|
||||
Parameterization/doc_tex/Parameterization/introduction.png -text svneol=unset#unset
|
||||
Parameterization/doc_tex/Parameterization/parameterizer_class_diagram.eps -text
|
||||
Parameterization/doc_tex/Parameterization/parameterizer_class_diagram.png -text svneol=unset#unset
|
||||
Parameterization/doc_tex/Parameterization/parameterizers_class_hierarchy.eps -text
|
||||
Parameterization/doc_tex/Parameterization/parameterizers_class_hierarchy.png -text svneol=unset#unset
|
||||
Parameterization/doc_tex/Parameterization/uniform.eps -text
|
||||
Parameterization/doc_tex/Parameterization/uniform.png -text svneol=unset#unset
|
||||
Parameterization/examples/Parameterization/data/grid512.bmp -text svneol=unset#unset
|
||||
Parameterization/examples/Parameterization/data/holes.off -text
|
||||
Parameterization/examples/Parameterization/data/mannequin-devil.off -text
|
||||
Parameterization/examples/Parameterization/data/mask_cone.off -text
|
||||
Parameterization/examples/Parameterization/data/nefertiti.off -text
|
||||
Parameterization/examples/Parameterization/data/parameterization.mtl -text
|
||||
Parameterization/examples/Parameterization/data/rotor.off -text
|
||||
Parameterization/examples/Parameterization/data/sphere966.off -text
|
||||
Parameterization/examples/Parameterization/data/three_peaks.off -text
|
||||
Parameterization/test/Parameterization/data/aircraft.off -text
|
||||
Parameterization/test/Parameterization/data/cube.off -text
|
||||
Parameterization/test/Parameterization/data/knot2.off -text
|
||||
Parameterization/test/Parameterization/data/torus_tri.off -text
|
||||
Partition_2/demo/Partition_2/partition_2.vcproj -text
|
||||
Partition_2/doc_tex/Partition_2/Idar-Oberstein_appx_cvx.gif -text svneol=unset#unset
|
||||
Partition_2/doc_tex/Partition_2/Idar-Oberstein_appx_cvx.pdf -text svneol=unset#unset
|
||||
|
|
|
|||
|
|
@ -189,30 +189,6 @@ Optimisation_doc/.tmp
|
|||
Optimisation_doc/Makefile
|
||||
Optimisation_doc/bin
|
||||
Optimisation_doc/doc_ps
|
||||
Parameterization/doc_doxygen
|
||||
Parameterization/doc_html
|
||||
Parameterization/doc_pdf
|
||||
Parameterization/doc_ps
|
||||
Parameterization/examples/Parameterization/*.kdev*
|
||||
Parameterization/examples/Parameterization/*.ncb
|
||||
Parameterization/examples/Parameterization/*.suo
|
||||
Parameterization/examples/Parameterization/*_extra.*
|
||||
Parameterization/examples/Parameterization/*_parameterization
|
||||
Parameterization/examples/Parameterization/Complete_parameterization_example
|
||||
Parameterization/examples/Parameterization/Debug
|
||||
Parameterization/examples/Parameterization/ProgramOutput.*
|
||||
Parameterization/examples/Parameterization/Release
|
||||
Parameterization/examples/Parameterization/data/extras
|
||||
Parameterization/examples/Parameterization/error.txt
|
||||
Parameterization/examples/Parameterization/test
|
||||
Parameterization/test/Parameterization/*.kdev*
|
||||
Parameterization/test/Parameterization/*.ncb
|
||||
Parameterization/test/Parameterization/*.suo
|
||||
Parameterization/test/Parameterization/Debug
|
||||
Parameterization/test/Parameterization/ProgramOutput.*
|
||||
Parameterization/test/Parameterization/Release
|
||||
Parameterization/test/Parameterization/error.txt
|
||||
Parameterization/test/Parameterization/extensive_parameterization_test
|
||||
Polytope_distance_d/*.aux
|
||||
Polytope_distance_d/*.bbl
|
||||
Polytope_distance_d/*.blg
|
||||
|
|
|
|||
|
|
@ -1,3 +1,6 @@
|
|||
1 March 2006
|
||||
- Rename Parameterization as Surface_mesh_parameterization
|
||||
|
||||
1 March 2006
|
||||
- Add Subdivision_method_3
|
||||
|
||||
|
|
@ -79,14 +82,14 @@
|
|||
- create_testresult_page :
|
||||
- remove obsolete print_header() function.
|
||||
- add <blink> for the documentation link.
|
||||
|
||||
|
||||
14 August 2004 Radu Ursu
|
||||
- create_testresults_page: tried to fix warnings of this type:
|
||||
Use of uninitialized value in numeric le (<=) at ./create_testresult_page line 70.
|
||||
Use of uninitialized value in numeric le (<=) at ./create_testresult_page line 70.
|
||||
|
||||
10 August 2004 Radu Ursu
|
||||
- create_testresult_page sorts correctly the array containing the name of the
|
||||
testresults posted by testers. (eg. 3.1-100 > 3.1-I-99 works now)
|
||||
- create_testresult_page sorts correctly the array containing the name of the
|
||||
testresults posted by testers. (eg. 3.1-100 > 3.1-I-99 works now)
|
||||
|
||||
3 August 2004 Sylvain Pion
|
||||
- create_testresult_page, to_zipped_format : make use of the new TESTER_NAME
|
||||
|
|
|
|||
|
|
@ -58,7 +58,7 @@ Number_types
|
|||
OpenNL
|
||||
Optimisation_basic
|
||||
Optimisation_doc
|
||||
Parameterization
|
||||
Surface_mesh_parameterization
|
||||
Partition_2
|
||||
Point_set_2
|
||||
Polygon
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@
|
|||
\cleardoublepage
|
||||
\pagenumbering{arabic}
|
||||
\setcounter{page}{1}
|
||||
|
||||
|
||||
\cgalchapters{
|
||||
\entryleftright{\part{Preface}}{\part{Reference Manual}}
|
||||
|
||||
|
|
@ -72,8 +72,8 @@
|
|||
\packageleftright{Mesh_2}{Mesh_2_ref}
|
||||
\packageleftright{Interpolation}{Interpolation_ref}
|
||||
% \packageleftright{Skin_surface_3}{Skin_surface_3_ref}
|
||||
\packageleftright{Subdivision_method_3}{Subdivision_method_3_ref}
|
||||
\packageleftright{Parameterization}{Parameterization_ref}
|
||||
\packageleftright{Subdivision_method_3}{Subdivision_method_3_ref}
|
||||
\packageleftright{Surface_mesh_parameterization}{Surface_mesh_parameterization_ref}
|
||||
\packageleftright{Optimisation}{Optimisation_ref}
|
||||
\packageleftright{Principal_component_analysis}{Principal_component_analysis_ref}
|
||||
\packageleftright{Point_set_2}{Point_set_2_ref}
|
||||
|
|
|
|||
|
|
@ -1,20 +0,0 @@
|
|||
Parameterization Package: Release changes
|
||||
-----------------------------------------
|
||||
|
||||
0.6 (12/06/2005)
|
||||
|
||||
- First version of the package is finished.
|
||||
First submission to CGAL editorial board.
|
||||
See "Not Yet Implemented" paragraph in User Manual
|
||||
for known bugs and tasks to do quickly.
|
||||
|
||||
0.5 (10/18/2005)
|
||||
|
||||
- Most of the first version of the package is finished.
|
||||
Internal review at INRIA Sophia-Antipolis.
|
||||
|
||||
0.1 (03/30/2005)
|
||||
|
||||
- Initial develop version
|
||||
|
||||
None of this package was available in CGAL 3.1.
|
||||
|
|
@ -1,20 +0,0 @@
|
|||
Planar Parameterization of Triangulated Surface Meshes
|
||||
|
||||
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 CGAL package implements some of the state-of-the-art parameterization
|
||||
methods, such as Least Squares Conformal Maps, Discrete Conformal Map, Natural Conformal Map,
|
||||
Discrete Authalic Parameterization, Floater Mean Value Coordinates or
|
||||
Tutte Barycentric Mapping.
|
||||
|
||||
The package proposes an interface with both the 2D Triangulation Data Structure
|
||||
enriched with 3D points and the Polyhedron.
|
||||
|
||||
Since parameterizing meshes require efficient representation of sparse matrices
|
||||
and efficient iterative or direct linear solvers, we provide link to standard
|
||||
packages (TAUCS, SuperLU) and propose a separate package devoted to OpenNL
|
||||
sparse linear solver (Levy).
|
||||
|
||||
|
|
@ -1,55 +0,0 @@
|
|||
// Copyright (c) 2005 INRIA (France).
|
||||
// All rights reserved.
|
||||
//
|
||||
// This file is part of CGAL (www.cgal.org); you may redistribute it under
|
||||
// the terms of the Q Public License version 1.0.
|
||||
// See the file LICENSE.QPL distributed with CGAL.
|
||||
//
|
||||
// Licensees holding a valid commercial license may use this file in
|
||||
// accordance with the commercial license agreement provided with the software.
|
||||
//
|
||||
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
||||
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
//
|
||||
// $URL$
|
||||
// $Id$
|
||||
//
|
||||
//
|
||||
// Author(s) : Laurent Saboret, Pierre Alliez, Bruno Levy
|
||||
|
||||
|
||||
/// BorderParameterizer_3 is a concept of class that parameterizes a given type of mesh,
|
||||
/// 'Adaptor', which is a model of the ParameterizationMesh_3 concept.
|
||||
///
|
||||
/// Implementation note:
|
||||
/// To simplify the implementation, BorderParameterizer_3 models know only the
|
||||
/// ParameterizationMesh_3 class. They do not know the parameterization algorithm
|
||||
/// requirements nor the kind of sparse linear system used.
|
||||
///
|
||||
/// Design Pattern:
|
||||
/// BorderParameterizer_3 models are Strategies [GHJV95]: they implement
|
||||
/// a strategy of border parameterization for models of ParameterizationMesh_3.
|
||||
|
||||
class BorderParameterizer_3
|
||||
{
|
||||
// Public types
|
||||
public:
|
||||
/// Export ParameterizationMesh_3 template parameter
|
||||
typedef xxx Adaptor;
|
||||
|
||||
/// The various errors detected by this package
|
||||
typedef xxx Error_code;
|
||||
|
||||
// Public operations
|
||||
public:
|
||||
// Construction and destruction are undefined
|
||||
|
||||
/// Assign to mesh's border vertices a 2D position (ie a (u,v) pair)
|
||||
/// on border's shape. Mark them as "parameterized".
|
||||
/// Return false on error.
|
||||
Error_code parameterize_border (Adaptor* mesh);
|
||||
|
||||
/// Indicate if border's shape is convex.
|
||||
bool is_border_convex ();
|
||||
};
|
||||
|
||||
|
|
@ -1,71 +0,0 @@
|
|||
// Copyright (c) 2005 INRIA (France).
|
||||
// All rights reserved.
|
||||
//
|
||||
// This file is part of CGAL (www.cgal.org); you may redistribute it under
|
||||
// the terms of the Q Public License version 1.0.
|
||||
// See the file LICENSE.QPL distributed with CGAL.
|
||||
//
|
||||
// Licensees holding a valid commercial license may use this file in
|
||||
// accordance with the commercial license agreement provided with the software.
|
||||
//
|
||||
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
||||
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
//
|
||||
// $URL$
|
||||
// $Id$
|
||||
//
|
||||
//
|
||||
// Author(s) : Laurent Saboret, Pierre Alliez, Bruno Levy
|
||||
|
||||
|
||||
/// SparseLinearAlgebraTraits_d::Matrix
|
||||
/// is a concept of a sparse matrix class.
|
||||
///
|
||||
/// Sub-concept: This is a sub-concept of LinearAlgebraTraits_d::Matrix.
|
||||
///
|
||||
/// Models:
|
||||
/// - Taucs_matrix
|
||||
/// - OpenNL::SparseMatrix
|
||||
|
||||
class 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 1 matrix coefficient.
|
||||
///
|
||||
/// Preconditions:
|
||||
/// - 0 <= row < row_dimension().
|
||||
/// - 0 <= column < column_dimension().
|
||||
NT get_coef (int row, int column) const;
|
||||
|
||||
/// Write access to 1 matrix coefficient: a_ij <- a_ij + val.
|
||||
///
|
||||
/// Preconditions:
|
||||
/// - 0 <= row < row_dimension().
|
||||
/// - 0 <= column < column_dimension().
|
||||
void add_coef(int row, int column, NT value);
|
||||
|
||||
/// Write access to 1 matrix coefficient.
|
||||
///
|
||||
/// Preconditions:
|
||||
/// - 0 <= row < row_dimension().
|
||||
/// - 0 <= column < column_dimension().
|
||||
void set_coef (int row, int column, NT value);
|
||||
};
|
||||
|
||||
|
|
@ -1,200 +0,0 @@
|
|||
// Copyright (c) 2005 INRIA (France).
|
||||
// All rights reserved.
|
||||
//
|
||||
// This file is part of CGAL (www.cgal.org); you may redistribute it under
|
||||
// the terms of the Q Public License version 1.0.
|
||||
// See the file LICENSE.QPL distributed with CGAL.
|
||||
//
|
||||
// Licensees holding a valid commercial license may use this file in
|
||||
// accordance with the commercial license agreement provided with the software.
|
||||
//
|
||||
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
||||
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
//
|
||||
// $URL$
|
||||
// $Id$
|
||||
//
|
||||
//
|
||||
// Author(s) : Laurent Saboret, Pierre Alliez, Bruno Levy
|
||||
|
||||
|
||||
/// 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.
|
||||
///
|
||||
/// A ParameterizationMesh_3 surface consists of vertices, facets and an incidence relation on them.
|
||||
/// No notion of edge is requested.
|
||||
/// Vertices represent points in 3d-space. Facets are planar polygons without holes
|
||||
/// defined by the circular sequence of vertices along their border.
|
||||
/// The surface itself can have holes. The vertices
|
||||
/// along the border of a hole are called "border vertices".
|
||||
/// A surface is "closed" if it contains no border vertices.
|
||||
///
|
||||
/// The surface must be an oriented 2-manifold with border vertices, i.e.
|
||||
/// the neighborhood of each point on the surface is either
|
||||
/// homeomorphic to a disc or to a half disc, except for vertices where
|
||||
/// many holes and surfaces with border can join.
|
||||
///
|
||||
/// ParameterizationMesh_3 defines the types, data and methods that a mesh must implement
|
||||
/// to allow surface parameterization.
|
||||
/// Among other things, this concept defines accessors to fields specific
|
||||
/// to parameterizations methods: index, u, v, is_parameterized.
|
||||
///
|
||||
/// ParameterizationMesh_3 meshes can have any genus, arity or number of components. In the other hand,
|
||||
/// as parameterization methods deal only with topological disks, ParameterizationMesh_3
|
||||
/// defines an interface oriented towards topological disks.
|
||||
///
|
||||
/// Models:
|
||||
/// - Adaptators for Polyhedron_3 and TDS_2 with 3D points are provided.
|
||||
/// - Parameterization_mesh_patch_3<M> is a model of ParameterizationMesh_3 if
|
||||
/// M is a model of MeshAdaptorWithStream_3.
|
||||
///
|
||||
/// 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.
|
||||
|
||||
class ParameterizationMesh_3
|
||||
{
|
||||
// Public types
|
||||
public:
|
||||
|
||||
/// Number type to represent coordinates.
|
||||
typedef xxx NT;
|
||||
|
||||
/// 2D point that represents (u,v) coordinates computed
|
||||
/// by parameterization methods. Must provide X() and Y() methods.
|
||||
typedef xxx Point_2;
|
||||
/// 3D point that represents vertices coordinates. Must provide X() and Y() methods.
|
||||
typedef xxx Point_3;
|
||||
/// 2D vector. Must provide X() and Y() methods.
|
||||
typedef xxx Vector_2;
|
||||
/// 3D vector. Must provide X() and Y() methods.
|
||||
typedef xxx Vector_3;
|
||||
|
||||
/// Opaque type representing a facet of the 3D mesh. No methods are expected.
|
||||
typedef xxx Facet;
|
||||
/// Handle to a facet. Model of the Handle concept.
|
||||
typedef xxx Facet_handle;
|
||||
typedef xxx Facet_const_handle;
|
||||
/// Iterator over all mesh facets. Model of the ForwardIterator concept.
|
||||
typedef xxx Facet_iterator;
|
||||
typedef xxx Facet_const_iterator;
|
||||
|
||||
/// Opaque type representing a vertex of the 3D mesh. No methods are expected.
|
||||
typedef xxx Vertex;
|
||||
/// Handle to a vertex. Model of the Handle concept.
|
||||
typedef xxx Vertex_handle;
|
||||
typedef xxx Vertex_const_handle;
|
||||
/// Iterator over all vertices of a mesh. Model of the ForwardIterator concept.
|
||||
typedef xxx Vertex_iterator;
|
||||
typedef xxx Vertex_const_iterator;
|
||||
/// Iterator over vertices of the mesh "main border".
|
||||
/// Model of the ForwardIterator concept.
|
||||
typedef xxx Border_vertex_iterator;
|
||||
typedef xxx Border_vertex_const_iterator;
|
||||
/// Counter-clockwise circulator over a facet's vertices.
|
||||
/// Model of the BidirectionalCirculator concept.
|
||||
typedef xxx Vertex_around_facet_circulator;
|
||||
typedef xxx Vertex_around_facet_const_circulator;
|
||||
/// Clockwise circulator over the vertices incident to a vertex.
|
||||
/// Model of the BidirectionalCirculator concept.
|
||||
typedef xxx Vertex_around_vertex_circulator;
|
||||
typedef xxx Vertex_around_vertex_const_circulator;
|
||||
|
||||
|
||||
// Public operations
|
||||
public:
|
||||
|
||||
// Construction and destruction are undefined.
|
||||
|
||||
// MESH INTERFACE
|
||||
|
||||
/// Get iterator over first vertex of mesh.
|
||||
Vertex_iterator mesh_vertices_begin ();
|
||||
Vertex_const_iterator mesh_vertices_begin () const;
|
||||
|
||||
/// Get iterator over past-the-end vertex of mesh.
|
||||
Vertex_iterator mesh_vertices_end ();
|
||||
Vertex_const_iterator mesh_vertices_end () const;
|
||||
|
||||
/// Count the number of vertices of the mesh.
|
||||
int count_mesh_vertices () const;
|
||||
|
||||
/// Index vertices of the mesh from 0 to count_mesh_vertices()-1.
|
||||
void index_mesh_vertices ();
|
||||
|
||||
/// Get iterator over first vertex of mesh's "main border".
|
||||
Border_vertex_iterator mesh_main_border_vertices_begin ();
|
||||
Border_vertex_const_iterator mesh_main_border_vertices_begin () const;
|
||||
|
||||
/// Get iterator over past-the-end vertex of mesh's "main border".
|
||||
Border_vertex_iterator mesh_main_border_vertices_end ();
|
||||
Border_vertex_const_iterator mesh_main_border_vertices_end () const;
|
||||
|
||||
/// Return the border containing seed_vertex.
|
||||
/// Return an empty list if not found.
|
||||
std::list<Vertex_handle> get_border(Vertex_handle seed_vertex);
|
||||
|
||||
/// Get iterator over first facet of mesh
|
||||
Facet_iterator mesh_facets_begin ();
|
||||
Facet_const_iterator mesh_facets_begin () const;
|
||||
|
||||
/// Get iterator over past-the-end facet of mesh.
|
||||
Facet_iterator mesh_facets_end ();
|
||||
Facet_const_iterator mesh_facets_end () const;
|
||||
|
||||
/// Count the number of facets of the mesh.
|
||||
int count_mesh_facets () const;
|
||||
|
||||
/// Return true of all mesh's facets are triangles.
|
||||
bool is_mesh_triangular () const;
|
||||
|
||||
/// Count the number of halfedges of the mesh.
|
||||
int count_mesh_halfedges() const;
|
||||
|
||||
// FACET INTERFACE
|
||||
|
||||
/// Get circulator over facet's vertices.
|
||||
Vertex_around_facet_circulator facet_vertices_begin(Facet_handle facet);
|
||||
Vertex_around_facet_const_circulator facet_vertices_begin(Facet_const_handle facet) const;
|
||||
|
||||
/// Count the number of vertices of a facet.
|
||||
int count_facet_vertices(Facet_const_handle facet) const;
|
||||
|
||||
// VERTEX INTERFACE
|
||||
|
||||
/// Get the 3D position of a vertex.
|
||||
Point_3 get_vertex_position (Vertex_const_handle vertex) const;
|
||||
|
||||
/// Get/set the 2D position (u/v pair) of a vertex. Default value is undefined.
|
||||
Point_2 get_vertex_uv (Vertex_const_handle vertex) const;
|
||||
void set_vertex_uv (Vertex_handle vertex, const Point_2& uv);
|
||||
|
||||
/// Get/set "is parameterized" field of vertex. Default value is undefined.
|
||||
bool is_vertex_parameterized (Vertex_const_handle vertex) const;
|
||||
void set_vertex_parameterized (Vertex_handle vertex, bool parameterized);
|
||||
|
||||
/// Get/set vertex index. Default value is undefined.
|
||||
int get_vertex_index (Vertex_const_handle vertex) const;
|
||||
void set_vertex_index (Vertex_handle vertex, int index);
|
||||
|
||||
/// Get/set vertex' all purpose tag. Default value is undefined.
|
||||
int get_vertex_tag(Vertex_const_handle vertex) const;
|
||||
void set_vertex_tag(Vertex_handle vertex, int tag);
|
||||
|
||||
/// Return true if a vertex belongs to ANY mesh's border.
|
||||
bool is_vertex_on_border(Vertex_const_handle vertex) const;
|
||||
|
||||
/// Return true if a vertex belongs to the UNIQUE mesh's main border.
|
||||
bool is_vertex_on_main_border(Vertex_const_handle vertex) const;
|
||||
|
||||
/// Get circulator over the vertices incident to 'vertex'.
|
||||
/// 'start_position' defines the optional initial position of the circulator.
|
||||
Vertex_around_vertex_circulator vertices_around_vertex_begin(
|
||||
Vertex_handle vertex,
|
||||
Vertex_handle start_position = Vertex_handle());
|
||||
Vertex_around_vertex_const_circulator vertices_around_vertex_begin(
|
||||
Vertex_const_handle vertex,
|
||||
Vertex_const_handle start_position = Vertex_const_handle()) const;
|
||||
|
||||
}; /// ParameterizationMesh_3
|
||||
|
||||
|
|
@ -1,120 +0,0 @@
|
|||
// Copyright (c) 2005 INRIA (France).
|
||||
// All rights reserved.
|
||||
//
|
||||
// This file is part of CGAL (www.cgal.org); you may redistribute it under
|
||||
// the terms of the Q Public License version 1.0.
|
||||
// See the file LICENSE.QPL distributed with CGAL.
|
||||
//
|
||||
// Licensees holding a valid commercial license may use this file in
|
||||
// accordance with the commercial license agreement provided with the software.
|
||||
//
|
||||
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
||||
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
//
|
||||
// $URL$
|
||||
// $Id$
|
||||
//
|
||||
//
|
||||
// Author(s) : Laurent Saboret, Pierre Alliez, Bruno Levy
|
||||
|
||||
|
||||
/// ParameterizationPatchableMesh_3 inherits from concept ParameterizationMesh_3,
|
||||
/// thus is a concept of a 3D surface mesh.
|
||||
///
|
||||
/// ParameterizationPatchableMesh_3 adds the ability to support patches and virtual seams.
|
||||
/// 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.
|
||||
///
|
||||
/// This mainly means that:
|
||||
/// - vertices can be tagged as inside or outside the patch to parameterize.
|
||||
/// - the fields specific to parameterizations (index, u, v, is_parameterized)
|
||||
/// can be set per "corner" (aka half-edge).
|
||||
///
|
||||
/// The main purpose of this feature is to allow the parameterization package
|
||||
/// to parameterize any 3D surface by decomposing it as a list of topological disks.
|
||||
///
|
||||
/// Sub-concept: ParameterizationPatchableMesh_3 inherits from concept ParameterizationMesh_3.
|
||||
///
|
||||
/// 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.
|
||||
///
|
||||
/// Models:
|
||||
/// Adaptators for Polyhedron_3 and TDS_2 with 3D points are provided.
|
||||
|
||||
class ParameterizationPatchableMesh_3 : public ParameterizationMesh_3
|
||||
{
|
||||
// Public types
|
||||
public:
|
||||
|
||||
// Same sub-types as ParameterizationMesh_3
|
||||
|
||||
|
||||
// Public operations
|
||||
public:
|
||||
|
||||
// Construction and destruction are undefined.
|
||||
|
||||
// VERTEX INTERFACE
|
||||
|
||||
/// Get/set vertex seaming flag. Default value is undefined.
|
||||
int get_vertex_seaming(Vertex_const_handle vertex) const;
|
||||
void set_vertex_seaming(Vertex_handle vertex, int seaming);
|
||||
|
||||
|
||||
// EDGE INTERFACE
|
||||
|
||||
/// Get/set oriented edge's seaming flag, ie position of the oriented edge
|
||||
/// wrt to the UNIQUE main border.
|
||||
int get_halfedge_seaming(Vertex_const_handle source, Vertex_const_handle target) const;
|
||||
void set_halfedge_seaming(Vertex_handle source, Vertex_handle target, int seaming);
|
||||
|
||||
|
||||
// CORNER INTERFACE
|
||||
|
||||
/// Get/set the 2D position (= (u,v) pair) of corners at the "right"
|
||||
/// of the prev_vertex -> vertex -> next_vertex line.
|
||||
/// Default value is undefined.
|
||||
Point_2 get_corners_uv(Vertex_const_handle vertex,
|
||||
Vertex_const_handle prev_vertex,
|
||||
Vertex_const_handle next_vertex) const;
|
||||
void set_corners_uv(Vertex_handle vertex,
|
||||
Vertex_const_handle prev_vertex,
|
||||
Vertex_const_handle next_vertex,
|
||||
const Point_2& uv);
|
||||
|
||||
/// Get/set "is parameterized" field of corners at the "right"
|
||||
/// of the prev_vertex -> vertex -> next_vertex line.
|
||||
/// Default value is undefined.
|
||||
bool are_corners_parameterized(Vertex_const_handle vertex,
|
||||
Vertex_const_handle prev_vertex,
|
||||
Vertex_const_handle next_vertex) const;
|
||||
void set_corners_parameterized(Vertex_handle vertex,
|
||||
Vertex_const_handle prev_vertex,
|
||||
Vertex_const_handle next_vertex,
|
||||
bool parameterized);
|
||||
|
||||
/// Get/set index of corners at the "right"
|
||||
/// of the prev_vertex -> vertex -> next_vertex line.
|
||||
/// Default value is undefined.
|
||||
int get_corners_index(Vertex_const_handle vertex,
|
||||
Vertex_const_handle prev_vertex,
|
||||
Vertex_const_handle next_vertex) const;
|
||||
void set_corners_index(Vertex_handle vertex,
|
||||
Vertex_const_handle prev_vertex,
|
||||
Vertex_const_handle next_vertex,
|
||||
int index);
|
||||
|
||||
/// Get/set all purpose tag of corners at the "right"
|
||||
/// of the prev_vertex -> vertex -> next_vertex line.
|
||||
/// Default value is undefined.
|
||||
int get_corners_tag(Vertex_const_handle vertex,
|
||||
Vertex_const_handle prev_vertex,
|
||||
Vertex_const_handle next_vertex) const;
|
||||
void set_corners_tag(Vertex_handle vertex,
|
||||
Vertex_const_handle prev_vertex,
|
||||
Vertex_const_handle next_vertex,
|
||||
int tag);
|
||||
|
||||
}; /// ParameterizationPatchableMesh_3
|
||||
|
||||
|
|
@ -1,62 +0,0 @@
|
|||
// Copyright (c) 2005 INRIA (France).
|
||||
// All rights reserved.
|
||||
//
|
||||
// This file is part of CGAL (www.cgal.org); you may redistribute it under
|
||||
// the terms of the Q Public License version 1.0.
|
||||
// See the file LICENSE.QPL distributed with CGAL.
|
||||
//
|
||||
// Licensees holding a valid commercial license may use this file in
|
||||
// accordance with the commercial license agreement provided with the software.
|
||||
//
|
||||
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
||||
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
//
|
||||
// $URL$
|
||||
// $Id$
|
||||
//
|
||||
//
|
||||
// Author(s) : Laurent Saboret, Pierre Alliez, Bruno Levy
|
||||
|
||||
|
||||
/// ParameterizerTraits_3 is a concept of parameterization object
|
||||
/// for a given type of mesh, 'Adaptor', which is a model of the
|
||||
/// ParameterizationMesh_3 concept.
|
||||
///
|
||||
/// 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
|
||||
public:
|
||||
/// List of errors detected by this package
|
||||
enum Error_code {
|
||||
OK, ///< Success
|
||||
ERROR_EMPTY_MESH, ///< Error: input mesh is empty
|
||||
ERROR_NON_TRIANGULAR_MESH, ///< Error: input mesh is not triangular
|
||||
ERROR_NO_SURFACE_MESH, ///< Error: input mesh is not a surface
|
||||
ERROR_INVALID_BORDER, ///< Error: parameterization requires a convex border
|
||||
ERROR_BAD_MATRIX_CONDITIONING, ///< Error: result is mathematically unstable
|
||||
ERROR_CANNOT_SOLVE_LINEAR_SYSTEM,///< Error: cannot solve linear system
|
||||
ERROR_NO_1_TO_1_MAPPING, ///< Error: parameterization does not ensure 1 to 1 mapping
|
||||
ERROR_NOT_ENOUGH_MEMORY, ///< Error: not enough memory
|
||||
ERROR_WRONG_PARAMETER ///< Error: a method received an unexpected parameter
|
||||
};
|
||||
|
||||
/// Export the type of mesh to parameterize
|
||||
typedef xxx Adaptor;
|
||||
|
||||
// Public operations
|
||||
public:
|
||||
/// Compute a 1 to 1 mapping from a triangular 3D surface 'mesh'
|
||||
/// to a piece of the 2D space.
|
||||
/// The mapping is linear by pieces (linear in each triangle).
|
||||
/// The result is the (u,v) pair image of each vertex of the 3D surface.
|
||||
///
|
||||
/// Preconditions:
|
||||
/// - 'mesh' must be a surface with 1 connected component and no hole.
|
||||
/// - 'mesh' must be a triangular mesh.
|
||||
Error_code parameterize (Adaptor* mesh);
|
||||
};
|
||||
|
||||
|
|
@ -1,56 +0,0 @@
|
|||
// Copyright (c) 2005 INRIA (France).
|
||||
// All rights reserved.
|
||||
//
|
||||
// This file is part of CGAL (www.cgal.org); you may redistribute it under
|
||||
// the terms of the Q Public License version 1.0.
|
||||
// See the file LICENSE.QPL distributed with CGAL.
|
||||
//
|
||||
// Licensees holding a valid commercial license may use this file in
|
||||
// accordance with the commercial license agreement provided with the software.
|
||||
//
|
||||
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
||||
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
//
|
||||
// $URL$
|
||||
// $Id$
|
||||
//
|
||||
//
|
||||
// Author(s) : Laurent Saboret, Pierre Alliez, Bruno Levy
|
||||
|
||||
|
||||
/// The concept SparseLinearAlgebraTraits_d
|
||||
/// is used to solve sparse linear systems "A*X = B".
|
||||
///
|
||||
/// @todo Add to SparseLinearAlgebraTraits_d the ability to solve
|
||||
/// linear systems in the least squares sense.
|
||||
///
|
||||
/// Sub-concept: This is a sub-concept of LinearAlgebraTraits_d.
|
||||
|
||||
class SparseLinearAlgebraTraits_d
|
||||
{
|
||||
// Public types
|
||||
public:
|
||||
typedef xxx Matrix ;
|
||||
typedef xxx Vector ;
|
||||
typedef xxx NT;
|
||||
|
||||
// Public operations
|
||||
public:
|
||||
/// Default constructor
|
||||
SparseLinearAlgebraTraits_d();
|
||||
|
||||
/// Solve the sparse linear system "A*X = B".
|
||||
/// Return true on success. The solution is then (1/D) * X.
|
||||
///
|
||||
/// Preconditions:
|
||||
/// - A.row_dimension() == B.dimension().
|
||||
/// - A.column_dimension() == X.dimension().
|
||||
bool linear_solver (const Matrix& A, const Vector& B, Vector& X, NT& D);
|
||||
|
||||
/// Indicate if the linear system can be solved and if the matrix conditioning is good.
|
||||
///
|
||||
/// Preconditions:
|
||||
/// - A.row_dimension() == B.dimension().
|
||||
bool is_solvable (const Matrix& A, const Vector& B);
|
||||
};
|
||||
|
||||
|
|
@ -1,58 +0,0 @@
|
|||
// Copyright (c) 2005 INRIA (France).
|
||||
// All rights reserved.
|
||||
//
|
||||
// This file is part of CGAL (www.cgal.org); you may redistribute it under
|
||||
// the terms of the Q Public License version 1.0.
|
||||
// See the file LICENSE.QPL distributed with CGAL.
|
||||
//
|
||||
// Licensees holding a valid commercial license may use this file in
|
||||
// accordance with the commercial license agreement provided with the software.
|
||||
//
|
||||
// This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
|
||||
// WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
|
||||
//
|
||||
// $URL$
|
||||
// $Id$
|
||||
//
|
||||
//
|
||||
// Author(s) : Laurent Saboret, Pierre Alliez, Bruno Levy
|
||||
|
||||
|
||||
/// SparseLinearAlgebraTraits_d::Vector
|
||||
/// is a concept of a vector that can be multiplied by a sparse matrix.
|
||||
///
|
||||
/// Sub-concept: This is a sub-concept of LinearAlgebraTraits_d::Vector.
|
||||
///
|
||||
/// Models:
|
||||
/// - Taucs_vector
|
||||
/// - OpenNL::FullVector
|
||||
|
||||
class Vector
|
||||
{
|
||||
// Public types
|
||||
public:
|
||||
|
||||
typedef xxx NT;
|
||||
|
||||
// Public operations
|
||||
public:
|
||||
|
||||
/// Create a vector initialized with zeros.
|
||||
Vector (int rows);
|
||||
|
||||
/// Copy constructor
|
||||
Vector(const Vector& toCopy);
|
||||
|
||||
/// operator =()
|
||||
Vector& operator=(const Vector& toCopy);
|
||||
|
||||
/// Return the vector's number of coefficients.
|
||||
int dimension () const;
|
||||
|
||||
/// Read/write access to 1 vector coefficient.
|
||||
///
|
||||
/// Precondition: 0 <= row < dimension().
|
||||
NT operator[] (int row) const;
|
||||
NT& operator[] (int row);
|
||||
};
|
||||
|
||||
|
Before Width: | Height: | Size: 90 KiB |
|
Before Width: | Height: | Size: 211 KiB |
|
|
@ -1,133 +0,0 @@
|
|||
\section{Basics}
|
||||
|
||||
|
||||
\subsection{Default Parameterization}
|
||||
|
||||
From the user point of view, the simplest entry point to this package
|
||||
is the following function:
|
||||
|
||||
\ccFunction{Parameterizer_traits_3<ParameterizationMesh_3>::Error_code parameterize (ParameterizationMesh_3 * mesh);}
|
||||
{ Compute a one-to-one mapping from a 3D triangle surface 'mesh' to a
|
||||
2D circle, using Floater Mean Value Coordinates algorithm. A
|
||||
one-to-one mapping is guaranteed. The mapping is piecewise linear on
|
||||
the input mesh triangles. The result is a (u,v) pair of parameter
|
||||
coordinates for each vertex of the input mesh.
|
||||
Preconditions:\begin{itemize}
|
||||
\item 'mesh' must be a surface with one connected component.\item 'mesh' must be a triangular mesh.\end{itemize}
|
||||
}
|
||||
|
||||
The CGAL::parameterize() function provides a default parameterization
|
||||
method: Floater Mean Value Coordinates~\cite{cgal:f-mvc-03}, with an
|
||||
arc-length circular border parameterization, and using OpenNL sparse
|
||||
linear solver~\cite{cgal:l-nmdgp-05}.
|
||||
|
||||
The result is stored into the (u,v) fields of the mesh vertices and/or
|
||||
halfedges.
|
||||
|
||||
|
||||
\subsection{List of Supported Meshes and Concept}
|
||||
|
||||
The general definition of input meshes handled by the package is:
|
||||
|
||||
\begin{itemize}
|
||||
|
||||
\item Triangulated.
|
||||
|
||||
\item 2-manifold.
|
||||
|
||||
\item Oriented.
|
||||
|
||||
\item All surface parameterization methods only deal with topological discs.
|
||||
The input mesh can be of any genus and have an arbitrary number of
|
||||
connected components. If it is not a topological disc, it has to come
|
||||
with a description of a boundary (a list of vertices) which is the
|
||||
boundary of a topological disc. If no boundary is given as input, we
|
||||
assume that the surface boundary is the longest boundary already
|
||||
present in the input mesh (the other boundaries are considered as
|
||||
holes).
|
||||
|
||||
Note that this way the user is responsible for cutting a closed mesh
|
||||
of arbitrary genus (even a topological disc with an intricate seam
|
||||
cut), as long as this condition is fulfilled.
|
||||
|
||||
The package will only parameterize the inside part of the given
|
||||
boundary, thus only one connected component.
|
||||
|
||||
\end{itemize}
|
||||
|
||||
The package accesses such meshes through the
|
||||
\ccc{ParameterizationMesh_3} concept. Among other things, this concept
|
||||
defines the accessor to the (u,v) values computed by
|
||||
parameterizations.
|
||||
|
||||
The package offers models of the concept
|
||||
\ccc{ParameterizationMesh_3} with both the 2D Triangulation Data
|
||||
Structure enriched with 3D points (not yet implemented) and the
|
||||
Polyhedron:
|
||||
|
||||
\ccc{CGAL::Parameterization_polyhedron_adaptor_3} \\
|
||||
|
||||
Note that these interfaces are decorators which add {\em on the fly}
|
||||
the necessary fields to unmodified CGAL data structures (using STL
|
||||
maps). For better performances, it is recommended to use CGAL data
|
||||
structures enriched with the proper fields. See \ccc{Polyhedron_ex}
|
||||
class in \ccc{polyhedron_ex_parameterization.C} example.
|
||||
|
||||
|
||||
\subsection{Default Parameterization Example}
|
||||
|
||||
The code below applies the default parameterization to a
|
||||
\ccc{Polyhedron_3} mesh (must be a topological disk).
|
||||
Eventually, it extracts the result from halfedges and prints it.
|
||||
|
||||
\begin{ccExampleCode}
|
||||
|
||||
// CGAL kernel
|
||||
typedef CGAL::Cartesian<double> Kernel;
|
||||
|
||||
// Mesh true type and parameterization adaptors
|
||||
typedef CGAL::Polyhedron_3<Kernel> Polyhedron;
|
||||
typedef CGAL::Parameterization_polyhedron_adaptor_3<Polyhedron>
|
||||
Parameterization_polyhedron_adaptor;
|
||||
|
||||
// Defines the error codes
|
||||
typedef CGAL::Parameterizer_traits_3<Parameterization_polyhedron_adaptor>
|
||||
Parameterizer;
|
||||
|
||||
int main(int argc,char * argv[])
|
||||
{
|
||||
Polyhedron mesh;
|
||||
|
||||
// read the mesh
|
||||
...
|
||||
|
||||
// The parameterization package needs an adaptor to handle Polyhedron_3 meshes
|
||||
// The mesh must be a topological disk
|
||||
Parameterization_polyhedron_adaptor mesh_adaptor(&mesh);
|
||||
|
||||
// Floater Mean Value Coordinates parameterization
|
||||
Parameterizer::Error_code err = CGAL::parameterize(&mesh_adaptor);
|
||||
if (err != Parameterizer::OK)
|
||||
fprintf(stderr, "\nFATAL ERROR: parameterization error # %d\n", (int)err);
|
||||
|
||||
if (err == Parameterizer::OK)
|
||||
{
|
||||
// Raw output: dump (u,v) pairs
|
||||
Polyhedron::Vertex_const_iterator pVertex;
|
||||
for (pVertex = mesh.vertices_begin();
|
||||
pVertex != mesh.vertices_end();
|
||||
pVertex++)
|
||||
{
|
||||
// (u,v) pair is stored in any halfedge
|
||||
double u = mesh_adaptor.info(pVertex->halfedge())->uv().x();
|
||||
double v = mesh_adaptor.info(pVertex->halfedge())->uv().y();
|
||||
printf("(u,v) = (%lf,%lf)\n", u, v);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
\end{ccExampleCode}
|
||||
|
||||
See the complete example in \ccc{Simple_parameterization.C}.
|
||||
|
||||
|
||||
|
Before Width: | Height: | Size: 125 KiB |
|
|
@ -1,52 +0,0 @@
|
|||
\section{Extending the Package and Reusing Code}
|
||||
|
||||
\subsection{Reusing Mesh Adaptors}
|
||||
|
||||
\ccc{ParameterizationMesh_3} defines a concept to access to a
|
||||
general polyhedral mesh. The current interface is optimized for the
|
||||
parameterization package, but may be easily generalized.
|
||||
|
||||
The package proposes a \ccc{ParameterizationMesh_3} interface with
|
||||
both the 2D Triangulation Data Structure enriched with 3D points and
|
||||
the Polyhedron. Any algorithm that makes use of both
|
||||
\ccc{Triangulation_data_structure_2} with 3D points and
|
||||
\ccc{Polyhedron_3} may take advantage of these adaptors.
|
||||
|
||||
|
||||
\subsection{Reusing Sparse Linear Algebra}
|
||||
|
||||
The \ccc{SparseLinearAlgebraTraits_d} concept and the traits classes
|
||||
for OpenNL, {\sc Taucs} and SuperLU are independent from the
|
||||
parameterization package, and may be reused by CGAL developers for
|
||||
other purposes.
|
||||
|
||||
|
||||
\subsection{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
|
||||
\ccc{Fixed_border_parameterizer_3} class. Subclasses must mainly
|
||||
implement a \ccc{compute_w_ij}() method which computes each
|
||||
coefficient $w_{ij}$ = (i,j) of a matrix $A$ for $v_j$ neighbouring
|
||||
vertices of $v_i$.
|
||||
|
||||
Although implementing a new free boundary linear parameterization
|
||||
method is more involved, the Least Squares Conformal Maps and Natural
|
||||
Conformal Map parameterization methods are good starting points.
|
||||
|
||||
Implementing \ccc{non} linear parameterizations is a natural extension
|
||||
to this package, although only the mesh adaptors can be reused.
|
||||
|
||||
|
||||
\subsection{Adding New Border Parameterization Methods}
|
||||
|
||||
Implementing a new border parameterization method is easy.
|
||||
Square, Circular and 2-Points border parameterizations are good starting points.
|
||||
|
||||
|
||||
\subsection{Mesh Cutting}
|
||||
|
||||
Obviously, this package would benefit of having robust algorithms
|
||||
which transform arbitrary meshes into topological disks.
|
||||
|
||||
% references ?
|
||||
|
Before Width: | Height: | Size: 122 KiB |
|
Before Width: | Height: | Size: 44 KiB |
|
|
@ -1,61 +0,0 @@
|
|||
\section{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
|
||||
parameterization methods, such as Least Squares Conformal Maps,
|
||||
Discrete Conformal Map, Natural 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 boundary onto the
|
||||
planar domain (convex polygon vs free boundary) and by the guarantees
|
||||
provided in terms of bijective mapping.
|
||||
|
||||
The package proposes an interface with both the 2D Triangulation Data
|
||||
Structure enriched with 3D points and the Polyhedron.
|
||||
|
||||
Since parameterizing meshes require efficient representation of sparse
|
||||
matrices and efficient iterative or direct linear solvers, we provide
|
||||
an interface common to state-of-the-art linear solver libraries ({\sc Taucs},
|
||||
SuperLU) and propose a separate package devoted to OpenNL sparse
|
||||
linear solver.
|
||||
|
||||
Note that linear solvers commonly use double precision floating point
|
||||
numbers. This package is thus 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.
|
||||
|
||||
% Insert image introduction.png/eps with title "Least Squares Conformal Maps parameterization"
|
||||
\begin{center}
|
||||
\label{parameterization-fig-introduction}
|
||||
% Image
|
||||
\begin{ccTexOnly}
|
||||
\includegraphics[width=0.5\textwidth]{Parameterization/introduction} % omit .eps suffix
|
||||
\end{ccTexOnly}
|
||||
\begin{ccHtmlOnly}
|
||||
<img width="50%" border=0 src="./introduction.png"><P>
|
||||
\end{ccHtmlOnly}
|
||||
% Title
|
||||
\begin{figure}[h]
|
||||
\caption{Least Squares Conformal Maps parameterization}
|
||||
\end{figure}
|
||||
\end{center}
|
||||
|
||||
|
||||
|
|
@ -1,15 +0,0 @@
|
|||
\chapter{Planar Parameterization of Triangulated Surface Meshes}
|
||||
\label{chap:parameterization}
|
||||
\ccChapterAuthor{Laurent Saboret, Pierre Alliez \and Bruno Levy}
|
||||
|
||||
\minitoc
|
||||
|
||||
\input{Parameterization/introduction}
|
||||
\input{Parameterization/basics}
|
||||
\input{Parameterization/parameterization_methods}
|
||||
\input{Parameterization/solvers}
|
||||
\input{Parameterization/output}
|
||||
\input{Parameterization/seam}
|
||||
\input{Parameterization/software_design}
|
||||
\input{Parameterization/not_yet_implemented}
|
||||
\input{Parameterization/extensions_and_reuse}
|
||||
|
|
@ -1,64 +0,0 @@
|
|||
\section{Not Yet Implemented}
|
||||
|
||||
The authors of this package plan to add the next improvements in a close
|
||||
future:
|
||||
|
||||
\begin{itemize}
|
||||
|
||||
\item Speed up solving of sparse linear systems:
|
||||
|
||||
\begin{itemize}
|
||||
|
||||
\item Add to OpenNL a BICGSTAB and a Conjugate Gradient solvers
|
||||
with Jacobi preconditioner, to increase speed and support larger systems.
|
||||
|
||||
\item \ccc{Fixed_border_parameterizer_3} should remove border vertices from
|
||||
the linear systems, in order to have a symmetric definite positive matrix
|
||||
for Tutte Barycentric Mapping and Discrete Conformal Map algorithms.
|
||||
|
||||
\item \ccc{Taucs_matrix} must reallocate the array of non null elements when it's full.
|
||||
|
||||
\item Filling a \ccc{Taucs_matrix} by lines is very slow. We must optimize this code.
|
||||
|
||||
\item Add traits class for SuperLU solver.
|
||||
|
||||
\end{itemize}
|
||||
|
||||
\item Implement \ccc{ParameterizationPatchableMesh_3} adaptor for 2D Triangulation
|
||||
Data Structure enriched with 3D points.
|
||||
|
||||
\item Implement Natural Conformal Map parameterization algorithm.
|
||||
|
||||
\item Implement arc-length and uniform border parameterizations
|
||||
over a convex polygon.
|
||||
|
||||
\item Detect at installation time if {\sc Taucs} and SuperLU are installed,
|
||||
then set appropriate compilation variables.
|
||||
|
||||
\item Demos:
|
||||
|
||||
\begin{itemize}
|
||||
|
||||
\item Qt/OpenGL demo (same features as \ccc{polyhedron_ex_parameterization.C}
|
||||
+ 3D rendering of textured mesh + 2D rendering of parameterized mesh)
|
||||
|
||||
\item MFC/OpenGL demo (same features as Qt/OpenGL demo)
|
||||
|
||||
\end{itemize}
|
||||
|
||||
\item Code cleaning:
|
||||
|
||||
\begin{itemize}
|
||||
|
||||
\item Add to \ccc{SparseLinearAlgebraTraits_d}, \ccc{Taucs_symmetric_solver_traits}
|
||||
and SuperLU traits class
|
||||
the ability to solve linear systems in the least squares sense. Then, access to
|
||||
the solver via the concept interface instead of calls specific to OpenNL.
|
||||
|
||||
\item In all solver traits classes,
|
||||
implement \ccc{is_solvable}() by solving the system, then checking that $|$ $|$$|$A$\ast$X$|$$|$/$|$$|$B$|$$|$ - 1 $|$ $<$ epsilon. This method is
|
||||
currently not implemented.
|
||||
|
||||
\end{itemize}
|
||||
|
||||
\end{itemize}
|
||||
|
|
@ -1,75 +0,0 @@
|
|||
\section{Output}
|
||||
|
||||
All parameterization methods store the result in the $(u,v)$ fields of
|
||||
the input mesh vertices and halfedges. A $(u,v)$ pair is provided for
|
||||
each inner vertex, while a $(u,v)$ pair is provided for each boundary
|
||||
halfedge (possibly a seam in the mesh). The user has to iterate over
|
||||
the corresponding mesh elements to get the result.
|
||||
|
||||
Note: $(u,v)$ fields do not exist in CGAL \ccc{Polyhedron_3} and
|
||||
\ccc{Triangulation_data_structure_2}, thus the output traversal is specific to the way the (u,v) fields are implemented.
|
||||
|
||||
\subsection{EPS Output Example}
|
||||
|
||||
The C++ code below gets the $(u,v)$ fields computed by a
|
||||
parameterization method in a \ccc{Polyhedron_3} mesh with a
|
||||
\ccc{Parameterization_polyhedron_adaptor_3} adaptor. Note that
|
||||
\ccc{Parameterization_polyhedron_adaptor_3} stores $(u,v)$ pairs in
|
||||
halfedges (both inner and border).
|
||||
|
||||
\begin{ccExampleCode}
|
||||
|
||||
// CGAL kernel
|
||||
typedef CGAL::Cartesian<double> Kernel;
|
||||
|
||||
// Mesh true type and parameterization adaptors
|
||||
typedef CGAL::Polyhedron_3<Kernel> Polyhedron;
|
||||
typedef CGAL::Parameterization_polyhedron_adaptor_3<Polyhedron>
|
||||
Parameterization_polyhedron_adaptor;
|
||||
...
|
||||
|
||||
// Dump parameterized mesh to an eps file
|
||||
static bool write_file_eps(const Parameterization_polyhedron_adaptor& mesh_adaptor,
|
||||
const char *pFilename,
|
||||
double scale = 500.0)
|
||||
{
|
||||
// Get actual mesh from adaptor
|
||||
const Polyhedron* mesh = mesh_adaptor.get_adapted_mesh();
|
||||
|
||||
FILE *pFile = fopen(pFilename,"wt");
|
||||
...
|
||||
|
||||
// Get (u,v) pair of each halfedge (either inner or border)
|
||||
for (pHalfedge = mesh->halfedges_begin();
|
||||
pHalfedge != mesh->halfedges_end();
|
||||
pHalfedge++)
|
||||
{
|
||||
double x1 = scale * mesh_adaptor.info(pHalfedge->prev())->uv().x();
|
||||
double y1 = scale * mesh_adaptor.info(pHalfedge->prev())->uv().y();
|
||||
double x2 = scale * mesh_adaptor.info(pHalfedge)->uv().x();
|
||||
double y2 = scale * mesh_adaptor.info(pHalfedge)->uv().y();
|
||||
fprintf(pFile,"%g %g %g %g E\n",x1,y1,x2,y2);
|
||||
}
|
||||
|
||||
...
|
||||
fclose(pFile);
|
||||
}
|
||||
|
||||
int main(int argc,char * argv[])
|
||||
{
|
||||
Polyhedron mesh;
|
||||
...
|
||||
|
||||
// The parameterization package needs an adaptor to handle Polyhedron_3 meshes
|
||||
Parameterization_polyhedron_adaptor mesh_adaptor(&mesh);
|
||||
|
||||
// Parameterization
|
||||
...
|
||||
|
||||
// Write Postscript file
|
||||
write_file_eps(mesh_adaptor, output_filename);
|
||||
}
|
||||
|
||||
\end{ccExampleCode}
|
||||
|
||||
See the complete example in \ccc{Taucs_parameterization.C}.
|
||||
|
|
@ -1,346 +0,0 @@
|
|||
\section{Surface Parameterization Methods}
|
||||
|
||||
|
||||
This package provides a second \ccc{parameterize()} entry point
|
||||
where the user can specify a parameterization method:
|
||||
|
||||
\ccFunction{Parameterizer_traits_3<ParameterizationMesh_3>::Error_code parameterize (ParameterizationMesh_3 * mesh, ParameterizerTraits_3 parameterizer);}
|
||||
{ Compute a ont-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:\begin{itemize}
|
||||
\item 'mesh' must be a surface with one connected component.\item
|
||||
'mesh' must be a triangle mesh.\item the mesh boundary must be mapped
|
||||
onto a convex polygon (for fixed border
|
||||
parameterizations).\end{itemize} }
|
||||
|
||||
|
||||
This \cgal\ package implements some of the state-of-the-art surface
|
||||
parameterization methods which can be used as
|
||||
\ccc{ParameterizerTraits_3} parameter. This package also provides common parameterization methods for
|
||||
boundaries which are used as traits classes modifying the behavior of
|
||||
the \ccc{ParameterizerTraits_3} methods.
|
||||
|
||||
|
||||
\subsection{Fixed Border Surface Parameterizations}
|
||||
|
||||
% pierre: I would replace border by boundary everywhere
|
||||
% laurent: Andreas asked to replace boundary by border everywhere...
|
||||
|
||||
Fixed Border Surface Parameterizations need a set of constraints: two
|
||||
u,v coordinates for each vertex along the boundary. Some helper
|
||||
classes to achieve this goal are described in Section
|
||||
\ref{sec:Border-Parameterizations-for-Fixed-Methods}.
|
||||
|
||||
\subsubsection{Tutte Barycentric Mapping}
|
||||
|
||||
\ccc{CGAL::Barycentric_mapping_parameterizer_3} \\
|
||||
|
||||
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 amounts to solve one
|
||||
sparse linear solver for each set of parameter coordinates, with a
|
||||
\#vertices x \#vertices sparse and symmetric positive definite matrix.
|
||||
A coefficient $(i,j)$ of the matrix is set to 1 for an edge linking
|
||||
the vertex $v_i$ to the vertex $v_j$, to minus the degree of the
|
||||
vertex $v_i$ for a diagonal element, and to zero for any other matrix
|
||||
entry. Although Tutte Barycentric Mapping method is fast and
|
||||
guaranteed to be bijective, it does not minimize angle nor area
|
||||
distortion.
|
||||
|
||||
% Insert image uniform.png/eps with
|
||||
% title "Tutte Barycentric Mapping (the red line emphasizes the cutting path)"
|
||||
\begin{center}
|
||||
\label{parameterization-fig-uniform}
|
||||
% Image
|
||||
\begin{ccTexOnly}
|
||||
\includegraphics[width=0.5\textwidth]{Parameterization/uniform} % omit .eps suffix
|
||||
\end{ccTexOnly}
|
||||
\begin{ccHtmlOnly}
|
||||
<img width="50%" border=0 src="./uniform.png"><P>
|
||||
\end{ccHtmlOnly}
|
||||
% Title
|
||||
\begin{figure}[h]
|
||||
\caption{Tutte Barycentric Mapping (the red line emphasizes the cutting path)}
|
||||
\end{figure}
|
||||
\end{center}
|
||||
|
||||
|
||||
\subsubsection{Discrete Conformal Map}
|
||||
|
||||
\ccc{CGAL::Discrete_conformal_map_parameterizer_3} \\
|
||||
|
||||
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:fh-survey-05}.
|
||||
|
||||
% pierre: fix references
|
||||
|
||||
A one-to-one mapping is guaranteed only when two conditions are
|
||||
fulfilled: the barycentric mapping condition (each vertex in parameter
|
||||
space is a convex combination if its neighbouring vertices) and the
|
||||
boundary is convex.
|
||||
|
||||
% pierre: add cot figure, and detail what it means to have all weights
|
||||
% positive, otherwise it is confusing.
|
||||
|
||||
This method solves two \#vertices x \#vertices sparse linear
|
||||
systems. The matrix (the same for both systems) is symmetric definite
|
||||
positive, thus can be efficiently solved using dedicated linear
|
||||
solvers (x s for the example shown).
|
||||
|
||||
% Insert image conformal.png/eps with title "Discrete Conformal Map"
|
||||
\begin{center}
|
||||
\label{parameterization-fig-conformal}
|
||||
% Image
|
||||
\begin{ccTexOnly}
|
||||
\includegraphics[width=0.5\textwidth]{Parameterization/conformal} % omit .eps suffix
|
||||
\end{ccTexOnly}
|
||||
\begin{ccHtmlOnly}
|
||||
<img width="50%" border=0 src="./conformal.png"><P>
|
||||
\end{ccHtmlOnly}
|
||||
% Title
|
||||
\begin{figure}[h]
|
||||
\caption{Discrete Conformal Map}
|
||||
\end{figure}
|
||||
\end{center}
|
||||
|
||||
|
||||
\subsubsection{Floater Mean Value Coordinates}
|
||||
|
||||
\ccc{CGAL::Mean_value_coordinates_parameterizer_3} \\
|
||||
|
||||
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 neighbouring
|
||||
vertices. The barycentric coordinates are this time unconditionnaly
|
||||
positive, by deriving an application of the mean theorem for harmonic
|
||||
functions. It is in essence an approximation of the Discrete Conformal
|
||||
Maps, with a one-to-one mapping always guaranteed. This method solves
|
||||
two \#vertices x \#vertices sparse linear systems. The matrix (the
|
||||
same for both systems) is asymmetric.
|
||||
|
||||
% Insert image floater.png/eps with title "Floater Mean Value Coordinates"
|
||||
\begin{center}
|
||||
\label{parameterization-fig-floater}
|
||||
% Image
|
||||
\begin{ccTexOnly}
|
||||
\includegraphics[width=0.5\textwidth]{Parameterization/floater} % omit .eps suffix
|
||||
\end{ccTexOnly}
|
||||
\begin{ccHtmlOnly}
|
||||
<img width="50%" border=0 src="./floater.png"><P>
|
||||
\end{ccHtmlOnly}
|
||||
% Title
|
||||
\begin{figure}[h]
|
||||
\caption{Floater Mean Value Coordinates}
|
||||
\end{figure}
|
||||
\end{center}
|
||||
|
||||
|
||||
\subsubsection{Discrete Authalic parameterization}
|
||||
|
||||
\ccc{CGAL::Discrete_authalic_parameterizer_3} \\
|
||||
|
||||
The Discrete Authalic parameterization method has been introduced by
|
||||
Desbrun, Meyer and Alliez~\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 boundary is convex. This method solves two
|
||||
\#vertices x \#vertices sparse linear systems. The matrix (the same
|
||||
for both systems) is asymmetric.
|
||||
|
||||
% Insert image authalic.png/eps with title "Discrete Authalic Parameterization"
|
||||
\begin{center}
|
||||
\label{parameterization-fig-authalic}
|
||||
% Image
|
||||
\begin{ccTexOnly}
|
||||
\includegraphics[width=0.5\textwidth]{Parameterization/authalic} % omit .eps suffix
|
||||
\end{ccTexOnly}
|
||||
\begin{ccHtmlOnly}
|
||||
<img width="50%" border=0 src="./authalic.png"><P>
|
||||
\end{ccHtmlOnly}
|
||||
% Title
|
||||
\begin{figure}[h]
|
||||
\caption{Discrete Authalic Parameterization}
|
||||
\end{figure}
|
||||
\end{center}
|
||||
|
||||
|
||||
\subsubsection{Border Parameterizations for Fixed Methods}
|
||||
\label{sec:Border-Parameterizations-for-Fixed-Methods}
|
||||
|
||||
Border Parameterizations for Fixed Border Surface Parameterizations
|
||||
are a family of methods to define a set of constraints, namely two
|
||||
$u,v$ coordinates for each vertex along the boundary.
|
||||
|
||||
\begin{itemize}
|
||||
|
||||
\item The user can select a border parameterization among
|
||||
two commonly used methods: uniform or arc-length parameterization, the
|
||||
arc-length parameterization being used by default.
|
||||
|
||||
\item One convex shape specified by:
|
||||
|
||||
\begin{itemize}
|
||||
|
||||
\item one shape among two standard ones: a circle or a square.
|
||||
The circular boundary parameterization is used by default as it
|
||||
corresponds to the simplest convex shape. The square border
|
||||
parameterization is commonly used for texture mapping.
|
||||
|
||||
\item a convex polygon.
|
||||
|
||||
(not yet implemented)
|
||||
|
||||
\end{itemize}
|
||||
|
||||
\end{itemize}
|
||||
|
||||
\ccc{CGAL::Circular_border_arc_length_parameterizer_3} \\
|
||||
\ccc{CGAL::Circular_border_uniform_parameterizer_3} \\
|
||||
\ccc{CGAL::Square_border_arc_length_parameterizer_3} \\
|
||||
\ccc{CGAL::Square_border_uniform_parameterizer_3} \\
|
||||
|
||||
|
||||
\subsection{Free Border Surface Parameterizations}
|
||||
|
||||
\subsubsection{Least Squares Conformal Maps}
|
||||
|
||||
\ccc{CGAL::LSCM_parameterizer_3} \\
|
||||
|
||||
The Least Squares Conformal Maps (LSCM) parameterization method has
|
||||
been introduced by L\'evy et al.~\cite{cgal:lprm-lscm-02}. It
|
||||
corresponds to a conformal method with a free boundary (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 $\times$
|
||||
\#triangles) $\times$ \#vertices sparse linear system in the least squares sense.
|
||||
|
||||
% Insert image LSCM.png/eps with title "Least Squares Conformal Maps"
|
||||
\begin{center}
|
||||
\label{parameterization-fig-LSCM}
|
||||
% Image
|
||||
\begin{ccTexOnly}
|
||||
\includegraphics[width=0.5\textwidth]{Parameterization/LSCM} % omit .eps suffix
|
||||
\end{ccTexOnly}
|
||||
\begin{ccHtmlOnly}
|
||||
<img width="50%" border=0 src="./LSCM.png"><P>
|
||||
\end{ccHtmlOnly}
|
||||
% Title
|
||||
\begin{figure}[h]
|
||||
\caption{Least Squares Conformal Maps}
|
||||
\end{figure}
|
||||
\end{center}
|
||||
|
||||
|
||||
\subsubsection{Natural Conformal Map}
|
||||
|
||||
(not yet implemented)
|
||||
|
||||
The Natural Conformal Map parameterization method has been introduced
|
||||
by Desbrun et al.~\cite{cgal:dma-ipsm-02}. It extends the Discrete
|
||||
Conformal Map method by optimizing the boundary vertices in addition
|
||||
to the interior vertices, as already achived by the LSCM method
|
||||
described above. At least two vertices have to be constrained to
|
||||
obtain a unique solution. This method solves a (2 $\times$ \#vertices) $\times$
|
||||
\#vertices sparse linear system. The matrix is symmetric definite
|
||||
positive, thus can be efficiently solved.
|
||||
|
||||
% pierre: double check that it is indeed symmetric!
|
||||
|
||||
|
||||
\subsubsection{Border Parameterizations for Free Methods}
|
||||
|
||||
\ccc{CGAL::Two_vertices_parameterizer_3} \\
|
||||
|
||||
The associated Border Parameterization method defines only two constraints
|
||||
(the pinned vertices). They have to be on the specified boundary.
|
||||
|
||||
|
||||
\subsection{Discrete Authalic Parameterization Example}
|
||||
|
||||
The following C++ code computes a Discrete Authalic parameterization
|
||||
to a \ccc{Polyhedron_3} mesh:
|
||||
|
||||
\begin{ccExampleCode}
|
||||
|
||||
// CGAL kernel
|
||||
typedef CGAL::Cartesian<double> Kernel;
|
||||
|
||||
// Mesh true type and parameterization adaptors
|
||||
typedef CGAL::Polyhedron_3<Kernel> Polyhedron;
|
||||
typedef CGAL::Parameterization_polyhedron_adaptor_3<Polyhedron>
|
||||
Parameterization_polyhedron_adaptor;
|
||||
|
||||
// Discrete Authalic Parameterization
|
||||
typedef CGAL::Discrete_authalic_parameterizer_3<Parameterization_polyhedron_adaptor>
|
||||
Parameterizer;
|
||||
|
||||
int main(int argc,char * argv[])
|
||||
{
|
||||
Polyhedron mesh;
|
||||
...
|
||||
|
||||
// The parameterization package needs an adaptor to handle Polyhedron_3 meshes
|
||||
// The mesh must be a topological disk
|
||||
Parameterization_polyhedron_adaptor mesh_adaptor(&mesh);
|
||||
|
||||
// Discrete Authalic Parameterization
|
||||
Parameterizer::Error_code err = CGAL::parameterize(&mesh_adaptor, Parameterizer());
|
||||
...
|
||||
}
|
||||
|
||||
\end{ccExampleCode}
|
||||
|
||||
The complete example is available in
|
||||
\ccc{Authalic_parameterization.C}.
|
||||
|
||||
|
||||
\subsection{Square Border Arc Length Parameterization Example}
|
||||
|
||||
The following C++ code computes a Floater Mean Value Coordinates
|
||||
parameterization with a Square Border Arc Length parameterization:
|
||||
|
||||
\begin{ccExampleCode}
|
||||
|
||||
// CGAL kernel
|
||||
typedef CGAL::Cartesian<double> Kernel;
|
||||
|
||||
// Mesh true type and parameterization adaptors
|
||||
typedef CGAL::Polyhedron_3<Kernel> Polyhedron;
|
||||
typedef CGAL::Parameterization_polyhedron_adaptor_3<Polyhedron>
|
||||
Parameterization_polyhedron_adaptor;
|
||||
|
||||
// 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;
|
||||
|
||||
int main(int argc,char * argv[])
|
||||
{
|
||||
Polyhedron mesh;
|
||||
...
|
||||
|
||||
// The parameterization package needs an adaptor to handle Polyhedron_3 meshes
|
||||
// The mesh must be a topological disk
|
||||
Parameterization_polyhedron_adaptor mesh_adaptor(&mesh);
|
||||
|
||||
// Floater Mean Value Coordinates parameterization
|
||||
// with a Square Border Arc Length Parameterization
|
||||
Parameterizer::Error_code err = CGAL::parameterize(&mesh_adaptor, Parameterizer());
|
||||
...
|
||||
}
|
||||
|
||||
\end{ccExampleCode}
|
||||
|
||||
See the complete example \ccc{Square_border_parameterization.C}.
|
||||
|
Before Width: | Height: | Size: 122 KiB |
|
Before Width: | Height: | Size: 68 KiB |
|
|
@ -1,108 +0,0 @@
|
|||
\section{Cutting a Mesh}
|
||||
|
||||
\subsection{Computing a Cut}
|
||||
|
||||
All surface parameterization methods proposed in this package only
|
||||
deal with topological discs. The input mesh can be of any genus and
|
||||
have any number of connected components, but if it is not a topological
|
||||
disc, it has to come with a description of a boundary (an oriented list of
|
||||
vertices) which is the border of a topological disc. If no boundary 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).
|
||||
|
||||
% pierre: big contradiction here - it can be something else than a
|
||||
% disk then!
|
||||
|
||||
This package does not provide any algorithm to transform a closed mesh
|
||||
of arbitrary genus into a topological disk, the user being responsible
|
||||
for computing such a cut. Nevertheless we provide in
|
||||
\ccc{polyhedron_ex_parameterization.C} a simple cutting algorithm for
|
||||
the sake of completeness.
|
||||
|
||||
|
||||
\subsection{Applying a Cut}
|
||||
|
||||
Parameterization methods in this package only support triangulated
|
||||
surfaces that are homeomorphic to a disk (models of
|
||||
\ccc{ParameterizationMesh_3}). This software design simplifies the
|
||||
implementation of all new parameterization methods based on linear
|
||||
solvers.
|
||||
|
||||
\ccc{Parameterization_mesh_patch_3} class is responsible for virtually
|
||||
{\em cutting} a patch to a \ccc{ParameterizationPatchableMesh_3} mesh,
|
||||
to make it similar ffromt he interface point of view to a topological
|
||||
disk with a \ccc{ParameterizationMesh_3} interface.
|
||||
|
||||
\ccc{ParameterizationPatchableMesh_3} inherits from concept \ccc{ParameterizationMesh_3}, thus is a concept for a 3D surface mesh.
|
||||
\ccc{ParameterizationPatchableMesh_3} adds the ability to support patches and virtual seams. Patches are a subset of a 3D mesh. Virtual seams are the ability to behave exactly as if the surface was {\em cut} following a certain path.
|
||||
|
||||
The \ccc{ParameterizationMesh_3} interfaces with both the 2D
|
||||
Triangulation Data Structure enriched with 3D points (not yet
|
||||
implemented) and the Polyhedron are also models of
|
||||
\ccc{ParameterizationPatchableMesh_3}:
|
||||
|
||||
\ccc{CGAL::Parameterization_polyhedron_adaptor_3} \\
|
||||
|
||||
|
||||
\subsection{Cutting a Mesh Example}
|
||||
|
||||
The code below virtually {\em cuts} a \ccc{Polyhedron_3} mesh to make
|
||||
it a topological disk, then applies the default parameterization:
|
||||
|
||||
\begin{ccExampleCode}
|
||||
|
||||
// CGAL kernel
|
||||
typedef CGAL::Cartesian<double> Kernel;
|
||||
|
||||
// Mesh true type and parameterization adaptors
|
||||
typedef CGAL::Polyhedron_3<Kernel> Polyhedron;
|
||||
typedef CGAL::Parameterization_polyhedron_adaptor_3<Polyhedron>
|
||||
Parameterization_polyhedron_adaptor;
|
||||
typedef CGAL::Parameterization_mesh_patch_3<Parameterization_polyhedron_adaptor>
|
||||
Mesh_patch_polyhedron;
|
||||
|
||||
// Parameterizers base class for this kind of mesh
|
||||
typedef CGAL::Parameterizer_traits_3<Mesh_patch_polyhedron> Parameterizer;
|
||||
|
||||
// Type describing a border or seam as a vertex list
|
||||
typedef std::list<Parameterization_polyhedron_adaptor::Vertex_handle>
|
||||
Seam;
|
||||
|
||||
// If the mesh is a topological disk, extract its longest border,
|
||||
// else compute a very simple cut to make it homeomorphic to a disk.
|
||||
// Return the border/seam (empty on error)
|
||||
static Seam cut_mesh(Parameterization_polyhedron_adaptor* mesh_adaptor)
|
||||
{
|
||||
// To be implemented by package user
|
||||
...
|
||||
}
|
||||
|
||||
int main(int argc,char * argv[])
|
||||
{
|
||||
Polyhedron mesh;
|
||||
...
|
||||
|
||||
// The parameterization package needs an adaptor to handle Polyhedron_3 meshes
|
||||
Parameterization_polyhedron_adaptor mesh_adaptor(&mesh);
|
||||
|
||||
// The parameterization methods support only meshes that
|
||||
// are topological disks => we need to compute a "cutting" of the mesh
|
||||
// that makes it it homeomorphic to a disk
|
||||
Seam seam = cut_mesh(&mesh_adaptor);
|
||||
|
||||
// Create adaptor that virtually "cuts" the mesh following the 'seam' path
|
||||
Mesh_patch_polyhedron mesh_patch(&mesh_adaptor,
|
||||
seam.begin(),
|
||||
seam.end());
|
||||
|
||||
// Floater Mean Value Coordinates parameterization
|
||||
Parameterizer::Error_code err = CGAL::parameterize(&mesh_patch);
|
||||
...
|
||||
}
|
||||
|
||||
\end{ccExampleCode}
|
||||
|
||||
See the complete example in \ccc{Mesh_cutting_parameterization.C}
|
||||
example.
|
||||
|
||||
|
||||
|
|
@ -1,221 +0,0 @@
|
|||
\section{Software Design}
|
||||
|
||||
\subsection{Global Function parameterize()}
|
||||
|
||||
This package's entry point is:
|
||||
|
||||
\begin{ccExampleCode}
|
||||
|
||||
// Compute a 1 to 1 mapping from a triangular 3D surface 'mesh' to 2D circle,
|
||||
// using Floater Mean Value Coordinates algorithm.
|
||||
// 1 to 1 mapping is guaranteed.
|
||||
template <class ParameterizationMesh_3>
|
||||
typename Parameterizer_traits_3<ParameterizationMesh_3>::Error_code
|
||||
parameterize(ParameterizationMesh_3* mesh)
|
||||
{
|
||||
Mean_value_coordinates_parameterizer_3<ParameterizationMesh_3> parameterizer;
|
||||
return parameterizer.parameterize(mesh);
|
||||
}
|
||||
|
||||
// Compute a 1 to 1 mapping from a triangular 3D surface 'mesh'
|
||||
// to a piece of the 2D space.
|
||||
// 1 to 1 mapping may be guaranteed or not, depending of
|
||||
// ParameterizerTraits_3 algorithm chosen.
|
||||
template <class ParameterizationMesh_3, class ParameterizerTraits_3>
|
||||
typename Parameterizer_traits_3<ParameterizationMesh_3>::Error_code
|
||||
parameterize(ParameterizationMesh_3* mesh,
|
||||
ParameterizerTraits_3 parameterizer)
|
||||
{
|
||||
return parameterizer.parameterize(mesh);
|
||||
}
|
||||
|
||||
\end{ccExampleCode}
|
||||
|
||||
You may notice that these global functions simply call the
|
||||
parameterize() method of a \ccc{ParameterizerTraits_3} object.
|
||||
The purpose of these global functions is:
|
||||
\begin{itemize}
|
||||
\item to be consistent with other CGAL algorithms that are also provided as
|
||||
global functions, e.g. \ccc{convex_hull_2}()
|
||||
\item to provide a default parameterization method (Floater Mean Value Coordinates),
|
||||
which wouldn't be possible with a direct call to an object's method
|
||||
\end{itemize}
|
||||
|
||||
You may also wonder why there is not just one parameterize() function with a
|
||||
default \ccc{ParameterizerTraits_3} argument equal to
|
||||
\ccc{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).
|
||||
|
||||
|
||||
\subsection{ParameterizerTraits\_3 is not really a Traits Class}
|
||||
|
||||
\ccc{ParameterizerTraits_3} models modify the behavior of the global function
|
||||
\ccc{parameterize}() - hence the {\em Traits} in the name.
|
||||
On the other hand, \ccc{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 into a planar domain.
|
||||
A consequence is that the skeleton of all parameterization methods of this
|
||||
package is the same:
|
||||
\begin{itemize}
|
||||
\item Allocate a sparse linear system A*X = B
|
||||
\item Parameterize the mesh border and initialize B
|
||||
\item Parameterize the inner points of the mesh and set A coefficients
|
||||
\item Solve the system
|
||||
\end{itemize}
|
||||
|
||||
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:
|
||||
\begin{itemize}
|
||||
\item Fixed border methods need to parameterize all border vertices,
|
||||
when free border methods parameterize only two vertices
|
||||
\item Some methods create symmetric definite positive systems,
|
||||
which may be solved more efficiently than general systems
|
||||
\item Most parameterization methods use two \#vertices x \#vertices systems,
|
||||
when Least Squares Conformal Maps uses one (2 * \#triangles) x \#vertices system
|
||||
\item Most parameterization methods invert the A matrix,
|
||||
when Least Squares Conformal Maps solves the system in the least squares sense.
|
||||
\end{itemize}
|
||||
|
||||
Eventually, the software design chosen is:
|
||||
\begin{itemize}
|
||||
\item Each \ccc{ParameterizerTraits_3} model implements its own version
|
||||
of the parameterization algorithm as a parameterize() method.
|
||||
\item Each \ccc{ParameterizerTraits_3} model has template arguments
|
||||
defining the border parameterization and sparse linear solver to use,
|
||||
with default values adapted to the method.
|
||||
\item Code factorization is achieved using a class hierarchy and (few) virtual methods.
|
||||
\end{itemize}
|
||||
|
||||
% Insert image parameterizer_class_diagram.png/eps with
|
||||
% title "A parameterizer's UML class diagram (main types and methods only)"
|
||||
\begin{center}
|
||||
\label{parameterization-fig-parameterizer_class_diagram}
|
||||
% Image
|
||||
\begin{ccTexOnly}
|
||||
\includegraphics[width=1.1\textwidth]{Parameterization/parameterizer_class_diagram}
|
||||
\end{ccTexOnly}
|
||||
\begin{ccHtmlOnly}
|
||||
<img width="100%" border=0 src="./parameterizer_class_diagram.png"><P>
|
||||
\end{ccHtmlOnly}
|
||||
% Title
|
||||
\begin{figure}[h]
|
||||
\caption{A parameterizer's UML class diagram (main types and methods only)}
|
||||
\end{figure}
|
||||
\end{center}
|
||||
|
||||
% Insert image parameterizers_class_hierarchy.png/eps with
|
||||
% title "Parameterizers class hierarchy"
|
||||
\begin{center}
|
||||
\label{parameterization-fig-parameterizers_class_hierarchy}
|
||||
% Image
|
||||
\begin{ccTexOnly}
|
||||
\includegraphics[width=1.1\textwidth]{Parameterization/parameterizers_class_hierarchy}
|
||||
\end{ccTexOnly}
|
||||
\begin{ccHtmlOnly}
|
||||
<img width="100%" border=0 src="./parameterizers_class_hierarchy.png"><P>
|
||||
\end{ccHtmlOnly}
|
||||
% Title
|
||||
\begin{figure}[h]
|
||||
\caption{Parameterizers class hierarchy}
|
||||
\end{figure}
|
||||
\end{center}
|
||||
|
||||
|
||||
\subsection{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 $w_{ij}$
|
||||
coefficient of the A matrix, for $v_i$ and $v_j$ neighbor vertices of the mesh
|
||||
\cite{cgal:fh-survey-05}.
|
||||
|
||||
The consequence is that most of the code of the fixed border methods
|
||||
is factorized in the \ccc{Fixed_border_parameterizer_3} class.
|
||||
Subclasses:
|
||||
\begin{itemize}
|
||||
\item must provide \ccc{BorderParameterizer_3} and \ccc{SparseLinearAlgebraTraits_d} template parameters that make sense
|
||||
\item must implement \ccc{compute_w_ij}() to compute $w_{ij}$ = (i,j) coefficient of matrix A for $v_j$ neighbor vertex of $v_i$
|
||||
\item may implement an optimized version of \ccc{is_one_to_one_mapping}()
|
||||
\end{itemize}
|
||||
|
||||
See \ccc{Barycentric_mapping_parameterizer_3} class as an example.
|
||||
|
||||
|
||||
\subsection{Border Parameterizations}
|
||||
|
||||
Border Parameterizations are models of the \ccc{BorderParameterizer_3} concept.
|
||||
|
||||
To simplify the implementation, \ccc{BorderParameterizer_3} models know only the
|
||||
\ccc{ParameterizationMesh_3} mesh class. They do not know the parameterization algorithm
|
||||
nor the sparse linear solver used.
|
||||
|
||||
|
||||
\subsection{MeshAdaptor\_3 and PatchableMeshAdaptor\_3 Concepts}
|
||||
|
||||
All parameterization methods are templated by the kind of mesh they are applied on.
|
||||
The mesh type must be a model of \ccc{ParameterizationMesh_3}.
|
||||
|
||||
The purpose of such a model is to:
|
||||
\begin{enumerate}
|
||||
\item Support several kind of meshes
|
||||
\item Hide the implementation of extra fields specific to the parameterization domain
|
||||
(\ccc{index}, \ccc{u}, \ccc{v}, \ccc{is_parameterized})
|
||||
\item Handle in the mesh type the complexity of virtually {\em cutting} a mesh
|
||||
to make it homeomorphic to a disk (instead of duplicating this
|
||||
code in each parameterization method)
|
||||
\end{enumerate}
|
||||
|
||||
Two options are possible for 1) and 2):
|
||||
\begin{itemize}
|
||||
\item Pass to all classes and methods a mesh pointer, a traits class to manipulate it,
|
||||
and accessors to the extra fields arrays.
|
||||
This is the choice of the Boost Graph Library with \ccc{boost::graph_traits<>}
|
||||
and the property maps.
|
||||
\item Pass to all classes and methods an object that points to the actual mesh and knows
|
||||
how to access to it. This is the Adaptor concept \cite{cgal:ghjv-dpero-95}.
|
||||
\end{itemize}
|
||||
|
||||
The current design of this package uses the second option, which is simpler.
|
||||
Of course, we may decide to switch to the first one to reach a deeper integration
|
||||
of CGAL with Boost.
|
||||
|
||||
Point 3) is solved by class \ccc{Parameterization_mesh_patch_3}, which takes care
|
||||
of virtually {\em cutting}
|
||||
a patch in a \ccc{ParameterizationPatchableMesh_3} mesh, to make it appear as a topological disk
|
||||
with a \ccc{ParameterizationMesh_3} interface.
|
||||
\ccc{ParameterizationPatchableMesh_3} inherits from concept \ccc{ParameterizationMesh_3} and adds
|
||||
the ability to support patches and virtual seams.
|
||||
This mainly means that:
|
||||
\begin{itemize}
|
||||
\item vertices can be tagged as inside or outside the patch to parameterize
|
||||
\item the fields specific to parameterizations (\ccc{index}, \ccc{u}, \ccc{v}, \ccc{is_parameterized})
|
||||
can be set per {\em corner} (aka half-edge)
|
||||
\end{itemize}
|
||||
|
||||
|
||||
\subsection{SparseLinearAlgebraTraits\_d Concept}
|
||||
|
||||
This package solves sparse linear systems using solvers which are models
|
||||
of \ccc{SparseLinearAlgebraTraits_d}.
|
||||
|
||||
\ccc{SparseLinearAlgebraTraits_d} is a sub-concept of \ccc{LinearAlgebraTraits_d} concept
|
||||
in \ccc{Kernel_d}.
|
||||
The goal is to adapt easily code wriiten for dense matrices to sparse ones,
|
||||
and vice-versa.
|
||||
|
||||
|
||||
\subsection{Cutting a Mesh}
|
||||
|
||||
In this package, we focus on triangulated surfaces that are homeomorphic to a
|
||||
disk.
|
||||
|
||||
Computing a cut 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.
|
||||
|
||||
|
||||
|
||||
|
|
@ -1,80 +0,0 @@
|
|||
\section{Sparse Linear Algebra}
|
||||
|
||||
Parameterizing triangle meshes requires both efficient representation
|
||||
of sparse matrices and efficient iterative or direct linear
|
||||
solvers. We provide links to standard libraries ({\sc Taucs}, SuperLU)
|
||||
and include a separate package devoted to OpenNL sparse linear solver.
|
||||
|
||||
\subsection{List of Solvers and Concept}
|
||||
|
||||
We provide an interface to several sparse linear solvers, as models
|
||||
of the \ccc{SparseLinearAlgebraTraits_d} concept:
|
||||
|
||||
\begin{itemize}
|
||||
|
||||
\item OpenNL \cite{cgal:l-nmdgp-05} is shipped with \cgal. This is the default solver:
|
||||
|
||||
\ccc{OpenNL::DefaultLinearSolverTraits} \\
|
||||
\ccc{OpenNL::SymmetricLinearSolverTraits} \\
|
||||
|
||||
\item {\sc Taucs} is a state-of-the-art direct solver for sparse symmetric matrices.
|
||||
|
||||
\ccc{CGAL::Taucs_solver_traits} \\
|
||||
\ccc{CGAL::Taucs_symmetric_solver_traits} \\
|
||||
|
||||
\item SuperLU is a state-of-the-art direct solver for sparse unsymmetric matrices.
|
||||
|
||||
(traits class not yet implemented)
|
||||
|
||||
\end{itemize}
|
||||
|
||||
|
||||
\subsection{{\sc Taucs} Solver Example}
|
||||
|
||||
The examples provided so far use the default sparse linear solver
|
||||
OpenNL. The following C++ code computes the default parameterization
|
||||
method (Floater Mean Value Coordinates with a circular boundary), but
|
||||
specifically instantiates the {\sc Taucs} solver:
|
||||
|
||||
\begin{ccExampleCode}
|
||||
|
||||
// CGAL kernel
|
||||
typedef CGAL::Cartesian<double> Kernel;
|
||||
|
||||
// Mesh true type and parameterization adaptors
|
||||
typedef CGAL::Polyhedron_3<Kernel> Polyhedron;
|
||||
typedef CGAL::Parameterization_polyhedron_adaptor_3<Polyhedron>
|
||||
Parameterization_polyhedron_adaptor;
|
||||
|
||||
// Circular border parameterizer (the default)
|
||||
typedef CGAL::Circular_border_arc_length_parameterizer_3<Parameterization_polyhedron_adaptor>
|
||||
Border_parameterizer;
|
||||
// TAUCS solver
|
||||
typedef CGAL::Taucs_solver_traits<double> Solver;
|
||||
|
||||
// Floater Mean Value Coordinates parameterizer (circular border)
|
||||
// with TAUCS solver
|
||||
typedef CGAL::Mean_value_coordinates_parameterizer_3<Parameterization_polyhedron_adaptor,
|
||||
Border_parameterizer,
|
||||
Solver>
|
||||
Parameterizer;
|
||||
|
||||
int main(int argc,char * argv[])
|
||||
{
|
||||
Polyhedron mesh;
|
||||
...
|
||||
|
||||
// The parameterization package needs an adaptor to handle Polyhedron_3 meshes
|
||||
// The mesh must be a topological disk
|
||||
Parameterization_polyhedron_adaptor mesh_adaptor(&mesh);
|
||||
|
||||
// Floater Mean Value Coordinates parameterizer (circular border)
|
||||
// with TAUCS solver
|
||||
Parameterizer::Error_code err = CGAL::parameterize(&mesh_adaptor, Parameterizer());
|
||||
...
|
||||
}
|
||||
|
||||
\end{ccExampleCode}
|
||||
|
||||
See the complete example in \ccc{Taucs_parameterization.C}.
|
||||
|
||||
|
Before Width: | Height: | Size: 138 KiB |
|
|
@ -1,165 +0,0 @@
|
|||
% +------------------------------------------------------------------------+
|
||||
% | Reference manual page: Barycentric_mapping_parameterizer_3.tex
|
||||
% +------------------------------------------------------------------------+
|
||||
% | 23.08.2005 Laurent Saboret, Pierre Alliez, Bruno Levy
|
||||
% | Package: Parameterization
|
||||
% |
|
||||
\RCSdef{\RCSBarycentricmappingparameterizerRev}{$Id$}
|
||||
\RCSdefDate{\RCSBarycentricmappingparameterizerDate}{$Date$}
|
||||
% |
|
||||
%%RefPage: end of header, begin of main body
|
||||
% +------------------------------------------------------------------------+
|
||||
|
||||
|
||||
\begin{ccRefClass}{Barycentric_mapping_parameterizer_3} %% add template arg's if necessary
|
||||
|
||||
%% \ccHtmlCrossLink{} %% add further rules for cross referencing links
|
||||
%% \ccHtmlIndexC[class]{} %% add further index entries
|
||||
|
||||
|
||||
\ccDefinition
|
||||
|
||||
% The section below is automatically generated. Do not edit!
|
||||
%START-AUTO(\ccDefinition)
|
||||
|
||||
The class Barycentric\_mapping\_parameterizer\_3 implements Tutte Barycentric Mapping algorithm \cite{t-hdg-63}. This algorithm is also called {\em Tutte Uniform Weights} by other authors.
|
||||
|
||||
1 to 1 mapping is guaranteed if the surface's border is mapped to a convex polygon.
|
||||
|
||||
As all parameterization algorithms of the package, this class is usually called via the global function parameterize().
|
||||
|
||||
This class is a Strategy \cite{cgal:ghjv-dpero-95} called by the main parameterization algorithm Fixed\_border\_parameterizer\_3::parameterize(). Barycentric\_mapping\_parameterizer\_3:\begin{itemize}
|
||||
\item provides default BorderParameterizer\_3 and SparseLinearAlgebraTraits\_d template parameters that make sense.\item implements compute\_w\_ij() to compute w\_ij = (i,j) coefficient of matrix A for j neighbor vertex of i based on Tutte Barycentric Mapping method.\item implements an optimized version of is\_one\_to\_one\_mapping().\end{itemize}
|
||||
|
||||
%END-AUTO(\ccDefinition)
|
||||
|
||||
\ccInclude{CGAL/Barycentric_mapping_parameterizer_3.h}
|
||||
|
||||
|
||||
\ccIsModel
|
||||
|
||||
% The section below is automatically generated. Do not edit!
|
||||
%START-AUTO(\ccIsModel)
|
||||
|
||||
Model of the ParameterizerTraits\_3 concept.
|
||||
|
||||
%END-AUTO(\ccIsModel)
|
||||
|
||||
|
||||
\ccParameters
|
||||
|
||||
The full template declaration is:
|
||||
|
||||
% The section below is automatically generated. Do not edit!
|
||||
%START-AUTO(\ccParameters)
|
||||
|
||||
template$<$ \\
|
||||
class ParameterizationMesh\_3, \\
|
||||
class BorderParameterizer\_3 = Circular\_border\_arc\_length\_parameterizer\_3$<$ParameterizationMesh\_3$>$, \\
|
||||
class SparseLinearAlgebraTraits\_d = OpenNL::DefaultLinearSolverTraits$<$typename ParameterizationMesh\_3::NT$>$$>$ \\
|
||||
class Barycentric\_mapping\_parameterizer\_3;
|
||||
|
||||
%END-AUTO(\ccParameters)
|
||||
|
||||
|
||||
\ccTypes
|
||||
|
||||
% The section below is automatically generated. Do not edit!
|
||||
%START-AUTO(\ccTypes)
|
||||
|
||||
|
||||
|
||||
%END-AUTO(\ccTypes)
|
||||
|
||||
|
||||
\ccCreation
|
||||
\ccCreationVariable{param} %% variable name used by \ccMethod below
|
||||
|
||||
% The section below is automatically generated. Do not edit!
|
||||
%START-AUTO(\ccCreation)
|
||||
|
||||
\ccConstructor{Barycentric_mapping_parameterizer_3 (Border_param border_param = Border_param(), Sparse_LA sparse_la = Sparse_LA());}
|
||||
{
|
||||
Constructor.
|
||||
}
|
||||
\ccGlue
|
||||
\begin{description}
|
||||
\item[Parameters: ]
|
||||
\begin{description}
|
||||
\item[border\_param]Object that maps the surface's border to 2D space. \item[sparse\_la]Traits object to access a sparse linear system. \end{description}
|
||||
\end{description}
|
||||
\ccGlue
|
||||
|
||||
%END-AUTO(\ccCreation)
|
||||
|
||||
|
||||
\ccOperations
|
||||
|
||||
% The section below is automatically generated. Do not edit!
|
||||
%START-AUTO(\ccOperations)
|
||||
|
||||
\ccMethod{virtual NT compute_w_ij (const Adaptor & mesh, Vertex_const_handle main_vertex_v_i, Vertex_around_vertex_const_circulator neighbor_vertex_v_j);}
|
||||
{
|
||||
Compute w\_ij = (i,j) coefficient of matrix A for j neighbor vertex of i.
|
||||
Tutte Barycentric Mapping algorithm is the most simple one: w\_ij = 1 for j neighbor vertex of i.
|
||||
}
|
||||
\ccGlue
|
||||
\ccMethod{virtual bool is_one_to_one_mapping (const Adaptor & mesh, const Matrix & A, const Vector & Bu, const Vector & Bv);}
|
||||
{
|
||||
Check if 3D -$>$ 2D mapping is 1 to 1.
|
||||
Theorem: 1 to 1 mapping is guaranteed if all w\_ij coefficients are $>$ 0 (for j vertex neighbor of i) and if the surface border is mapped onto a 2D convex polygon. All w\_ij coefficients = 1 (for j vertex neighbor of i), thus mapping is guaranteed if the surface border is mapped onto a 2D convex polygon.
|
||||
}
|
||||
\ccGlue
|
||||
|
||||
%END-AUTO(\ccOperations)
|
||||
|
||||
|
||||
\ccSeeAlso
|
||||
|
||||
\ccRefIdfierPage{CGAL::Parameterizer_traits_3} \\
|
||||
\ccRefIdfierPage{CGAL::Fixed_border_parameterizer_3} \\
|
||||
\ccRefIdfierPage{CGAL::Discrete_authalic_parameterizer_3} \\
|
||||
\ccRefIdfierPage{CGAL::Discrete_conformal_map_parameterizer_3} \\
|
||||
\ccRefIdfierPage{CGAL::LSCM_parameterizer_3} \\
|
||||
\ccRefIdfierPage{CGAL::Mean_value_coordinates_parameterizer_3} \\
|
||||
|
||||
|
||||
\ccExample
|
||||
|
||||
\begin{ccExampleCode}
|
||||
|
||||
// CGAL kernel
|
||||
typedef CGAL::Cartesian<double> Kernel;
|
||||
|
||||
// Mesh true type and parameterization adaptor
|
||||
typedef CGAL::Polyhedron_3<Kernel> Polyhedron;
|
||||
typedef CGAL::Parameterization_polyhedron_adaptor_3<Polyhedron>
|
||||
Parameterization_polyhedron_adaptor;
|
||||
|
||||
// Tutte barycentric mapping
|
||||
typedef CGAL::Barycentric_mapping_parameterizer_3<Parameterization_polyhedron_adaptor>
|
||||
Parameterizer;
|
||||
|
||||
int main(int argc,char * argv[])
|
||||
{
|
||||
Polyhedron mesh;
|
||||
...
|
||||
|
||||
// The parameterization package needs an adaptor to handle Polyhedron_3 meshes
|
||||
// The mesh must be a topological disk
|
||||
Parameterization_polyhedron_adaptor mesh_adaptor(&mesh);
|
||||
|
||||
Parameterizer::Error_code err = CGAL::parameterize(&mesh_adaptor, Parameterizer());
|
||||
...
|
||||
}
|
||||
|
||||
\end{ccExampleCode}
|
||||
|
||||
|
||||
\end{ccRefClass}
|
||||
|
||||
% +------------------------------------------------------------------------+
|
||||
%%RefPage: end of main body, begin of footer
|
||||
% EOF
|
||||
% +------------------------------------------------------------------------+
|
||||
|
||||
|
|
@ -1,114 +0,0 @@
|
|||
% +------------------------------------------------------------------------+
|
||||
% | Reference manual page: BorderParameterizer_3.tex
|
||||
% +------------------------------------------------------------------------+
|
||||
% | 23.08.2005 Laurent Saboret, Pierre Alliez, Bruno Levy
|
||||
% | Package: Parameterization
|
||||
% |
|
||||
\RCSdef{\RCSBorderParameterizerRev}{$Id$}
|
||||
\RCSdefDate{\RCSBorderParameterizerDate}{$Date$}
|
||||
% |
|
||||
%%RefPage: end of header, begin of main body
|
||||
% +------------------------------------------------------------------------+
|
||||
|
||||
|
||||
\begin{ccRefConcept}{BorderParameterizer_3}
|
||||
|
||||
%% \ccHtmlCrossLink{} %% add further rules for cross referencing links
|
||||
%% \ccHtmlIndexC[concept]{} %% add further index entries
|
||||
|
||||
|
||||
\ccDefinition
|
||||
|
||||
% The section below is automatically generated. Do not edit!
|
||||
%START-AUTO(\ccDefinition)
|
||||
|
||||
BorderParameterizer\_3 is a concept of class that parameterizes a given type of mesh, 'Adaptor', which is a model of the ParameterizationMesh\_3 concept.
|
||||
|
||||
Implementation note: To simplify the implementation, BorderParameterizer\_3 models know only the ParameterizationMesh\_3 class. They do not know the parameterization algorithm requirements nor the kind of sparse linear system used.
|
||||
|
||||
%END-AUTO(\ccDefinition)
|
||||
|
||||
|
||||
\ccHeading{Design Pattern}
|
||||
|
||||
% The section below is automatically generated. Do not edit!
|
||||
%START-AUTO(\ccHeading{Design Pattern})
|
||||
|
||||
BorderParameterizer\_3 models are Strategies \cite{cgal:ghjv-dpero-95}: they implement a strategy of border parameterization for models of ParameterizationMesh\_3.
|
||||
|
||||
%END-AUTO(\ccHeading{Design Pattern})
|
||||
|
||||
|
||||
\ccTypes
|
||||
|
||||
% The section below is automatically generated. Do not edit!
|
||||
%START-AUTO(\ccTypes)
|
||||
|
||||
\ccNestedType{Adaptor}
|
||||
{
|
||||
Export ParameterizationMesh\_3 template parameter.
|
||||
}
|
||||
\ccGlue
|
||||
\ccNestedType{Error_code}
|
||||
{
|
||||
The various errors detected by this package.
|
||||
}
|
||||
\ccGlue
|
||||
|
||||
%END-AUTO(\ccTypes)
|
||||
|
||||
|
||||
\ccCreation
|
||||
\ccCreationVariable{bp} %% variable name for \ccMethod below
|
||||
|
||||
Construction and destruction are undefined.
|
||||
|
||||
% The section below is automatically generated. Do not edit!
|
||||
%START-AUTO(\ccCreation)
|
||||
|
||||
|
||||
|
||||
%END-AUTO(\ccCreation)
|
||||
|
||||
|
||||
\ccOperations
|
||||
|
||||
% The section below is automatically generated. Do not edit!
|
||||
%START-AUTO(\ccOperations)
|
||||
|
||||
\ccMethod{Error_code parameterize_border (Adaptor * mesh);}
|
||||
{
|
||||
Assign to mesh's border vertices a 2D position (ie a (u,v) pair) on border's shape. Mark them as {\em parameterized}. Return false on error.
|
||||
}
|
||||
\ccGlue
|
||||
\ccMethod{bool is_border_convex ();}
|
||||
{
|
||||
Indicate if border's shape is convex.
|
||||
}
|
||||
\ccGlue
|
||||
|
||||
%END-AUTO(\ccOperations)
|
||||
|
||||
|
||||
\ccHasModels
|
||||
|
||||
\ccRefIdfierPage{CGAL::Circular_border_arc_length_parameterizer_3} \\
|
||||
\ccRefIdfierPage{CGAL::Circular_border_uniform_parameterizer_3} \\
|
||||
\ccRefIdfierPage{CGAL::Square_border_arc_length_parameterizer_3} \\
|
||||
\ccRefIdfierPage{CGAL::Square_border_uniform_parameterizer_3} \\
|
||||
\ccRefIdfierPage{CGAL::Two_vertices_parameterizer_3} \\
|
||||
|
||||
|
||||
\ccSeeAlso
|
||||
|
||||
\ccRefIdfierPage{ParameterizerTraits_3} \\
|
||||
\ccRefIdfierPage{ParameterizationMesh_3} \\
|
||||
|
||||
|
||||
\end{ccRefConcept}
|
||||
|
||||
% +------------------------------------------------------------------------+
|
||||
%%RefPage: end of main body, begin of footer
|
||||
% EOF
|
||||
% +------------------------------------------------------------------------+
|
||||
|
||||
|
|
@ -1,126 +0,0 @@
|
|||
% +------------------------------------------------------------------------+
|
||||
% | Reference manual page: Circular_border_arc_length_parameterizer_3.tex
|
||||
% +------------------------------------------------------------------------+
|
||||
% | 23.08.2005 Author
|
||||
% | Package: Parameterization
|
||||
% |
|
||||
\RCSdef{\RCSCircularborderarclengthparameterizerRev}{$Id$}
|
||||
\RCSdefDate{\RCSCircularborderarclengthparameterizerDate}{$Date$}
|
||||
% |
|
||||
%%RefPage: end of header, begin of main body
|
||||
% +------------------------------------------------------------------------+
|
||||
|
||||
|
||||
\begin{ccRefClass}{Circular_border_arc_length_parameterizer_3} %% add template arg's if necessary
|
||||
|
||||
%% \ccHtmlCrossLink{} %% add further rules for cross referencing links
|
||||
%% \ccHtmlIndexC[class]{} %% add further index entries
|
||||
|
||||
|
||||
\ccDefinition
|
||||
|
||||
Circular\_border\_arc\_length\_parameterizer\_3 is the default border parameterizer
|
||||
for fixed border parameterization methods.
|
||||
|
||||
% The section below is automatically generated. Do not edit!
|
||||
%START-AUTO(\ccDefinition)
|
||||
|
||||
This class parameterizes the border of a 3D surface onto a circle, with an arc-length parameterization: (u,v) values are proportional to the length of border edges. Circular\_border\_parameterizer\_3 implements most of the boudary parameterization algorithm. This class implements only compute\_edge\_length() to compute a segment's length.
|
||||
|
||||
%END-AUTO(\ccDefinition)
|
||||
|
||||
\ccInclude{CGAL/Circular_border_parameterizer_3.h}
|
||||
|
||||
|
||||
\ccIsModel
|
||||
|
||||
% The section below is automatically generated. Do not edit!
|
||||
%START-AUTO(\ccIsModel)
|
||||
|
||||
Model of the BorderParameterizer\_3 concept.
|
||||
|
||||
%END-AUTO(\ccIsModel)
|
||||
|
||||
|
||||
\ccHeading{Design Pattern}
|
||||
|
||||
% The section below is automatically generated. Do not edit!
|
||||
%START-AUTO(\ccHeading{Design Pattern})
|
||||
|
||||
BorderParameterizer\_3 models are Strategies \cite{cgal:ghjv-dpero-95}: they implement a strategy of border parameterization for models of ParameterizationMesh\_3
|
||||
|
||||
%END-AUTO(\ccHeading{Design Pattern})
|
||||
|
||||
|
||||
\ccParameters
|
||||
|
||||
The full template declaration is:
|
||||
|
||||
% The section below is automatically generated. Do not edit!
|
||||
%START-AUTO(\ccParameters)
|
||||
|
||||
template$<$ \\
|
||||
class ParameterizationMesh\_3$>$ \\
|
||||
class Circular\_border\_arc\_length\_parameterizer\_3;
|
||||
|
||||
%END-AUTO(\ccParameters)
|
||||
|
||||
|
||||
\ccTypes
|
||||
|
||||
% The section below is automatically generated. Do not edit!
|
||||
%START-AUTO(\ccTypes)
|
||||
|
||||
|
||||
|
||||
%END-AUTO(\ccTypes)
|
||||
|
||||
|
||||
\ccCreation
|
||||
\ccCreationVariable{bp} %% variable name for \ccMethod below
|
||||
|
||||
\ccConstructor{Circular_border_arc_length_parameterizer_3();}{default constructor.}
|
||||
|
||||
% The section below is automatically generated. Do not edit!
|
||||
%START-AUTO(\ccCreation)
|
||||
|
||||
|
||||
|
||||
%END-AUTO(\ccCreation)
|
||||
|
||||
|
||||
\ccOperations
|
||||
|
||||
% The section below is automatically generated. Do not edit!
|
||||
%START-AUTO(\ccOperations)
|
||||
|
||||
\ccMethod{virtual double compute_edge_length (const Adaptor & mesh, Vertex_const_handle source, Vertex_const_handle target);}
|
||||
{
|
||||
Compute the length of an edge.
|
||||
Arc-length border parameterization: (u,v) values are proportional to the length of border edges.
|
||||
}
|
||||
\ccGlue
|
||||
|
||||
%END-AUTO(\ccOperations)
|
||||
|
||||
|
||||
\ccSeeAlso
|
||||
|
||||
\ccRefIdfierPage{CGAL::Circular_border_uniform_parameterizer_3} \\
|
||||
\ccRefIdfierPage{CGAL::Square_border_arc_length_parameterizer_3} \\
|
||||
\ccRefIdfierPage{CGAL::Square_border_uniform_parameterizer_3} \\
|
||||
\ccRefIdfierPage{CGAL::Two_vertices_parameterizer_3} \\
|
||||
|
||||
|
||||
\ccExample
|
||||
|
||||
See \ccc{Taucs_parameterization.C} example.
|
||||
|
||||
|
||||
\end{ccRefClass}
|
||||
|
||||
% +------------------------------------------------------------------------+
|
||||
%%RefPage: end of main body, begin of footer
|
||||
% EOF
|
||||
% +------------------------------------------------------------------------+
|
||||
|
||||
|
|
@ -1,131 +0,0 @@
|
|||
% +------------------------------------------------------------------------+
|
||||
% | Reference manual page: Circular_border_parameterizer_3.tex
|
||||
% +------------------------------------------------------------------------+
|
||||
% | 28.09.2005 Laurent Saboret, Pierre Alliez, Bruno Levy
|
||||
% | Package: Parameterization
|
||||
% |
|
||||
\RCSdef{\RCSCircularborderparameterizerRev}{$Id$}
|
||||
\RCSdefDate{\RCSCircularborderparameterizerDate}{$Date$}
|
||||
% |
|
||||
%%RefPage: end of header, begin of main body
|
||||
% +------------------------------------------------------------------------+
|
||||
|
||||
|
||||
\begin{ccRefClass}{Circular_border_parameterizer_3} %% add template arg's if necessary
|
||||
|
||||
%% \ccHtmlCrossLink{} %% add further rules for cross referencing links
|
||||
%% \ccHtmlIndexC[class]{} %% add further index entries
|
||||
|
||||
|
||||
\ccDefinition
|
||||
|
||||
% The section below is automatically generated. Do not edit!
|
||||
%START-AUTO(\ccDefinition)
|
||||
|
||||
This is the base class of strategies that parameterize the border of a 3D surface onto a circle. Circular\_border\_parameterizer\_3 is a pure virtual class, thus cannot be instantiated. It implements most of the algorithm. Subclasses just have to implement compute\_edge\_length() to compute a segment's length.
|
||||
|
||||
Implementation note: To simplify the implementation, BorderParameterizer\_3 models know only the ParameterizationMesh\_3 class. They do not know the parameterization algorithm requirements nor the kind of sparse linear system used.
|
||||
|
||||
%END-AUTO(\ccDefinition)
|
||||
|
||||
\ccInclude{CGAL/Circular_border_parameterizer_3.h}
|
||||
|
||||
|
||||
\ccIsModel
|
||||
|
||||
% The section below is automatically generated. Do not edit!
|
||||
%START-AUTO(\ccIsModel)
|
||||
|
||||
Model of the BorderParameterizer\_3 concept (although you cannot instantiate this class).
|
||||
|
||||
%END-AUTO(\ccIsModel)
|
||||
|
||||
|
||||
\ccHeading{Design Pattern}
|
||||
|
||||
% The section below is automatically generated. Do not edit!
|
||||
%START-AUTO(\ccHeading{Design Pattern})
|
||||
|
||||
BorderParameterizer\_3 models are Strategies \cite{cgal:ghjv-dpero-95}: they implement a strategy of border parameterization for models of ParameterizationMesh\_3.
|
||||
|
||||
%END-AUTO(\ccHeading{Design Pattern})
|
||||
|
||||
|
||||
\ccParameters
|
||||
|
||||
The full template declaration is:
|
||||
|
||||
% The section below is automatically generated. Do not edit!
|
||||
%START-AUTO(\ccParameters)
|
||||
|
||||
template$<$ \\
|
||||
class ParameterizationMesh\_3$>$ \\
|
||||
class Circular\_border\_parameterizer\_3;
|
||||
|
||||
%END-AUTO(\ccParameters)
|
||||
|
||||
|
||||
\ccTypes
|
||||
|
||||
% The section below is automatically generated. Do not edit!
|
||||
%START-AUTO(\ccTypes)
|
||||
|
||||
\ccNestedType{Adaptor}
|
||||
{
|
||||
Export ParameterizationMesh\_3 template parameter.
|
||||
}
|
||||
\ccGlue
|
||||
|
||||
%END-AUTO(\ccTypes)
|
||||
|
||||
|
||||
\ccCreation
|
||||
\ccCreationVariable{bp} %% choose variable name for \ccMethod
|
||||
|
||||
\ccConstructor{Circular_border_parameterizer_3();}{default constructor.}
|
||||
|
||||
% The section below is automatically generated. Do not edit!
|
||||
%START-AUTO(\ccCreation)
|
||||
|
||||
|
||||
|
||||
%END-AUTO(\ccCreation)
|
||||
|
||||
|
||||
\ccOperations
|
||||
|
||||
% The section below is automatically generated. Do not edit!
|
||||
%START-AUTO(\ccOperations)
|
||||
|
||||
\ccMethod{Parameterizer_traits_3< Adaptor >::Error_code parameterize_border (Adaptor * mesh);}
|
||||
{
|
||||
Assign to mesh's border vertices a 2D position (ie a (u,v) pair) on border's shape. Mark them as {\em parameterized}.
|
||||
}
|
||||
\ccGlue
|
||||
\ccMethod{bool is_border_convex ();}
|
||||
{
|
||||
Indicate if border's shape is convex.
|
||||
}
|
||||
\ccGlue
|
||||
\ccMethod{virtual double compute_edge_length (const Adaptor & mesh, Vertex_const_handle source, Vertex_const_handle target);}
|
||||
{
|
||||
Compute the length of an edge.
|
||||
}
|
||||
\ccGlue
|
||||
|
||||
%END-AUTO(\ccOperations)
|
||||
|
||||
|
||||
\ccSeeAlso
|
||||
|
||||
\ccRefIdfierPage{CGAL::Circular_border_arc_length_parameterizer_3} \\
|
||||
\ccRefIdfierPage{CGAL::Circular_border_uniform_parameterizer_3} \\
|
||||
|
||||
|
||||
\end{ccRefClass}
|
||||
|
||||
% +------------------------------------------------------------------------+
|
||||
%%RefPage: end of main body, begin of footer
|
||||
% EOF
|
||||
% +------------------------------------------------------------------------+
|
||||
|
||||
|
|
@ -1,156 +0,0 @@
|
|||
% +------------------------------------------------------------------------+
|
||||
% | Reference manual page: Circular_border_uniform_parameterizer_3.tex
|
||||
% +------------------------------------------------------------------------+
|
||||
% | 21.09.2005 Laurent Saboret, Pierre Alliez, Bruno Levy
|
||||
% | Package: Parameterization
|
||||
% |
|
||||
\RCSdef{\RCSCircularborderuniformparameterizerRev}{$Id$}
|
||||
\RCSdefDate{\RCSCircularborderuniformparameterizerDate}{$Date$}
|
||||
% |
|
||||
%%RefPage: end of header, begin of main body
|
||||
% +------------------------------------------------------------------------+
|
||||
|
||||
|
||||
\begin{ccRefClass}{Circular_border_uniform_parameterizer_3} %% add template arg's if necessary
|
||||
|
||||
%% \ccHtmlCrossLink{} %% add further rules for cross referencing links
|
||||
%% \ccHtmlIndexC[class]{} %% add further index entries
|
||||
|
||||
|
||||
\ccDefinition
|
||||
|
||||
% The section below is automatically generated. Do not edit!
|
||||
%START-AUTO(\ccDefinition)
|
||||
|
||||
This class parameterizes the border of a 3D surface onto a circle in a uniform manner: points are equally spaced. Circular\_border\_parameterizer\_3 implements most of the boudary parameterization algorithm. This class implements only compute\_edge\_length() to compute a segment's length.
|
||||
|
||||
%END-AUTO(\ccDefinition)
|
||||
|
||||
\ccInclude{CGAL/Circular_border_parameterizer_3.h}
|
||||
|
||||
|
||||
\ccIsModel
|
||||
|
||||
% The section below is automatically generated. Do not edit!
|
||||
%START-AUTO(\ccIsModel)
|
||||
|
||||
Model of the BorderParameterizer\_3 concept.
|
||||
|
||||
%END-AUTO(\ccIsModel)
|
||||
|
||||
|
||||
\ccHeading{Design Pattern}
|
||||
|
||||
% The section below is automatically generated. Do not edit!
|
||||
%START-AUTO(\ccHeading{Design Pattern})
|
||||
|
||||
BorderParameterizer\_3 models are Strategies \cite{cgal:ghjv-dpero-95}: they implement a strategy of border parameterization for models of ParameterizationMesh\_3
|
||||
|
||||
%END-AUTO(\ccHeading{Design Pattern})
|
||||
|
||||
|
||||
\ccParameters
|
||||
|
||||
The full template declaration is:
|
||||
|
||||
% The section below is automatically generated. Do not edit!
|
||||
%START-AUTO(\ccParameters)
|
||||
|
||||
template$<$ \\
|
||||
class ParameterizationMesh\_3$>$ \\
|
||||
class Circular\_border\_uniform\_parameterizer\_3;
|
||||
|
||||
%END-AUTO(\ccParameters)
|
||||
|
||||
|
||||
\ccTypes
|
||||
|
||||
% The section below is automatically generated. Do not edit!
|
||||
%START-AUTO(\ccTypes)
|
||||
|
||||
|
||||
|
||||
%END-AUTO(\ccTypes)
|
||||
|
||||
|
||||
\ccCreation
|
||||
\ccCreationVariable{bp} %% choose variable name for \ccMethod
|
||||
|
||||
\ccConstructor{Circular_border_uniform_parameterizer_3();}{default constructor.}
|
||||
|
||||
% The section below is automatically generated. Do not edit!
|
||||
%START-AUTO(\ccCreation)
|
||||
|
||||
|
||||
|
||||
%END-AUTO(\ccCreation)
|
||||
|
||||
|
||||
\ccOperations
|
||||
|
||||
% The section below is automatically generated. Do not edit!
|
||||
%START-AUTO(\ccOperations)
|
||||
|
||||
\ccMethod{virtual double compute_edge_length (const Adaptor & mesh, Vertex_const_handle source, Vertex_const_handle target);}
|
||||
{
|
||||
Compute the length of an edge.
|
||||
Uniform border parameterization: points are equally spaced.
|
||||
}
|
||||
\ccGlue
|
||||
|
||||
%END-AUTO(\ccOperations)
|
||||
|
||||
|
||||
\ccSeeAlso
|
||||
|
||||
\ccRefIdfierPage{CGAL::Circular_border_arc_length_parameterizer_3} \\
|
||||
\ccRefIdfierPage{CGAL::Square_border_arc_length_parameterizer_3} \\
|
||||
\ccRefIdfierPage{CGAL::Square_border_uniform_parameterizer_3} \\
|
||||
\ccRefIdfierPage{CGAL::Two_vertices_parameterizer_3} \\
|
||||
|
||||
|
||||
\ccExample
|
||||
|
||||
\begin{ccExampleCode}
|
||||
|
||||
// CGAL kernel
|
||||
typedef CGAL::Cartesian<double> Kernel;
|
||||
|
||||
// Mesh true type and parameterization adaptor
|
||||
typedef CGAL::Polyhedron_3<Kernel> Polyhedron;
|
||||
typedef CGAL::Parameterization_polyhedron_adaptor_3<Polyhedron>
|
||||
Parameterization_polyhedron_adaptor;
|
||||
|
||||
// Circular uniform border parameterizer
|
||||
typedef CGAL::Circular_border_uniform_parameterizer_3<Parameterization_polyhedron_adaptor>
|
||||
Border_parameterizer;
|
||||
|
||||
// Floater Mean Value Coordinates parameterizer
|
||||
// with circular uniform border parameterization
|
||||
typedef CGAL::Mean_value_coordinates_parameterizer_3<Parameterization_polyhedron_adaptor,
|
||||
Border_parameterizer>
|
||||
Parameterizer;
|
||||
|
||||
int main(int argc,char * argv[])
|
||||
{
|
||||
Polyhedron mesh;
|
||||
...
|
||||
|
||||
// The parameterization package needs an adaptor to handle Polyhedron_3 meshes
|
||||
// The mesh must be a topological disk
|
||||
Parameterization_polyhedron_adaptor mesh_adaptor(&mesh);
|
||||
|
||||
Parameterizer::Error_code err = CGAL::parameterize(&mesh_adaptor, Parameterizer());
|
||||
...
|
||||
}
|
||||
|
||||
\end{ccExampleCode}
|
||||
|
||||
|
||||
\end{ccRefClass}
|
||||
|
||||
% +------------------------------------------------------------------------+
|
||||
%%RefPage: end of main body, begin of footer
|
||||
% EOF
|
||||
% +------------------------------------------------------------------------+
|
||||
|
||||
|
|
@ -1,133 +0,0 @@
|
|||
% +------------------------------------------------------------------------+
|
||||
% | Reference manual page: Discrete_authalic_parameterizer_3.tex
|
||||
% +------------------------------------------------------------------------+
|
||||
% | 21.09.2005 Laurent Saboret, Pierre Alliez, Bruno Levy
|
||||
% | Package: Parameterization
|
||||
% |
|
||||
\RCSdef{\RCSDiscreteauthalicparameterizerRev}{$Id$}
|
||||
\RCSdefDate{\RCSDiscreteauthalicparameterizerDate}{$Date$}
|
||||
% |
|
||||
%%RefPage: end of header, begin of main body
|
||||
% +------------------------------------------------------------------------+
|
||||
|
||||
|
||||
\begin{ccRefClass}{Discrete_authalic_parameterizer_3} %% add template arg's if necessary
|
||||
|
||||
%% \ccHtmlCrossLink{} %% add further rules for cross referencing links
|
||||
%% \ccHtmlIndexC[class]{} %% add further index entries
|
||||
|
||||
|
||||
\ccDefinition
|
||||
|
||||
% The section below is automatically generated. Do not edit!
|
||||
%START-AUTO(\ccDefinition)
|
||||
|
||||
The class Discrete\_authalic\_parameterizer\_3 implements the Discrete Authalic Parameterization algorithm \cite{cgal:dma-ipsm-02}. This method is sometimes called {\em DAP} or just {\em Authalic parameterization}.
|
||||
|
||||
DAP is a weak area-preserving parameterization. It is a compromise between area-preserving and angle-preserving.
|
||||
|
||||
1 to 1 mapping is guaranteed if surface's border is mapped onto a convex polygon.
|
||||
|
||||
As all parameterization algorithms of the package, this class is usually called via the global function parameterize().
|
||||
|
||||
This class is a Strategy \cite{cgal:ghjv-dpero-95} called by the main parameterization algorithm Fixed\_border\_parameterizer\_3::parameterize(). Discrete\_authalic\_parameterizer\_3:\begin{itemize}
|
||||
\item provides default BorderParameterizer\_3 and SparseLinearAlgebraTraits\_d template parameters that make sense.\item 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.\end{itemize}
|
||||
|
||||
%END-AUTO(\ccDefinition)
|
||||
|
||||
\ccInclude{CGAL/Discrete_authalic_parameterizer_3.h}
|
||||
|
||||
|
||||
\ccIsModel
|
||||
|
||||
% The section below is automatically generated. Do not edit!
|
||||
%START-AUTO(\ccIsModel)
|
||||
|
||||
Model of the ParameterizerTraits\_3 concept.
|
||||
|
||||
%END-AUTO(\ccIsModel)
|
||||
|
||||
|
||||
\ccParameters
|
||||
|
||||
The full template declaration is:
|
||||
|
||||
% The section below is automatically generated. Do not edit!
|
||||
%START-AUTO(\ccParameters)
|
||||
|
||||
template$<$ \\
|
||||
class ParameterizationMesh\_3, \\
|
||||
class BorderParameterizer\_3 = Circular\_border\_arc\_length\_parameterizer\_3$<$ParameterizationMesh\_3$>$, \\
|
||||
class SparseLinearAlgebraTraits\_d = OpenNL::DefaultLinearSolverTraits$<$typename ParameterizationMesh\_3::NT$>$$>$ \\
|
||||
class Discrete\_authalic\_parameterizer\_3;
|
||||
|
||||
%END-AUTO(\ccParameters)
|
||||
|
||||
|
||||
\ccTypes
|
||||
|
||||
% The section below is automatically generated. Do not edit!
|
||||
%START-AUTO(\ccTypes)
|
||||
|
||||
|
||||
|
||||
%END-AUTO(\ccTypes)
|
||||
|
||||
|
||||
\ccCreation
|
||||
\ccCreationVariable{param} %% variable name used by \ccMethod below
|
||||
|
||||
% The section below is automatically generated. Do not edit!
|
||||
%START-AUTO(\ccCreation)
|
||||
|
||||
\ccConstructor{Discrete_authalic_parameterizer_3 (Border_param border_param = Border_param(), Sparse_LA sparse_la = Sparse_LA());}
|
||||
{
|
||||
Constructor.
|
||||
}
|
||||
\ccGlue
|
||||
\begin{description}
|
||||
\item[Parameters: ]
|
||||
\begin{description}
|
||||
\item[border\_param]Object that maps the surface's border to 2D space. \item[sparse\_la]Traits object to access a sparse linear system. \end{description}
|
||||
\end{description}
|
||||
\ccGlue
|
||||
|
||||
%END-AUTO(\ccCreation)
|
||||
|
||||
|
||||
\ccOperations
|
||||
|
||||
% The section below is automatically generated. Do not edit!
|
||||
%START-AUTO(\ccOperations)
|
||||
|
||||
\ccMethod{virtual NT compute_w_ij (const Adaptor & mesh, Vertex_const_handle main_vertex_v_i, Vertex_around_vertex_const_circulator neighbor_vertex_v_j);}
|
||||
{
|
||||
Compute w\_ij = (i,j) coefficient of matrix A for j neighbor vertex of i.
|
||||
}
|
||||
\ccGlue
|
||||
|
||||
%END-AUTO(\ccOperations)
|
||||
|
||||
|
||||
\ccSeeAlso
|
||||
|
||||
\ccRefIdfierPage{CGAL::Parameterizer_traits_3} \\
|
||||
\ccRefIdfierPage{CGAL::Fixed_border_parameterizer_3} \\
|
||||
\ccRefIdfierPage{CGAL::Barycentric_mapping_parameterizer_3} \\
|
||||
\ccRefIdfierPage{CGAL::Discrete_conformal_map_parameterizer_3} \\
|
||||
\ccRefIdfierPage{CGAL::LSCM_parameterizer_3} \\
|
||||
\ccRefIdfierPage{CGAL::Mean_value_coordinates_parameterizer_3} \\
|
||||
|
||||
|
||||
\ccExample
|
||||
|
||||
See \ccc{Authalic_parameterization.C} example.
|
||||
|
||||
|
||||
\end{ccRefClass}
|
||||
|
||||
% +------------------------------------------------------------------------+
|
||||
%%RefPage: end of main body, begin of footer
|
||||
% EOF
|
||||
% +------------------------------------------------------------------------+
|
||||
|
||||
|
|
@ -1,160 +0,0 @@
|
|||
% +------------------------------------------------------------------------+
|
||||
% | Reference manual page: Discrete_conformal_map_parameterizer_3.tex
|
||||
% +------------------------------------------------------------------------+
|
||||
% | 21.09.2005 Laurent Saboret, Pierre Alliez, Bruno Levy
|
||||
% | Package: Parameterization
|
||||
% |
|
||||
\RCSdef{\RCSDiscreteconformalmapparameterizerRev}{$Id$}
|
||||
\RCSdefDate{\RCSDiscreteconformalmapparameterizerDate}{$Date$}
|
||||
% |
|
||||
%%RefPage: end of header, begin of main body
|
||||
% +------------------------------------------------------------------------+
|
||||
|
||||
|
||||
\begin{ccRefClass}{Discrete_conformal_map_parameterizer_3} %% add template arg's if necessary
|
||||
|
||||
%% \ccHtmlCrossLink{} %% add further rules for cross referencing links
|
||||
%% \ccHtmlIndexC[class]{} %% add further index entries
|
||||
|
||||
|
||||
\ccDefinition
|
||||
|
||||
% The section below is automatically generated. Do not edit!
|
||||
%START-AUTO(\ccDefinition)
|
||||
|
||||
The class Discrete\_conformal\_map\_parameterizer\_3 implements the Discrete Conformal Map (DCM) parameterization \cite{cgal:eddhls-maam-95}. This algorithm is also called {\em Discrete Conformal Parameterization (DCP)}, {\em Discrete Harmonic Map} or {\em Fixed Conformal Parameterization} by other authors.
|
||||
|
||||
This is a conformal parameterization, i.e. it attempts to preserve angles.
|
||||
|
||||
1 to 1 mapping is guaranteed if surface's border is mapped onto a convex polygon.
|
||||
|
||||
As all parameterization algorithms of the package, this class is usually called via the global function parameterize().
|
||||
|
||||
This class is a Strategy \cite{cgal:ghjv-dpero-95} called by the main parameterization algorithm Fixed\_border\_parameterizer\_3::parameterize(). Discrete\_conformal\_map\_parameterizer\_3:\begin{itemize}
|
||||
\item provides default BorderParameterizer\_3 and SparseLinearAlgebraTraits\_d template parameters that make sense.\item 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.\end{itemize}
|
||||
|
||||
%END-AUTO(\ccDefinition)
|
||||
|
||||
\ccInclude{CGAL/Discrete_conformal_map_parameterizer_3.h}
|
||||
|
||||
|
||||
\ccIsModel
|
||||
|
||||
% The section below is automatically generated. Do not edit!
|
||||
%START-AUTO(\ccIsModel)
|
||||
|
||||
Model of the ParameterizerTraits\_3 concept.
|
||||
|
||||
%END-AUTO(\ccIsModel)
|
||||
|
||||
|
||||
\ccParameters
|
||||
|
||||
The full template declaration is:
|
||||
|
||||
% The section below is automatically generated. Do not edit!
|
||||
%START-AUTO(\ccParameters)
|
||||
|
||||
template$<$ \\
|
||||
class ParameterizationMesh\_3, \\
|
||||
class BorderParameterizer\_3 = Circular\_border\_arc\_length\_parameterizer\_3$<$ParameterizationMesh\_3$>$, \\
|
||||
class SparseLinearAlgebraTraits\_d = OpenNL::DefaultLinearSolverTraits$<$typename ParameterizationMesh\_3::NT$>$$>$ \\
|
||||
class Discrete\_conformal\_map\_parameterizer\_3;
|
||||
|
||||
%END-AUTO(\ccParameters)
|
||||
|
||||
|
||||
\ccTypes
|
||||
|
||||
% The section below is automatically generated. Do not edit!
|
||||
%START-AUTO(\ccTypes)
|
||||
|
||||
|
||||
|
||||
%END-AUTO(\ccTypes)
|
||||
|
||||
|
||||
\ccCreation
|
||||
\ccCreationVariable{param} %% choose variable name for \ccMethod
|
||||
|
||||
% The section below is automatically generated. Do not edit!
|
||||
%START-AUTO(\ccCreation)
|
||||
|
||||
\ccConstructor{Discrete_conformal_map_parameterizer_3 (Border_param border_param = Border_param(), Sparse_LA sparse_la = Sparse_LA());}
|
||||
{
|
||||
Constructor.
|
||||
}
|
||||
\ccGlue
|
||||
\begin{description}
|
||||
\item[Parameters: ]
|
||||
\begin{description}
|
||||
\item[border\_param]Object that maps the surface's border to 2D space. \item[sparse\_la]Traits object to access a sparse linear system. \end{description}
|
||||
\end{description}
|
||||
\ccGlue
|
||||
|
||||
%END-AUTO(\ccCreation)
|
||||
|
||||
|
||||
\ccOperations
|
||||
|
||||
% The section below is automatically generated. Do not edit!
|
||||
%START-AUTO(\ccOperations)
|
||||
|
||||
\ccMethod{virtual NT compute_w_ij (const Adaptor & mesh, Vertex_const_handle main_vertex_v_i, Vertex_around_vertex_const_circulator neighbor_vertex_v_j);}
|
||||
{
|
||||
Compute w\_ij = (i,j) coefficient of matrix A for j neighbor vertex of i.
|
||||
}
|
||||
\ccGlue
|
||||
|
||||
%END-AUTO(\ccOperations)
|
||||
|
||||
|
||||
\ccSeeAlso
|
||||
|
||||
\ccRefIdfierPage{CGAL::Parameterizer_traits_3} \\
|
||||
\ccRefIdfierPage{CGAL::Fixed_border_parameterizer_3} \\
|
||||
\ccRefIdfierPage{CGAL::Barycentric_mapping_parameterizer_3} \\
|
||||
\ccRefIdfierPage{CGAL::Discrete_authalic_parameterizer_3} \\
|
||||
\ccRefIdfierPage{CGAL::LSCM_parameterizer_3} \\
|
||||
\ccRefIdfierPage{CGAL::Mean_value_coordinates_parameterizer_3} \\
|
||||
|
||||
|
||||
\ccExample
|
||||
|
||||
\begin{ccExampleCode}
|
||||
|
||||
// CGAL kernel
|
||||
typedef CGAL::Cartesian<double> Kernel;
|
||||
|
||||
// Mesh true type and parameterization adaptor
|
||||
typedef CGAL::Polyhedron_3<Kernel> Polyhedron;
|
||||
typedef CGAL::Parameterization_polyhedron_adaptor_3<Polyhedron>
|
||||
Parameterization_polyhedron_adaptor;
|
||||
|
||||
// Discrete Conformal Map parameterization
|
||||
typedef CGAL::Discrete_conformal_map_parameterizer_3<Parameterization_polyhedron_adaptor>
|
||||
Parameterizer;
|
||||
|
||||
int main(int argc,char * argv[])
|
||||
{
|
||||
Polyhedron mesh;
|
||||
...
|
||||
|
||||
// The parameterization package needs an adaptor to handle Polyhedron_3 meshes
|
||||
// The mesh must be a topological disk
|
||||
Parameterization_polyhedron_adaptor mesh_adaptor(&mesh);
|
||||
|
||||
Parameterizer::Error_code err = CGAL::parameterize(&mesh_adaptor, Parameterizer());
|
||||
...
|
||||
}
|
||||
|
||||
\end{ccExampleCode}
|
||||
|
||||
|
||||
\end{ccRefClass}
|
||||
|
||||
% +------------------------------------------------------------------------+
|
||||
%%RefPage: end of main body, begin of footer
|
||||
% EOF
|
||||
% +------------------------------------------------------------------------+
|
||||
|
||||
|
|
@ -1,191 +0,0 @@
|
|||
% +------------------------------------------------------------------------+
|
||||
% | Reference manual page: Fixed_border_parameterizer_3.tex
|
||||
% +------------------------------------------------------------------------+
|
||||
% | 21.09.2005 Laurent Saboret, Pierre Alliez, Bruno Levy
|
||||
% | Package: Parameterization
|
||||
% |
|
||||
\RCSdef{\RCSFixedborderparameterizerRev}{$Id$}
|
||||
\RCSdefDate{\RCSFixedborderparameterizerDate}{$Date$}
|
||||
% |
|
||||
%%RefPage: end of header, begin of main body
|
||||
% +------------------------------------------------------------------------+
|
||||
|
||||
|
||||
\begin{ccRefClass}{Fixed_border_parameterizer_3} %% add template arg's if necessary
|
||||
|
||||
%% \ccHtmlCrossLink{} %% add further rules for cross referencing links
|
||||
%% \ccHtmlIndexC[class]{} %% add further index entries
|
||||
|
||||
|
||||
\ccDefinition
|
||||
|
||||
% The section below is automatically generated. Do not edit!
|
||||
%START-AUTO(\ccDefinition)
|
||||
|
||||
The class Fixed\_border\_parameterizer\_3 is the base class of fixed border parameterization methods (Tutte, Floater, ...).
|
||||
|
||||
1 to 1 mapping is guaranteed if surface's border is mapped onto a convex polygon.
|
||||
|
||||
This class is a pure virtual class, thus cannot be instantiated. Anyway, it implements most of the parameterization algorithm parameterize(). Subclasses are Strategies \cite{cgal:ghjv-dpero-95} that modify the behavior of this algorithm:\begin{itemize}
|
||||
\item They provide BorderParameterizer\_3 and SparseLinearAlgebraTraits\_d template parameters that make sense.\item They implement compute\_w\_ij() to compute w\_ij = (i,j) coefficient of matrix A for j neighbor vertex of i.\item They may implement an optimized version of is\_one\_to\_one\_mapping().\end{itemize}
|
||||
|
||||
|
||||
\begin{description}
|
||||
\item[Todo]Fixed\_border\_parameterizer\_3 should remove border vertices from the linear systems in order to have a symmetric definite positive matrix for Tutte Barycentric Mapping and Discrete Conformal Map algorithms.\end{description}
|
||||
|
||||
%END-AUTO(\ccDefinition)
|
||||
|
||||
\ccInclude{CGAL/Fixed_border_parameterizer_3.h}
|
||||
|
||||
|
||||
\ccIsModel
|
||||
|
||||
% The section below is automatically generated. Do not edit!
|
||||
%START-AUTO(\ccIsModel)
|
||||
|
||||
Model of the ParameterizerTraits\_3 concept (although you cannot instantiate this class).
|
||||
|
||||
%END-AUTO(\ccIsModel)
|
||||
|
||||
|
||||
\ccParameters
|
||||
|
||||
The full template declaration is:
|
||||
|
||||
% The section below is automatically generated. Do not edit!
|
||||
%START-AUTO(\ccParameters)
|
||||
|
||||
template$<$ \\
|
||||
class ParameterizationMesh\_3, \\
|
||||
class BorderParameterizer\_3 = Circular\_border\_arc\_length\_parameterizer\_3$<$ParameterizationMesh\_3$>$, \\
|
||||
class SparseLinearAlgebraTraits\_d = OpenNL::DefaultLinearSolverTraits$<$typename ParameterizationMesh\_3::NT$>$$>$ \\
|
||||
class Fixed\_border\_parameterizer\_3;
|
||||
|
||||
%END-AUTO(\ccParameters)
|
||||
|
||||
|
||||
\ccTypes
|
||||
|
||||
% The section below is automatically generated. Do not edit!
|
||||
%START-AUTO(\ccTypes)
|
||||
|
||||
\ccNestedType{Border_param}
|
||||
{
|
||||
Export BorderParameterizer\_3 template parameter.
|
||||
}
|
||||
\ccGlue
|
||||
\ccNestedType{Sparse_LA}
|
||||
{
|
||||
Export SparseLinearAlgebraTraits\_d template parameter.
|
||||
}
|
||||
\ccGlue
|
||||
|
||||
%END-AUTO(\ccTypes)
|
||||
|
||||
|
||||
\ccCreation
|
||||
\ccCreationVariable{param} %% choose variable name for \ccMethod
|
||||
|
||||
% The section below is automatically generated. Do not edit!
|
||||
%START-AUTO(\ccCreation)
|
||||
|
||||
\ccConstructor{Fixed_border_parameterizer_3 (Border_param border_param = Border_param(), Sparse_LA sparse_la = Sparse_LA());}
|
||||
{
|
||||
Constructor.
|
||||
}
|
||||
\ccGlue
|
||||
\begin{description}
|
||||
\item[Parameters: ]
|
||||
\begin{description}
|
||||
\item[border\_param]Object that maps the surface's border to 2D space \item[sparse\_la]Traits object to access a sparse linear system \end{description}
|
||||
\end{description}
|
||||
\ccGlue
|
||||
|
||||
%END-AUTO(\ccCreation)
|
||||
|
||||
|
||||
\ccOperations
|
||||
|
||||
% The section below is automatically generated. Do not edit!
|
||||
%START-AUTO(\ccOperations)
|
||||
|
||||
\ccMethod{Parameterizer_traits_3< Adaptor >::Error_code parameterize (Adaptor * mesh);}
|
||||
{
|
||||
Compute a 1 to 1 mapping from a triangular 3D surface 'mesh' to a piece of the 2D space. The mapping is linear by pieces (linear in each triangle). The result is the (u,v) pair image of each vertex of the 3D surface.
|
||||
Preconditions:\begin{itemize}
|
||||
\item 'mesh' must be a surface with 1 connected component.\item 'mesh' must be a triangular mesh.\item the mesh border must be mapped onto a convex polygon. \end{itemize}
|
||||
}
|
||||
\ccGlue
|
||||
\ccMethod{Parameterizer_traits_3< Adaptor >::Error_code check_parameterize_preconditions (Adaptor * mesh);}
|
||||
{
|
||||
Check parameterize() preconditions:\begin{itemize}
|
||||
\item 'mesh' must be a surface with 1 connected component.\item 'mesh' must be a triangular mesh.\item the mesh border must be mapped onto a convex polygon. \end{itemize}
|
||||
}
|
||||
\ccGlue
|
||||
\ccMethod{void initialize_system_from_mesh_border (Matrix * A, Vector * Bu, Vector * Bv, const Adaptor & mesh);}
|
||||
{
|
||||
Initialize A, Bu and Bv after border parameterization. Fill the border vertices' lines in both linear systems: {\em u = constant} and {\em v = constant}.
|
||||
Preconditions:\begin{itemize}
|
||||
\item vertices must be indexed.\item A, Bu and Bv must be allocated.\item border vertices must be parameterized. \end{itemize}
|
||||
}
|
||||
\ccGlue
|
||||
\ccMethod{virtual NT compute_w_ij (const Adaptor & mesh, Vertex_const_handle main_vertex_v_i, Vertex_around_vertex_const_circulator neighbor_vertex_v_j);}
|
||||
{
|
||||
Compute w\_ij = (i,j) coefficient of matrix A for j neighbor vertex of i. Implementation note: Subclasses must at least implement compute\_w\_ij().
|
||||
}
|
||||
\ccGlue
|
||||
\ccMethod{Parameterizer_traits_3< Adaptor >::Error_code setup_inner_vertex_relations (Matrix * A, Vector * Bu, Vector * Bv, const Adaptor & mesh, Vertex_const_handle vertex);}
|
||||
{
|
||||
Compute the line i of matrix A for i inner vertex:\begin{itemize}
|
||||
\item call compute\_w\_ij() to compute the A coefficient w\_ij for each neighbor v\_j.\item compute w\_ii = - sum of w\_ijs.\end{itemize}
|
||||
Preconditions:\begin{itemize}
|
||||
\item vertices must be indexed.\item vertex i musn't be already parameterized.\item line i of A must contain only zeros. \end{itemize}
|
||||
}
|
||||
\ccGlue
|
||||
\ccMethod{void set_mesh_uv_from_system (Adaptor * mesh, const Vector & Xu, const Vector & Xv);}
|
||||
{
|
||||
Copy Xu and Xv coordinates into the (u,v) pair of each surface vertex.
|
||||
}
|
||||
\ccGlue
|
||||
\ccMethod{Parameterizer_traits_3< Adaptor >::Error_code check_parameterize_postconditions (const Adaptor & mesh, const Matrix & A, const Vector & Bu, const Vector & Bv);}
|
||||
{
|
||||
Check parameterize() postconditions:\begin{itemize}
|
||||
\item {\em A$\ast$Xu = Bu} and {\em A$\ast$Xv = Bv} systems are solvable with a good conditioning.\item 3D -$>$ 2D mapping is 1 to 1. \end{itemize}
|
||||
}
|
||||
\ccGlue
|
||||
\ccMethod{bool is_one_to_one_mapping (const Adaptor & mesh, const Matrix & A, const Vector & Bu, const Vector & Bv);}
|
||||
{
|
||||
Check if 3D -$>$ 2D mapping is 1 to 1. The default implementation checks each normal.
|
||||
}
|
||||
\ccGlue
|
||||
\ccMethod{Border_param& get_border_parameterizer ();}
|
||||
{
|
||||
Get the object that maps the surface's border onto a 2D space.
|
||||
}
|
||||
\ccGlue
|
||||
\ccMethod{Sparse_LA& get_linear_algebra_traits ();}
|
||||
{
|
||||
Get the sparse linear algebra (traits object to access the linear system).
|
||||
}
|
||||
\ccGlue
|
||||
|
||||
%END-AUTO(\ccOperations)
|
||||
|
||||
|
||||
\ccSeeAlso
|
||||
|
||||
\ccRefIdfierPage{CGAL::Parameterizer_traits_3} \\
|
||||
\ccRefIdfierPage{CGAL::Barycentric_mapping_parameterizer_3} \\
|
||||
\ccRefIdfierPage{CGAL::Discrete_authalic_parameterizer_3} \\
|
||||
\ccRefIdfierPage{CGAL::Discrete_conformal_map_parameterizer_3} \\
|
||||
\ccRefIdfierPage{CGAL::LSCM_parameterizer_3} \\
|
||||
\ccRefIdfierPage{CGAL::Mean_value_coordinates_parameterizer_3} \\
|
||||
|
||||
|
||||
\end{ccRefClass}
|
||||
|
||||
% +------------------------------------------------------------------------+
|
||||
%%RefPage: end of main body, begin of footer
|
||||
% EOF
|
||||
% +------------------------------------------------------------------------+
|
||||
|
||||
|
|
@ -1,171 +0,0 @@
|
|||
% +------------------------------------------------------------------------+
|
||||
% | Reference manual page: LSCM_parameterizer_3.tex
|
||||
% +------------------------------------------------------------------------+
|
||||
% | 21.09.2005 Laurent Saboret, Pierre Alliez, Bruno Levy
|
||||
% | Package: Parameterization
|
||||
% |
|
||||
\RCSdef{\RCSLSCMparameterizerRev}{$Id$}
|
||||
\RCSdefDate{\RCSLSCMparameterizerDate}{$Date$}
|
||||
% |
|
||||
%%RefPage: end of header, begin of main body
|
||||
% +------------------------------------------------------------------------+
|
||||
|
||||
|
||||
\begin{ccRefClass}{LSCM_parameterizer_3} %% add template arg's if necessary
|
||||
|
||||
%% \ccHtmlCrossLink{} %% add further rules for cross referencing links
|
||||
%% \ccHtmlIndexC[class]{} %% add further index entries
|
||||
|
||||
|
||||
\ccDefinition
|
||||
|
||||
% The section below is automatically generated. Do not edit!
|
||||
%START-AUTO(\ccDefinition)
|
||||
|
||||
The class LSCM\_parameterizer\_3 implements the Least Squares Conformal Maps (LSCM) parameterization \cite{cgal:lprm-lscm-02}.
|
||||
|
||||
This is a conformal parameterization, i.e. it attempts to preserve angles.
|
||||
|
||||
This is a free border parameterization. No need to map the surface's border onto a convex polygon (only 2 pinned vertices are needed to ensure a unique solution), but 1 to 1 mapping is NOT guaranteed.
|
||||
|
||||
As all parameterization algorithms of the package, this class is usually called via the global function parameterize().
|
||||
|
||||
\begin{description}
|
||||
\item[Todo]Add to SparseLinearAlgebraTraits\_d the ability to solve linear systems in the least squares sense, then access to the solver via the traits class interface instead of calls specific to OpenNL.\end{description}
|
||||
|
||||
%END-AUTO(\ccDefinition)
|
||||
|
||||
\ccInclude{CGAL/LSCM_parameterizer_3.h}
|
||||
|
||||
|
||||
\ccIsModel
|
||||
|
||||
% The section below is automatically generated. Do not edit!
|
||||
%START-AUTO(\ccIsModel)
|
||||
|
||||
Model of the ParameterizerTraits\_3 concept.
|
||||
|
||||
%END-AUTO(\ccIsModel)
|
||||
|
||||
|
||||
\ccParameters
|
||||
|
||||
The full template declaration is:
|
||||
|
||||
% The section below is automatically generated. Do not edit!
|
||||
%START-AUTO(\ccParameters)
|
||||
|
||||
template$<$ \\
|
||||
class ParameterizationMesh\_3, \\
|
||||
class BorderParameterizer\_3 = Two\_vertices\_parameterizer\_3$<$ParameterizationMesh\_3$>$, \\
|
||||
class SparseLinearAlgebraTraits\_d = OpenNL::SymmetricLinearSolverTraits$<$typename ParameterizationMesh\_3::NT$>$$>$ \\
|
||||
class LSCM\_parameterizer\_3;
|
||||
|
||||
%END-AUTO(\ccParameters)
|
||||
|
||||
|
||||
\ccTypes
|
||||
|
||||
% The section below is automatically generated. Do not edit!
|
||||
%START-AUTO(\ccTypes)
|
||||
|
||||
\ccNestedType{Border_param}
|
||||
{
|
||||
Export BorderParameterizer\_3 template parameter.
|
||||
}
|
||||
\ccGlue
|
||||
\ccNestedType{Sparse_LA}
|
||||
{
|
||||
Export SparseLinearAlgebraTraits\_d template parameter.
|
||||
}
|
||||
\ccGlue
|
||||
|
||||
%END-AUTO(\ccTypes)
|
||||
|
||||
|
||||
\ccCreation
|
||||
\ccCreationVariable{param} %% choose variable name for \ccMethod
|
||||
|
||||
% The section below is automatically generated. Do not edit!
|
||||
%START-AUTO(\ccCreation)
|
||||
|
||||
\ccConstructor{LSCM_parameterizer_3 (Border_param border_param = Border_param(), Sparse_LA sparse_la = Sparse_LA());}
|
||||
{
|
||||
Constructor.
|
||||
}
|
||||
\ccGlue
|
||||
\begin{description}
|
||||
\item[Parameters: ]
|
||||
\begin{description}
|
||||
\item[border\_param]Object that maps the surface's border to 2D space \item[sparse\_la]Traits object to access a sparse linear system \end{description}
|
||||
\end{description}
|
||||
\ccGlue
|
||||
|
||||
%END-AUTO(\ccCreation)
|
||||
|
||||
|
||||
\ccOperations
|
||||
|
||||
% The section below is automatically generated. Do not edit!
|
||||
%START-AUTO(\ccOperations)
|
||||
|
||||
\ccMethod{Parameterizer_traits_3< Adaptor >::Error_code parameterize (Adaptor * mesh);}
|
||||
{
|
||||
Compute a 1 to 1 mapping from a triangular 3D surface 'mesh' to a piece of the 2D space. The mapping is linear by pieces (linear in each triangle). The result is the (u,v) pair image of each vertex of the 3D surface.
|
||||
Preconditions:\begin{itemize}
|
||||
\item 'mesh' must be a surface with 1 connected component.\item 'mesh' must be a triangular mesh. \end{itemize}
|
||||
}
|
||||
\ccGlue
|
||||
|
||||
%END-AUTO(\ccOperations)
|
||||
|
||||
|
||||
\ccSeeAlso
|
||||
|
||||
\ccRefIdfierPage{CGAL::Parameterizer_traits_3} \\
|
||||
\ccRefIdfierPage{CGAL::Fixed_border_parameterizer_3} \\
|
||||
\ccRefIdfierPage{CGAL::Barycentric_mapping_parameterizer_3} \\
|
||||
\ccRefIdfierPage{CGAL::Discrete_authalic_parameterizer_3} \\
|
||||
\ccRefIdfierPage{CGAL::Discrete_conformal_map_parameterizer_3} \\
|
||||
\ccRefIdfierPage{CGAL::Mean_value_coordinates_parameterizer_3} \\
|
||||
|
||||
|
||||
\ccExample
|
||||
|
||||
\begin{ccExampleCode}
|
||||
|
||||
// CGAL kernel
|
||||
typedef CGAL::Cartesian<double> Kernel;
|
||||
|
||||
// Mesh true type and parameterization adaptor
|
||||
typedef CGAL::Polyhedron_3<Kernel> Polyhedron;
|
||||
typedef CGAL::Parameterization_polyhedron_adaptor_3<Polyhedron>
|
||||
Parameterization_polyhedron_adaptor;
|
||||
|
||||
// Least Squares Conformal Maps parameterization
|
||||
typedef CGAL::LSCM_parameterizer_3<Parameterization_polyhedron_adaptor>
|
||||
Parameterizer;
|
||||
|
||||
int main(int argc,char * argv[])
|
||||
{
|
||||
Polyhedron mesh;
|
||||
...
|
||||
|
||||
// The parameterization package needs an adaptor to handle Polyhedron_3 meshes
|
||||
// The mesh must be a topological disk
|
||||
Parameterization_polyhedron_adaptor mesh_adaptor(&mesh);
|
||||
|
||||
Parameterizer::Error_code err = CGAL::parameterize(&mesh_adaptor, Parameterizer());
|
||||
...
|
||||
}
|
||||
|
||||
\end{ccExampleCode}
|
||||
|
||||
|
||||
\end{ccRefClass}
|
||||
|
||||
% +------------------------------------------------------------------------+
|
||||
%%RefPage: end of main body, begin of footer
|
||||
% EOF
|
||||
% +------------------------------------------------------------------------+
|
||||
|
||||
|
|
@ -1,132 +0,0 @@
|
|||
% +------------------------------------------------------------------------+
|
||||
% | Reference manual page: Matrix.tex
|
||||
% +------------------------------------------------------------------------+
|
||||
% | 21.09.2005 Laurent Saboret, Pierre Alliez, Bruno Levy
|
||||
% | Package: Parameterization
|
||||
% |
|
||||
\RCSdef{\RCSMatrixRev}{$Id$}
|
||||
\RCSdefDate{\RCSMatrixDate}{$Date$}
|
||||
% |
|
||||
%%RefPage: end of header, begin of main body
|
||||
% +------------------------------------------------------------------------+
|
||||
|
||||
|
||||
\begin{ccRefConcept}[SparseLinearAlgebra_d::]{Matrix}
|
||||
|
||||
%% \ccHtmlCrossLink{} %% add further rules for cross referencing links
|
||||
%% \ccHtmlIndexC[concept]{} %% add further index entries
|
||||
|
||||
|
||||
\ccDefinition
|
||||
|
||||
% The section below is automatically generated. Do not edit!
|
||||
%START-AUTO(\ccDefinition)
|
||||
|
||||
SparseLinearAlgebraTraits\_d::Matrix is a concept of a sparse matrix class.
|
||||
|
||||
%END-AUTO(\ccDefinition)
|
||||
|
||||
|
||||
\ccRefines
|
||||
|
||||
% The section below is automatically generated. Do not edit!
|
||||
%START-AUTO(\ccRefines)
|
||||
|
||||
This is a sub-concept of LinearAlgebraTraits\_d::Matrix.
|
||||
|
||||
%END-AUTO(\ccRefines)
|
||||
|
||||
|
||||
\ccTypes
|
||||
|
||||
% The section below is automatically generated. Do not edit!
|
||||
%START-AUTO(\ccTypes)
|
||||
|
||||
\ccNestedType{NT}
|
||||
{
|
||||
}
|
||||
\ccGlue
|
||||
|
||||
%END-AUTO(\ccTypes)
|
||||
|
||||
|
||||
\ccCreation
|
||||
\ccCreationVariable{M} %% choose variable name
|
||||
|
||||
% The section below is automatically generated. Do not edit!
|
||||
%START-AUTO(\ccCreation)
|
||||
|
||||
\ccConstructor{Matrix (int dimension);}
|
||||
{
|
||||
Create a square matrix initialized with zeros.
|
||||
}
|
||||
\ccGlue
|
||||
\ccConstructor{Matrix (int rows, int columns);}
|
||||
{
|
||||
Create a rectangular matrix initialized with zeros.
|
||||
}
|
||||
\ccGlue
|
||||
|
||||
%END-AUTO(\ccCreation)
|
||||
|
||||
|
||||
\ccOperations
|
||||
|
||||
% The section below is automatically generated. Do not edit!
|
||||
%START-AUTO(\ccOperations)
|
||||
|
||||
\ccMethod{int row_dimension () const;}
|
||||
{
|
||||
Return the matrix number of rows.
|
||||
}
|
||||
\ccGlue
|
||||
\ccMethod{int column_dimension () const;}
|
||||
{
|
||||
Return the matrix number of columns.
|
||||
}
|
||||
\ccGlue
|
||||
\ccMethod{NT get_coef (int row, int column) const;}
|
||||
{
|
||||
Read access to 1 matrix coefficient.
|
||||
Preconditions:\begin{itemize}
|
||||
\item 0 $<$= row $<$ row\_dimension().\item 0 $<$= column $<$ column\_dimension(). \end{itemize}
|
||||
}
|
||||
\ccGlue
|
||||
\ccMethod{void add_coef (int row, int column, NT value);}
|
||||
{
|
||||
Write access to 1 matrix coefficient: a\_ij $<$- a\_ij + val.
|
||||
Preconditions:\begin{itemize}
|
||||
\item 0 $<$= row $<$ row\_dimension().\item 0 $<$= column $<$ column\_dimension(). \end{itemize}
|
||||
}
|
||||
\ccGlue
|
||||
\ccMethod{void set_coef (int row, int column, NT value);}
|
||||
{
|
||||
Write access to 1 matrix coefficient.
|
||||
Preconditions:\begin{itemize}
|
||||
\item 0 $<$= row $<$ row\_dimension().\item 0 $<$= column $<$ column\_dimension(). \end{itemize}
|
||||
}
|
||||
\ccGlue
|
||||
|
||||
%END-AUTO(\ccOperations)
|
||||
|
||||
|
||||
\ccHasModels
|
||||
|
||||
\ccRefIdfierPage{CGAL::Taucs_matrix} \\
|
||||
\ccRefIdfierPage{CGAL::Taucs_symmetric_matrix} \\
|
||||
\ccc{OpenNL::DefaulSparseMatrix} \\
|
||||
|
||||
|
||||
\ccSeeAlso
|
||||
|
||||
\ccRefIdfierPage{SparseLinearAlgebraTraits_d} \\
|
||||
\ccRefIdfierPage{SparseLinearAlgebraTraits_d::Vector} \\
|
||||
|
||||
|
||||
\end{ccRefConcept}
|
||||
|
||||
% +------------------------------------------------------------------------+
|
||||
%%RefPage: end of main body, begin of footer
|
||||
% EOF
|
||||
% +------------------------------------------------------------------------+
|
||||
|
||||
|
|
@ -1,139 +0,0 @@
|
|||
% +------------------------------------------------------------------------+
|
||||
% | Reference manual page: Mean_value_coordinates_parameterizer_3.tex
|
||||
% +------------------------------------------------------------------------+
|
||||
% | 21.09.2005 Laurent Saboret, Pierre Alliez, Bruno Levy
|
||||
% | Package: Parameterization
|
||||
% |
|
||||
\RCSdef{\RCSMeanvaluecoordinatesparameterizerRev}{$Id$}
|
||||
\RCSdefDate{\RCSMeanvaluecoordinatesparameterizerDate}{$Date$}
|
||||
% |
|
||||
%%RefPage: end of header, begin of main body
|
||||
% +------------------------------------------------------------------------+
|
||||
|
||||
|
||||
\begin{ccRefClass}{Mean_value_coordinates_parameterizer_3} %% add template arg's if necessary
|
||||
|
||||
%% \ccHtmlCrossLink{} %% add further rules for cross referencing links
|
||||
%% \ccHtmlIndexC[class]{} %% add further index entries
|
||||
|
||||
|
||||
\ccDefinition
|
||||
|
||||
% The section below is automatically generated. Do not edit!
|
||||
%START-AUTO(\ccDefinition)
|
||||
|
||||
The class Mean\_value\_coordinates\_parameterizer\_3 implements Floater Mean Value Coordinates parameterization \cite{cgal:f-mvc-03}. This method is sometimes called simply {\em Floater parameterization}.
|
||||
|
||||
This is a conformal parameterization, i.e. it attempts to preserve angles.
|
||||
|
||||
1 to 1 mapping is guaranteed if the surface's border is mapped to a convex polygon.
|
||||
|
||||
As all parameterization algorithms of the package, this class is usually called via the global function parameterize().
|
||||
|
||||
This class is a Strategy \cite{cgal:ghjv-dpero-95} called by the main parameterization algorithm Fixed\_border\_parameterizer\_3::parameterize(). Mean\_value\_coordinates\_parameterizer\_3:\begin{itemize}
|
||||
\item provides default BorderParameterizer\_3 and SparseLinearAlgebraTraits\_d template parameters that make sense.\item implements compute\_w\_ij() to compute w\_ij = (i,j) coefficient of matrix A for j neighbor vertex of i based on Floater Mean Value Coordinates parameterization.\item implements an optimized version of is\_one\_to\_one\_mapping().\end{itemize}
|
||||
|
||||
%END-AUTO(\ccDefinition)
|
||||
|
||||
\ccInclude{CGAL/Mean_value_coordinates_parameterizer_3.h}
|
||||
|
||||
|
||||
\ccIsModel
|
||||
|
||||
% The section below is automatically generated. Do not edit!
|
||||
%START-AUTO(\ccIsModel)
|
||||
|
||||
Model of the ParameterizerTraits\_3 concept.
|
||||
|
||||
%END-AUTO(\ccIsModel)
|
||||
|
||||
|
||||
\ccParameters
|
||||
|
||||
The full template declaration is:
|
||||
|
||||
% The section below is automatically generated. Do not edit!
|
||||
%START-AUTO(\ccParameters)
|
||||
|
||||
template$<$ \\
|
||||
class ParameterizationMesh\_3, \\
|
||||
class BorderParameterizer\_3 = Circular\_border\_arc\_length\_parameterizer\_3$<$ParameterizationMesh\_3$>$, \\
|
||||
class SparseLinearAlgebraTraits\_d = OpenNL::DefaultLinearSolverTraits$<$typename ParameterizationMesh\_3::NT$>$$>$ \\
|
||||
class Mean\_value\_coordinates\_parameterizer\_3;
|
||||
|
||||
%END-AUTO(\ccParameters)
|
||||
|
||||
|
||||
\ccTypes
|
||||
|
||||
% The section below is automatically generated. Do not edit!
|
||||
%START-AUTO(\ccTypes)
|
||||
|
||||
|
||||
|
||||
%END-AUTO(\ccTypes)
|
||||
|
||||
|
||||
\ccCreation
|
||||
\ccCreationVariable{param} %% variable name used by \ccMethod below
|
||||
|
||||
% The section below is automatically generated. Do not edit!
|
||||
%START-AUTO(\ccCreation)
|
||||
|
||||
\ccConstructor{Mean_value_coordinates_parameterizer_3 (Border_param border_param = Border_param(), Sparse_LA sparse_la = Sparse_LA());}
|
||||
{
|
||||
Constructor.
|
||||
}
|
||||
\ccGlue
|
||||
\begin{description}
|
||||
\item[Parameters: ]
|
||||
\begin{description}
|
||||
\item[border\_param]Object that maps the surface's border to 2D space. \item[sparse\_la]Traits object to access a sparse linear system. \end{description}
|
||||
\end{description}
|
||||
\ccGlue
|
||||
|
||||
%END-AUTO(\ccCreation)
|
||||
|
||||
|
||||
\ccOperations
|
||||
|
||||
% The section below is automatically generated. Do not edit!
|
||||
%START-AUTO(\ccOperations)
|
||||
|
||||
\ccMethod{virtual NT compute_w_ij (const Adaptor & mesh, Vertex_const_handle main_vertex_v_i, Vertex_around_vertex_const_circulator neighbor_vertex_v_j);}
|
||||
{
|
||||
Compute w\_ij = (i,j) coefficient of matrix A for j neighbor vertex of i.
|
||||
}
|
||||
\ccGlue
|
||||
\ccMethod{virtual bool is_one_to_one_mapping (const Adaptor & mesh, const Matrix & A, const Vector & Bu, const Vector & Bv);}
|
||||
{
|
||||
Check if 3D -$>$ 2D mapping is 1 to 1.
|
||||
Theorem: 1 to 1 mapping is guaranteed if all w\_ij coefficients are $>$ 0 (for j vertex neighbor of i) and if the surface border is mapped onto a 2D convex polygon. Floater formula above implies that w\_ij $>$ 0 (for j vertex neighbor of i), thus mapping is guaranteed if the surface border is mapped onto a 2D convex polygon.
|
||||
}
|
||||
\ccGlue
|
||||
|
||||
%END-AUTO(\ccOperations)
|
||||
|
||||
|
||||
\ccSeeAlso
|
||||
|
||||
\ccRefIdfierPage{CGAL::Parameterizer_traits_3} \\
|
||||
\ccRefIdfierPage{CGAL::Fixed_border_parameterizer_3} \\
|
||||
\ccRefIdfierPage{CGAL::Barycentric_mapping_parameterizer_3} \\
|
||||
\ccRefIdfierPage{CGAL::Discrete_authalic_parameterizer_3} \\
|
||||
\ccRefIdfierPage{CGAL::Discrete_conformal_map_parameterizer_3} \\
|
||||
\ccRefIdfierPage{CGAL::LSCM_parameterizer_3} \\
|
||||
|
||||
|
||||
\ccExample
|
||||
|
||||
See \ccc{Simple_parameterization.C} example.
|
||||
|
||||
|
||||
\end{ccRefClass}
|
||||
|
||||
% +------------------------------------------------------------------------+
|
||||
%%RefPage: end of main body, begin of footer
|
||||
% EOF
|
||||
% +------------------------------------------------------------------------+
|
||||
|
||||
|
|
@ -1,373 +0,0 @@
|
|||
% +------------------------------------------------------------------------+
|
||||
% | Reference manual page: ParameterizationMesh_3.tex
|
||||
% +------------------------------------------------------------------------+
|
||||
% | 23.08.2005 Laurent Saboret, Pierre Alliez, Bruno Levy
|
||||
% | Package: Parameterization
|
||||
% |
|
||||
\RCSdef{\RCSMeshAdaptorRev}{$Id$}
|
||||
\RCSdefDate{\RCSMeshAdaptorDate}{$Date$}
|
||||
% |
|
||||
%%RefPage: end of header, begin of main body
|
||||
% +------------------------------------------------------------------------+
|
||||
|
||||
|
||||
\begin{ccRefConcept}{ParameterizationMesh_3}
|
||||
|
||||
%% \ccHtmlCrossLink{} %% add further rules for cross referencing links
|
||||
%% \ccHtmlIndexC[concept]{} %% add further index entries
|
||||
|
||||
|
||||
\ccDefinition
|
||||
|
||||
% The section below is automatically generated. Do not edit!
|
||||
%START-AUTO(\ccDefinition)
|
||||
|
||||
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.
|
||||
|
||||
A ParameterizationMesh\_3 surface consists of vertices, facets and an incidence relation on them. No notion of edge is requested. Vertices represent points in 3d-space. Facets are planar polygons without holes defined by the circular sequence of vertices along their border. The surface itself can have holes. The vertices along the border of a hole are called {\em border vertices}. A surface is {\em closed} if it contains no border vertices.
|
||||
|
||||
The surface must be an oriented 2-manifold with border vertices, i.e. the neighborhood of each point on the surface is either homeomorphic to a disc or to a half disc, except for vertices where many holes and surfaces with border can join.
|
||||
|
||||
ParameterizationMesh\_3 defines the types, data and methods that a mesh must implement to allow surface parameterization. Among other things, this concept defines accessors to fields specific to parameterizations methods: index, u, v, is\_parameterized.
|
||||
|
||||
ParameterizationMesh\_3 meshes can have any genus, arity or number of components. In the other hand, as parameterization methods deal only with topological disks, ParameterizationMesh\_3 defines an interface oriented towards topological disks.
|
||||
|
||||
%END-AUTO(\ccDefinition)
|
||||
|
||||
|
||||
\ccHeading{Design Pattern}
|
||||
|
||||
% The section below is automatically generated. Do not edit!
|
||||
%START-AUTO(\ccHeading{Design Pattern})
|
||||
|
||||
ParameterizationMesh\_3 is an Adaptor \cite{cgal:ghjv-dpero-95}: it changes the interface of a 3D mesh to match the interface expected by the parameterization methods.
|
||||
|
||||
%END-AUTO(\ccHeading{Design Pattern})
|
||||
|
||||
|
||||
\ccTypes
|
||||
|
||||
The following mutable handles, iterators, and circulators have appropriate
|
||||
non-mutable counterparts, i.e. \ccc{const_handle},
|
||||
\ccc{const_iterator}, and \ccc{const_circulator}. The mutable types are
|
||||
assignable to their non-mutable counterparts. Both circulators are
|
||||
assignable to the \ccc{Vertex_iterator}. The iterators are
|
||||
assignable to the respective handle types. Wherever the handles appear
|
||||
in function parameter lists, the corresponding iterators can be used as
|
||||
well.
|
||||
|
||||
% The section below is automatically generated. Do not edit!
|
||||
%START-AUTO(\ccTypes)
|
||||
|
||||
\ccNestedType{NT}
|
||||
{
|
||||
Number type to represent coordinates.
|
||||
}
|
||||
\ccGlue
|
||||
\ccNestedType{Point_2}
|
||||
{
|
||||
2D point that represents (u,v) coordinates computed by parameterization methods. Must provide X() and Y() methods.
|
||||
}
|
||||
\ccGlue
|
||||
\ccNestedType{Point_3}
|
||||
{
|
||||
3D point that represents vertices coordinates. Must provide X() and Y() methods.
|
||||
}
|
||||
\ccGlue
|
||||
\ccNestedType{Vector_2}
|
||||
{
|
||||
2D vector. Must provide X() and Y() methods.
|
||||
}
|
||||
\ccGlue
|
||||
\ccNestedType{Vector_3}
|
||||
{
|
||||
3D vector. Must provide X() and Y() methods.
|
||||
}
|
||||
\ccGlue
|
||||
\ccNestedType{Facet}
|
||||
{
|
||||
Opaque type representing a facet of the 3D mesh. No methods are expected.
|
||||
}
|
||||
\ccGlue
|
||||
\ccNestedType{Facet_handle}
|
||||
{
|
||||
Handle to a facet. Model of the Handle concept.
|
||||
}
|
||||
\ccGlue
|
||||
\ccNestedType{Facet_const_handle}
|
||||
{
|
||||
}
|
||||
\ccGlue
|
||||
\ccNestedType{Facet_iterator}
|
||||
{
|
||||
Iterator over all mesh facets. Model of the ForwardIterator concept.
|
||||
}
|
||||
\ccGlue
|
||||
\ccNestedType{Facet_const_iterator}
|
||||
{
|
||||
}
|
||||
\ccGlue
|
||||
\ccNestedType{Vertex}
|
||||
{
|
||||
Opaque type representing a vertex of the 3D mesh. No methods are expected.
|
||||
}
|
||||
\ccGlue
|
||||
\ccNestedType{Vertex_handle}
|
||||
{
|
||||
Handle to a vertex. Model of the Handle concept.
|
||||
}
|
||||
\ccGlue
|
||||
\ccNestedType{Vertex_const_handle}
|
||||
{
|
||||
}
|
||||
\ccGlue
|
||||
\ccNestedType{Vertex_iterator}
|
||||
{
|
||||
Iterator over all vertices of a mesh. Model of the ForwardIterator concept.
|
||||
}
|
||||
\ccGlue
|
||||
\ccNestedType{Vertex_const_iterator}
|
||||
{
|
||||
}
|
||||
\ccGlue
|
||||
\ccNestedType{Border_vertex_iterator}
|
||||
{
|
||||
Iterator over vertices of the mesh {\em main border}. Model of the ForwardIterator concept.
|
||||
}
|
||||
\ccGlue
|
||||
\ccNestedType{Border_vertex_const_iterator}
|
||||
{
|
||||
}
|
||||
\ccGlue
|
||||
\ccNestedType{Vertex_around_facet_circulator}
|
||||
{
|
||||
Counter-clockwise circulator over a facet's vertices. Model of the BidirectionalCirculator concept.
|
||||
}
|
||||
\ccGlue
|
||||
\ccNestedType{Vertex_around_facet_const_circulator}
|
||||
{
|
||||
}
|
||||
\ccGlue
|
||||
\ccNestedType{Vertex_around_vertex_circulator}
|
||||
{
|
||||
Clockwise circulator over the vertices incident to a vertex. Model of the BidirectionalCirculator concept.
|
||||
}
|
||||
\ccGlue
|
||||
\ccNestedType{Vertex_around_vertex_const_circulator}
|
||||
{
|
||||
}
|
||||
\ccGlue
|
||||
|
||||
%END-AUTO(\ccTypes)
|
||||
|
||||
|
||||
\ccCreation
|
||||
\ccCreationVariable{mesh} %% define variable name used by \ccMethod below
|
||||
|
||||
Construction and destruction are undefined.
|
||||
|
||||
% The section below is automatically generated. Do not edit!
|
||||
%START-AUTO(\ccCreation)
|
||||
|
||||
|
||||
|
||||
%END-AUTO(\ccCreation)
|
||||
|
||||
|
||||
\ccOperations
|
||||
|
||||
The following mutable methods returning a handle, iterator, or circulator have appropriate
|
||||
non-mutable counterpart methods, i.e. \ccc{const}, returning a \ccc{const_handle},
|
||||
\ccc{const_iterator}, or \ccc{const_circulator}.
|
||||
|
||||
% The section below is automatically generated. Do not edit!
|
||||
%START-AUTO(\ccOperations)
|
||||
|
||||
\ccMethod{Vertex_iterator mesh_vertices_begin ();}
|
||||
{
|
||||
Get iterator over first vertex of mesh.
|
||||
}
|
||||
\ccGlue
|
||||
\ccMethod{Vertex_const_iterator mesh_vertices_begin () const;}
|
||||
{
|
||||
}
|
||||
\ccGlue
|
||||
\ccMethod{Vertex_iterator mesh_vertices_end ();}
|
||||
{
|
||||
Get iterator over past-the-end vertex of mesh.
|
||||
}
|
||||
\ccGlue
|
||||
\ccMethod{Vertex_const_iterator mesh_vertices_end () const;}
|
||||
{
|
||||
}
|
||||
\ccGlue
|
||||
\ccMethod{int count_mesh_vertices () const;}
|
||||
{
|
||||
Count the number of vertices of the mesh.
|
||||
}
|
||||
\ccGlue
|
||||
\ccMethod{void index_mesh_vertices ();}
|
||||
{
|
||||
Index vertices of the mesh from 0 to count\_mesh\_vertices()-1.
|
||||
}
|
||||
\ccGlue
|
||||
\ccMethod{Border_vertex_iterator mesh_main_border_vertices_begin ();}
|
||||
{
|
||||
Get iterator over first vertex of mesh's {\em main border}.
|
||||
}
|
||||
\ccGlue
|
||||
\ccMethod{Border_vertex_const_iterator mesh_main_border_vertices_begin () const;}
|
||||
{
|
||||
}
|
||||
\ccGlue
|
||||
\ccMethod{Border_vertex_iterator mesh_main_border_vertices_end ();}
|
||||
{
|
||||
Get iterator over past-the-end vertex of mesh's {\em main border}.
|
||||
}
|
||||
\ccGlue
|
||||
\ccMethod{Border_vertex_const_iterator mesh_main_border_vertices_end () const;}
|
||||
{
|
||||
}
|
||||
\ccGlue
|
||||
\ccMethod{std::list<Vertex_handle> get_border (Vertex_handle seed_vertex);}
|
||||
{
|
||||
Return the border containing seed\_vertex. Return an empty list if not found.
|
||||
}
|
||||
\ccGlue
|
||||
\ccMethod{Facet_iterator mesh_facets_begin ();}
|
||||
{
|
||||
Get iterator over first facet of mesh.
|
||||
}
|
||||
\ccGlue
|
||||
\ccMethod{Facet_const_iterator mesh_facets_begin () const;}
|
||||
{
|
||||
}
|
||||
\ccGlue
|
||||
\ccMethod{Facet_iterator mesh_facets_end ();}
|
||||
{
|
||||
Get iterator over past-the-end facet of mesh.
|
||||
}
|
||||
\ccGlue
|
||||
\ccMethod{Facet_const_iterator mesh_facets_end () const;}
|
||||
{
|
||||
}
|
||||
\ccGlue
|
||||
\ccMethod{int count_mesh_facets () const;}
|
||||
{
|
||||
Count the number of facets of the mesh.
|
||||
}
|
||||
\ccGlue
|
||||
\ccMethod{bool is_mesh_triangular () const;}
|
||||
{
|
||||
Return true of all mesh's facets are triangles.
|
||||
}
|
||||
\ccGlue
|
||||
\ccMethod{int count_mesh_halfedges () const;}
|
||||
{
|
||||
Count the number of halfedges of the mesh.
|
||||
}
|
||||
\ccGlue
|
||||
\ccMethod{Vertex_around_facet_circulator facet_vertices_begin (Facet_handle facet);}
|
||||
{
|
||||
Get circulator over facet's vertices.
|
||||
}
|
||||
\ccGlue
|
||||
\ccMethod{Vertex_around_facet_const_circulator facet_vertices_begin (Facet_const_handle facet) const;}
|
||||
{
|
||||
}
|
||||
\ccGlue
|
||||
\ccMethod{int count_facet_vertices (Facet_const_handle facet) const;}
|
||||
{
|
||||
Count the number of vertices of a facet.
|
||||
}
|
||||
\ccGlue
|
||||
\ccMethod{Point_3 get_vertex_position (Vertex_const_handle vertex) const;}
|
||||
{
|
||||
Get the 3D position of a vertex.
|
||||
}
|
||||
\ccGlue
|
||||
\ccMethod{Point_2 get_vertex_uv (Vertex_const_handle vertex) const;}
|
||||
{
|
||||
Get/set the 2D position (u/v pair) of a vertex. Default value is undefined.
|
||||
}
|
||||
\ccGlue
|
||||
\ccMethod{void set_vertex_uv (Vertex_handle vertex, const Point_2 & uv);}
|
||||
{
|
||||
}
|
||||
\ccGlue
|
||||
\ccMethod{bool is_vertex_parameterized (Vertex_const_handle vertex) const;}
|
||||
{
|
||||
Get/set {\em is parameterized} field of vertex. Default value is undefined.
|
||||
}
|
||||
\ccGlue
|
||||
\ccMethod{void set_vertex_parameterized (Vertex_handle vertex, bool parameterized);}
|
||||
{
|
||||
}
|
||||
\ccGlue
|
||||
\ccMethod{int get_vertex_index (Vertex_const_handle vertex) const;}
|
||||
{
|
||||
Get/set vertex index. Default value is undefined.
|
||||
}
|
||||
\ccGlue
|
||||
\ccMethod{void set_vertex_index (Vertex_handle vertex, int index);}
|
||||
{
|
||||
}
|
||||
\ccGlue
|
||||
\ccMethod{int get_vertex_tag (Vertex_const_handle vertex) const;}
|
||||
{
|
||||
Get/set vertex' all purpose tag. Default value is undefined.
|
||||
}
|
||||
\ccGlue
|
||||
\ccMethod{void set_vertex_tag (Vertex_handle vertex, int tag);}
|
||||
{
|
||||
}
|
||||
\ccGlue
|
||||
\ccMethod{bool is_vertex_on_border (Vertex_const_handle vertex) const;}
|
||||
{
|
||||
Return true if a vertex belongs to ANY mesh's border.
|
||||
}
|
||||
\ccGlue
|
||||
\ccMethod{bool is_vertex_on_main_border (Vertex_const_handle vertex) const;}
|
||||
{
|
||||
Return true if a vertex belongs to the UNIQUE mesh's main border.
|
||||
}
|
||||
\ccGlue
|
||||
\ccMethod{Vertex_around_vertex_circulator vertices_around_vertex_begin (Vertex_handle vertex, Vertex_handle start_position = Vertex_handle());}
|
||||
{
|
||||
Get circulator over the vertices incident to 'vertex'. 'start\_position' defines the optional initial position of the circulator.
|
||||
}
|
||||
\ccGlue
|
||||
\ccMethod{Vertex_around_vertex_const_circulator vertices_around_vertex_begin (Vertex_const_handle vertex, Vertex_const_handle start_position = Vertex_const_handle()) const;}
|
||||
{
|
||||
}
|
||||
\ccGlue
|
||||
|
||||
%END-AUTO(\ccOperations)
|
||||
|
||||
|
||||
\ccHasModels
|
||||
|
||||
% The section below is automatically generated. Do not edit!
|
||||
%START-AUTO(\ccHasModels)
|
||||
|
||||
\begin{itemize}
|
||||
\item Adaptators for Polyhedron\_3 and TDS\_2 with 3D points are provided.\item Parameterization\_mesh\_patch\_3$<$M$>$ is a model of ParameterizationMesh\_3 if M is a model of MeshAdaptorWithStream\_3.\end{itemize}
|
||||
|
||||
%END-AUTO(\ccHasModels)
|
||||
|
||||
\ccRefIdfierPage{CGAL::Parameterization_polyhedron_adaptor_3} \\
|
||||
\ccRefIdfierPage{CGAL::Parameterization_mesh_patch_3} \\
|
||||
|
||||
|
||||
\ccSeeAlso
|
||||
|
||||
\ccRefIdfierPage{ParameterizationPatchableMesh_3}
|
||||
|
||||
|
||||
\end{ccRefConcept}
|
||||
|
||||
% +------------------------------------------------------------------------+
|
||||
%%RefPage: end of main body, begin of footer
|
||||
% EOF
|
||||
% +------------------------------------------------------------------------+
|
||||
|
||||
|
|
@ -1,170 +0,0 @@
|
|||
% +------------------------------------------------------------------------+
|
||||
% | Reference manual page: ParameterizationPatchableMesh_3.tex
|
||||
% +------------------------------------------------------------------------+
|
||||
% | 29.08.2005 Laurent Saboret, Pierre Alliez, Bruno Levy
|
||||
% | Package: Parameterization
|
||||
% |
|
||||
\RCSdef{\RCSPatchableMeshAdaptorRev}{$Id$}
|
||||
\RCSdefDate{\RCSPatchableMeshAdaptorDate}{$Date$}
|
||||
% |
|
||||
%%RefPage: end of header, begin of main body
|
||||
% +------------------------------------------------------------------------+
|
||||
|
||||
|
||||
\begin{ccRefConcept}{ParameterizationPatchableMesh_3}
|
||||
|
||||
%% \ccHtmlCrossLink{} %% add further rules for cross referencing links
|
||||
%% \ccHtmlIndexC[concept]{} %% add further index entries
|
||||
|
||||
|
||||
\ccDefinition
|
||||
|
||||
% The section below is automatically generated. Do not edit!
|
||||
%START-AUTO(\ccDefinition)
|
||||
|
||||
ParameterizationPatchableMesh\_3 inherits from concept ParameterizationMesh\_3, thus is a concept of a 3D surface mesh.
|
||||
|
||||
ParameterizationPatchableMesh\_3 adds the ability to support patches and virtual seams. Patches are a subset of a 3D mesh. Virtual seams are the ability to behave exactly as if the surface was {\em cut} following a certain path.
|
||||
|
||||
This mainly means that:\begin{itemize}
|
||||
\item vertices can be tagged as inside or outside the patch to parameterize.\item the fields specific to parameterizations (index, u, v, is\_parameterized) can be set per {\em corner} (aka half-edge).\end{itemize}
|
||||
|
||||
|
||||
The main purpose of this feature is to allow the parameterization package to parameterize any 3D surface by decomposing it as a list of topological disks.
|
||||
|
||||
%END-AUTO(\ccDefinition)
|
||||
|
||||
|
||||
\ccHeading{Design Pattern}
|
||||
|
||||
% The section below is automatically generated. Do not edit!
|
||||
%START-AUTO(\ccHeading{Design Pattern})
|
||||
|
||||
ParameterizationPatchableMesh\_3 is an Adaptor \cite{cgal:ghjv-dpero-95}: it changes the interface of a 3D mesh to match the interface expected by class Parameterization\_mesh\_patch\_3.
|
||||
|
||||
%END-AUTO(\ccHeading{Design Pattern})
|
||||
|
||||
|
||||
\ccRefines
|
||||
|
||||
% The section below is automatically generated. Do not edit!
|
||||
%START-AUTO(\ccRefines)
|
||||
|
||||
ParameterizationPatchableMesh\_3 inherits from concept ParameterizationMesh\_3.
|
||||
|
||||
%END-AUTO(\ccRefines)
|
||||
|
||||
In addition to the requirements described in the concept MeshAdaptor\_3,
|
||||
PatchableMeshAdaptor\_3 provides the following:
|
||||
|
||||
|
||||
\ccTypes
|
||||
|
||||
% The section below is automatically generated. Do not edit!
|
||||
%START-AUTO(\ccTypes)
|
||||
|
||||
|
||||
|
||||
%END-AUTO(\ccTypes)
|
||||
|
||||
|
||||
\ccCreation
|
||||
\ccCreationVariable{mesh} %% define variable name used by \ccMethod below
|
||||
|
||||
Construction and destruction are undefined.
|
||||
|
||||
% The section below is automatically generated. Do not edit!
|
||||
%START-AUTO(\ccCreation)
|
||||
|
||||
|
||||
|
||||
%END-AUTO(\ccCreation)
|
||||
|
||||
|
||||
\ccOperations
|
||||
|
||||
% The section below is automatically generated. Do not edit!
|
||||
%START-AUTO(\ccOperations)
|
||||
|
||||
\ccMethod{int get_vertex_seaming (Vertex_const_handle vertex) const;}
|
||||
{
|
||||
Get/set vertex seaming flag. Default value is undefined.
|
||||
}
|
||||
\ccGlue
|
||||
\ccMethod{void set_vertex_seaming (Vertex_handle vertex, int seaming);}
|
||||
{
|
||||
}
|
||||
\ccGlue
|
||||
\ccMethod{int get_halfedge_seaming (Vertex_const_handle source, Vertex_const_handle target) const;}
|
||||
{
|
||||
Get/set oriented edge's seaming flag, ie position of the oriented edge wrt to the UNIQUE main border.
|
||||
}
|
||||
\ccGlue
|
||||
\ccMethod{void set_halfedge_seaming (Vertex_handle source, Vertex_handle target, int seaming);}
|
||||
{
|
||||
}
|
||||
\ccGlue
|
||||
\ccMethod{Point_2 get_corners_uv (Vertex_const_handle vertex, Vertex_const_handle prev_vertex, Vertex_const_handle next_vertex) const;}
|
||||
{
|
||||
Get/set the 2D position (= (u,v) pair) of corners at the {\em right} of the prev\_vertex -$>$ vertex -$>$ next\_vertex line. Default value is undefined.
|
||||
}
|
||||
\ccGlue
|
||||
\ccMethod{void set_corners_uv (Vertex_handle vertex, Vertex_const_handle prev_vertex, Vertex_const_handle next_vertex, const Point_2 & uv);}
|
||||
{
|
||||
}
|
||||
\ccGlue
|
||||
\ccMethod{bool are_corners_parameterized (Vertex_const_handle vertex, Vertex_const_handle prev_vertex, Vertex_const_handle next_vertex) const;}
|
||||
{
|
||||
Get/set {\em is parameterized} field of corners at the {\em right} of the prev\_vertex -$>$ vertex -$>$ next\_vertex line. Default value is undefined.
|
||||
}
|
||||
\ccGlue
|
||||
\ccMethod{void set_corners_parameterized (Vertex_handle vertex, Vertex_const_handle prev_vertex, Vertex_const_handle next_vertex, bool parameterized);}
|
||||
{
|
||||
}
|
||||
\ccGlue
|
||||
\ccMethod{int get_corners_index (Vertex_const_handle vertex, Vertex_const_handle prev_vertex, Vertex_const_handle next_vertex) const;}
|
||||
{
|
||||
Get/set index of corners at the {\em right} of the prev\_vertex -$>$ vertex -$>$ next\_vertex line. Default value is undefined.
|
||||
}
|
||||
\ccGlue
|
||||
\ccMethod{void set_corners_index (Vertex_handle vertex, Vertex_const_handle prev_vertex, Vertex_const_handle next_vertex, int index);}
|
||||
{
|
||||
}
|
||||
\ccGlue
|
||||
\ccMethod{int get_corners_tag (Vertex_const_handle vertex, Vertex_const_handle prev_vertex, Vertex_const_handle next_vertex) const;}
|
||||
{
|
||||
Get/set all purpose tag of corners at the {\em right} of the prev\_vertex -$>$ vertex -$>$ next\_vertex line. Default value is undefined.
|
||||
}
|
||||
\ccGlue
|
||||
\ccMethod{void set_corners_tag (Vertex_handle vertex, Vertex_const_handle prev_vertex, Vertex_const_handle next_vertex, int tag);}
|
||||
{
|
||||
}
|
||||
\ccGlue
|
||||
|
||||
%END-AUTO(\ccOperations)
|
||||
|
||||
|
||||
\ccHasModels
|
||||
|
||||
% The section below is automatically generated. Do not edit!
|
||||
%START-AUTO(\ccHasModels)
|
||||
|
||||
Adaptators for Polyhedron\_3 and TDS\_2 with 3D points are provided.
|
||||
|
||||
%END-AUTO(\ccHasModels)
|
||||
|
||||
\ccRefIdfierPage{CGAL::Parameterization_polyhedron_adaptor_3} \\
|
||||
|
||||
|
||||
\ccSeeAlso
|
||||
|
||||
\ccRefIdfierPage{ParameterizationMesh_3}
|
||||
|
||||
|
||||
\end{ccRefConcept}
|
||||
|
||||
% +------------------------------------------------------------------------+
|
||||
%%RefPage: end of main body, begin of footer
|
||||
% EOF
|
||||
% +------------------------------------------------------------------------+
|
||||
|
||||
|
|
@ -1,136 +0,0 @@
|
|||
% +------------------------------------------------------------------------+
|
||||
% | Reference manual page: Parameterization_mesh_feature_extractor.tex
|
||||
% +------------------------------------------------------------------------+
|
||||
% | 21.09.2005 Laurent Saboret, Pierre Alliez, Bruno Levy
|
||||
% | Package: Parameterization
|
||||
% |
|
||||
\RCSdef{\RCSMeshadaptorfeatureextractorRev}{$Id$}
|
||||
\RCSdefDate{\RCSMeshadaptorfeatureextractorDate}{$Date$}
|
||||
% |
|
||||
%%RefPage: end of header, begin of main body
|
||||
% +------------------------------------------------------------------------+
|
||||
|
||||
|
||||
\begin{ccRefClass}{Parameterization_mesh_feature_extractor} %% add template arg's if necessary
|
||||
|
||||
%% \ccHtmlCrossLink{} %% add further rules for cross referencing links
|
||||
%% \ccHtmlIndexC[class]{} %% add further index entries
|
||||
|
||||
|
||||
\ccDefinition
|
||||
|
||||
% The section below is automatically generated. Do not edit!
|
||||
%START-AUTO(\ccDefinition)
|
||||
|
||||
The class Parameterization\_mesh\_feature\_extractor computes features (genus, borders, ...) of a 3D surface, model of the ParameterizationMesh\_3 concept.
|
||||
|
||||
%END-AUTO(\ccDefinition)
|
||||
|
||||
\ccInclude{CGAL/Parameterization_mesh_feature_extractor.h}
|
||||
|
||||
|
||||
\ccParameters
|
||||
|
||||
The full template declaration is:
|
||||
|
||||
% The section below is automatically generated. Do not edit!
|
||||
%START-AUTO(\ccParameters)
|
||||
|
||||
template$<$ \\
|
||||
class ParameterizationMesh\_3$>$ \\
|
||||
class Parameterization\_mesh\_feature\_extractor;
|
||||
|
||||
%END-AUTO(\ccParameters)
|
||||
|
||||
|
||||
\ccTypes
|
||||
|
||||
% The section below is automatically generated. Do not edit!
|
||||
%START-AUTO(\ccTypes)
|
||||
|
||||
\ccNestedType{Adaptor}
|
||||
{
|
||||
Export ParameterizationMesh\_3 template parameter.
|
||||
}
|
||||
\ccGlue
|
||||
\ccNestedType{Border}
|
||||
{
|
||||
Type representing a border = STL container of vertex handles.
|
||||
}
|
||||
\ccGlue
|
||||
\ccNestedType{Skeleton}
|
||||
{
|
||||
Type representing the list of all borders of the mesh = STL container of Border elements.
|
||||
}
|
||||
\ccGlue
|
||||
|
||||
%END-AUTO(\ccTypes)
|
||||
|
||||
|
||||
\ccCreation
|
||||
\ccCreationVariable{extractor} %% choose variable name for \ccMethod
|
||||
|
||||
% The section below is automatically generated. Do not edit!
|
||||
%START-AUTO(\ccCreation)
|
||||
|
||||
\ccConstructor{Parameterization_mesh_feature_extractor (Adaptor * mesh);}
|
||||
{
|
||||
Constructor.
|
||||
CAUTION: This class caches the result of feature extractions =$>$ The caller must NOT modify 'mesh' during the Parameterization\_mesh\_feature\_extractor life cycle.
|
||||
}
|
||||
\ccGlue
|
||||
|
||||
%END-AUTO(\ccCreation)
|
||||
|
||||
|
||||
\ccOperations
|
||||
|
||||
% The section below is automatically generated. Do not edit!
|
||||
%START-AUTO(\ccOperations)
|
||||
|
||||
\ccMethod{int get_nb_borders ();}
|
||||
{
|
||||
Get number of borders.
|
||||
}
|
||||
\ccGlue
|
||||
\ccMethod{const Skeleton& get_borders ();}
|
||||
{
|
||||
Get extracted borders. The longest border is the first one.
|
||||
}
|
||||
\ccGlue
|
||||
\ccMethod{const Border* get_longest_border ();}
|
||||
{
|
||||
Get longest border.
|
||||
}
|
||||
\ccGlue
|
||||
\ccMethod{int get_nb_connex_components ();}
|
||||
{
|
||||
Get \# of connected components.
|
||||
}
|
||||
\ccGlue
|
||||
\ccMethod{int get_genus ();}
|
||||
{
|
||||
Get the genus.
|
||||
}
|
||||
\ccGlue
|
||||
|
||||
%END-AUTO(\ccOperations)
|
||||
|
||||
|
||||
\ccSeeAlso
|
||||
|
||||
\ccRefIdfierPage{ParameterizationMesh_3} \\
|
||||
|
||||
|
||||
\ccExample
|
||||
|
||||
See \ccc{Mesh_cutting_parameterization.C} example.
|
||||
|
||||
|
||||
\end{ccRefClass}
|
||||
|
||||
% +------------------------------------------------------------------------+
|
||||
%%RefPage: end of main body, begin of footer
|
||||
% EOF
|
||||
% +------------------------------------------------------------------------+
|
||||
|
||||
|
|
@ -1,402 +0,0 @@
|
|||
% +------------------------------------------------------------------------+
|
||||
% | Reference manual page: Parameterization_mesh_patch_3.tex
|
||||
% +------------------------------------------------------------------------+
|
||||
% | 21.09.2005 Laurent Saboret, Pierre Alliez, Bruno Levy
|
||||
% | Package: Parameterization
|
||||
% |
|
||||
\RCSdef{\RCSMeshadaptorpatchRev}{$Id$}
|
||||
\RCSdefDate{\RCSMeshadaptorpatchDate}{$Date$}
|
||||
% |
|
||||
%%RefPage: end of header, begin of main body
|
||||
% +------------------------------------------------------------------------+
|
||||
|
||||
|
||||
\begin{ccRefClass}{Parameterization_mesh_patch_3} %% add template arg's if necessary
|
||||
|
||||
%% \ccHtmlCrossLink{} %% add further rules for cross referencing links
|
||||
%% \ccHtmlIndexC[class]{} %% add further index entries
|
||||
|
||||
|
||||
\ccDefinition
|
||||
|
||||
% The section below is automatically generated. Do not edit!
|
||||
%START-AUTO(\ccDefinition)
|
||||
|
||||
Parameterization\_mesh\_patch\_3 is a Decorator class to virtually {\em cut} a patch in a ParameterizationPatchableMesh\_3 3D surface. Only the patch is exported, making the 3D surface look like a topological disk.
|
||||
|
||||
The input mesh can be of any genus, but it has to come with a {\em seam} that describes the border of a topological disc. This border may be an actual border of the mesh or a virtual border.
|
||||
|
||||
%END-AUTO(\ccDefinition)
|
||||
|
||||
\ccInclude{CGAL/Parameterization_mesh_patch_3.h}
|
||||
|
||||
|
||||
\ccIsModel
|
||||
|
||||
% The section below is automatically generated. Do not edit!
|
||||
%START-AUTO(\ccIsModel)
|
||||
|
||||
Model of ParameterizationMesh\_3 concept, whose purpose is to allow the parameterization package to access meshes in a uniform manner.
|
||||
|
||||
%END-AUTO(\ccIsModel)
|
||||
|
||||
|
||||
\ccHeading{Design Pattern}
|
||||
|
||||
% The section below is automatically generated. Do not edit!
|
||||
%START-AUTO(\ccHeading{Design Pattern})
|
||||
|
||||
Parameterization\_mesh\_patch\_3 is a Decorator \cite{cgal:ghjv-dpero-95}: it changes the behavior of a ParameterizationPatchableMesh\_3 3D surface while keeping its ParameterizationMesh\_3 interface.
|
||||
|
||||
%END-AUTO(\ccHeading{Design Pattern})
|
||||
|
||||
|
||||
\ccParameters
|
||||
|
||||
The full template declaration is:
|
||||
|
||||
% The section below is automatically generated. Do not edit!
|
||||
%START-AUTO(\ccParameters)
|
||||
|
||||
template$<$ \\
|
||||
class ParameterizationPatchableMesh\_3$>$ \\
|
||||
class Parameterization\_mesh\_patch\_3;
|
||||
|
||||
%END-AUTO(\ccParameters)
|
||||
|
||||
|
||||
\ccTypes
|
||||
|
||||
The following mutable handles, iterators, and circulators have appropriate
|
||||
non-mutable counterparts, i.e. \ccc{const_handle},
|
||||
\ccc{const_iterator}, and \ccc{const_circulator}. The mutable types are
|
||||
assignable to their non-mutable counterparts. Both circulators are
|
||||
assignable to the \ccc{Vertex_iterator}. The iterators are
|
||||
assignable to the respective handle types. Wherever the handles appear
|
||||
in function parameter lists, the corresponding iterators can be used as
|
||||
well.
|
||||
|
||||
% The section below is automatically generated. Do not edit!
|
||||
%START-AUTO(\ccTypes)
|
||||
|
||||
\ccNestedType{Adaptor}
|
||||
{
|
||||
Export template parameter.
|
||||
}
|
||||
\ccGlue
|
||||
\ccNestedType{NT}
|
||||
{
|
||||
Number type to represent coordinates.
|
||||
}
|
||||
\ccGlue
|
||||
\ccNestedType{Point_2}
|
||||
{
|
||||
2D point that represents (u,v) coordinates computed by parameterization methods. Must provide X() and Y() methods.
|
||||
}
|
||||
\ccGlue
|
||||
\ccNestedType{Point_3}
|
||||
{
|
||||
3D point that represents vertices coordinates. Must provide X() and Y() methods.
|
||||
}
|
||||
\ccGlue
|
||||
\ccNestedType{Vector_2}
|
||||
{
|
||||
2D vector. Must provide X() and Y() methods.
|
||||
}
|
||||
\ccGlue
|
||||
\ccNestedType{Vector_3}
|
||||
{
|
||||
3D vector. Must provide X() and Y() methods.
|
||||
}
|
||||
\ccGlue
|
||||
\ccNestedType{Facet}
|
||||
{
|
||||
Opaque type representing a facet of the 3D mesh. No methods are expected.
|
||||
}
|
||||
\ccGlue
|
||||
\ccNestedType{Facet_handle}
|
||||
{
|
||||
Handle to a facet. Model of the Handle concept.
|
||||
}
|
||||
\ccGlue
|
||||
\ccNestedType{Facet_const_handle}
|
||||
{
|
||||
}
|
||||
\ccGlue
|
||||
\ccNestedType{Facet_iterator}
|
||||
{
|
||||
Iterator over all mesh facets. Model of the ForwardIterator concept.
|
||||
}
|
||||
\ccGlue
|
||||
\ccNestedType{Facet_const_iterator}
|
||||
{
|
||||
}
|
||||
\ccGlue
|
||||
\ccNestedType{Vertex}
|
||||
{
|
||||
Opaque type representing a vertex of the 3D mesh. No methods are expected.
|
||||
}
|
||||
\ccGlue
|
||||
\ccNestedType{Vertex_handle}
|
||||
{
|
||||
Handle to a vertex. Model of the Handle concept.
|
||||
}
|
||||
\ccGlue
|
||||
\ccNestedType{Vertex_const_handle}
|
||||
{
|
||||
}
|
||||
\ccGlue
|
||||
\ccNestedType{Vertex_iterator}
|
||||
{
|
||||
Iterator over all vertices of a mesh. Model of the ForwardIterator concept.
|
||||
}
|
||||
\ccGlue
|
||||
\ccNestedType{Vertex_const_iterator}
|
||||
{
|
||||
}
|
||||
\ccGlue
|
||||
\ccNestedType{Border_vertex_iterator}
|
||||
{
|
||||
Iterator over vertices of the mesh {\em main border}. Model of the ForwardIterator concept.
|
||||
}
|
||||
\ccGlue
|
||||
\ccNestedType{Border_vertex_const_iterator}
|
||||
{
|
||||
}
|
||||
\ccGlue
|
||||
\ccNestedType{Vertex_around_facet_circulator}
|
||||
{
|
||||
Counter-clockwise circulator over a facet's vertices. Model of the BidirectionalCirculator concept.
|
||||
}
|
||||
\ccGlue
|
||||
\ccNestedType{Vertex_around_facet_const_circulator}
|
||||
{
|
||||
}
|
||||
\ccGlue
|
||||
\ccNestedType{Vertex_around_vertex_circulator}
|
||||
{
|
||||
Clockwise circulator over the vertices incident to a vertex. Model of the BidirectionalCirculator concept.
|
||||
}
|
||||
\ccGlue
|
||||
\ccNestedType{Vertex_around_vertex_const_circulator}
|
||||
{
|
||||
}
|
||||
\ccGlue
|
||||
|
||||
%END-AUTO(\ccTypes)
|
||||
|
||||
|
||||
\ccCreation
|
||||
\ccCreationVariable{mesh} %% define variable name used by \ccMethod below
|
||||
|
||||
% The section below is automatically generated. Do not edit!
|
||||
%START-AUTO(\ccCreation)
|
||||
|
||||
\ccConstructor{Parameterization_mesh_patch_3 (Adaptor * mesh, InputIterator first_seam_vertex, InputIterator end_seam_vertex);}
|
||||
{
|
||||
Create a Decorator for an existing ParameterizationPatchableMesh\_3 mesh. The input mesh can be of any genus, but it has to come with a {\em seam} that describes the border of a topological disc. This border may be an actual border of the mesh or a virtual border.
|
||||
Preconditions:\begin{itemize}
|
||||
\item first\_seam\_vertex -$>$ end\_seam\_vertex defines the outer seam, ie Parameterization\_mesh\_patch\_3 will export the {\em right} of the seam.\item the {\em seam} is given as a container of Adaptor::Vertex\_handle elements. \end{itemize}
|
||||
}
|
||||
\ccGlue
|
||||
|
||||
%END-AUTO(\ccCreation)
|
||||
|
||||
|
||||
\ccOperations
|
||||
|
||||
The following methods returning a mutable handle, iterator, or circulator have appropriate
|
||||
non-mutable counterpart methods, i.e. \ccc{const}, returning a \ccc{const_handle},
|
||||
\ccc{const_iterator}, or \ccc{const_circulator}.
|
||||
|
||||
% The section below is automatically generated. Do not edit!
|
||||
%START-AUTO(\ccOperations)
|
||||
|
||||
\ccMethod{Adaptor* get_decorated_mesh ();}
|
||||
{
|
||||
Get the decorated mesh.
|
||||
}
|
||||
\ccGlue
|
||||
\ccMethod{const Adaptor* get_decorated_mesh () const;}
|
||||
{
|
||||
}
|
||||
\ccGlue
|
||||
\ccMethod{Vertex_iterator mesh_vertices_begin ();}
|
||||
{
|
||||
Get iterator over first vertex of mesh.
|
||||
}
|
||||
\ccGlue
|
||||
\ccMethod{Vertex_const_iterator mesh_vertices_begin () const;}
|
||||
{
|
||||
}
|
||||
\ccGlue
|
||||
\ccMethod{Vertex_iterator mesh_vertices_end ();}
|
||||
{
|
||||
Get iterator over past-the-end vertex of mesh.
|
||||
}
|
||||
\ccGlue
|
||||
\ccMethod{Vertex_const_iterator mesh_vertices_end () const;}
|
||||
{
|
||||
}
|
||||
\ccGlue
|
||||
\ccMethod{int count_mesh_vertices () const;}
|
||||
{
|
||||
Count the number of vertices of the mesh.
|
||||
}
|
||||
\ccGlue
|
||||
\ccMethod{void index_mesh_vertices ();}
|
||||
{
|
||||
Index vertices of the mesh from 0 to count\_mesh\_vertices()-1.
|
||||
}
|
||||
\ccGlue
|
||||
\ccMethod{Border_vertex_iterator mesh_main_border_vertices_begin ();}
|
||||
{
|
||||
Get iterator over first vertex of mesh's main border (aka {\em seam}).
|
||||
}
|
||||
\ccGlue
|
||||
\ccMethod{Border_vertex_const_iterator mesh_main_border_vertices_begin () const;}
|
||||
{
|
||||
}
|
||||
\ccGlue
|
||||
\ccMethod{Border_vertex_iterator mesh_main_border_vertices_end ();}
|
||||
{
|
||||
Get iterator over past-the-end vertex of mesh's main border (aka {\em seam}).
|
||||
}
|
||||
\ccGlue
|
||||
\ccMethod{Border_vertex_const_iterator mesh_main_border_vertices_end () const;}
|
||||
{
|
||||
}
|
||||
\ccGlue
|
||||
\ccMethod{std::list<Vertex_handle> get_border (Vertex_handle seed_vertex);}
|
||||
{
|
||||
Return the border containing seed\_vertex. Return an empty list if not found.
|
||||
}
|
||||
\ccGlue
|
||||
\ccMethod{Facet_iterator mesh_facets_begin ();}
|
||||
{
|
||||
Get iterator over first facet of mesh.
|
||||
}
|
||||
\ccGlue
|
||||
\ccMethod{Facet_const_iterator mesh_facets_begin () const;}
|
||||
{
|
||||
}
|
||||
\ccGlue
|
||||
\ccMethod{Facet_iterator mesh_facets_end ();}
|
||||
{
|
||||
Get iterator over past-the-end facet of mesh.
|
||||
}
|
||||
\ccGlue
|
||||
\ccMethod{Facet_const_iterator mesh_facets_end () const;}
|
||||
{
|
||||
}
|
||||
\ccGlue
|
||||
\ccMethod{int count_mesh_facets () const;}
|
||||
{
|
||||
Count the number of facets of the mesh.
|
||||
}
|
||||
\ccGlue
|
||||
\ccMethod{bool is_mesh_triangular () const;}
|
||||
{
|
||||
Return true of all mesh's facets are triangles.
|
||||
}
|
||||
\ccGlue
|
||||
\ccMethod{int count_mesh_halfedges () const;}
|
||||
{
|
||||
Count the number of halfedges of the mesh.
|
||||
}
|
||||
\ccGlue
|
||||
\ccMethod{Vertex_around_facet_circulator facet_vertices_begin (Facet_handle facet);}
|
||||
{
|
||||
Get circulator over facet's vertices.
|
||||
}
|
||||
\ccGlue
|
||||
\ccMethod{Vertex_around_facet_const_circulator facet_vertices_begin (Facet_const_handle facet) const;}
|
||||
{
|
||||
}
|
||||
\ccGlue
|
||||
\ccMethod{int count_facet_vertices (Facet_const_handle facet) const;}
|
||||
{
|
||||
Count the number of vertices of a facet.
|
||||
}
|
||||
\ccGlue
|
||||
\ccMethod{Point_3 get_vertex_position (Vertex_const_handle vertex) const;}
|
||||
{
|
||||
Get the 3D position of a vertex.
|
||||
}
|
||||
\ccGlue
|
||||
\ccMethod{Point_2 get_vertex_uv (Vertex_const_handle vertex) const;}
|
||||
{
|
||||
Get/set the 2D position (u/v pair) of a vertex. Default value is undefined.
|
||||
}
|
||||
\ccGlue
|
||||
\ccMethod{void set_vertex_uv (Vertex_handle vertex, const Point_2 & uv);}
|
||||
{
|
||||
}
|
||||
\ccGlue
|
||||
\ccMethod{bool is_vertex_parameterized (Vertex_const_handle vertex) const;}
|
||||
{
|
||||
Get/set {\em is parameterized} field of vertex. Default value is undefined.
|
||||
}
|
||||
\ccGlue
|
||||
\ccMethod{void set_vertex_parameterized (Vertex_handle vertex, bool parameterized);}
|
||||
{
|
||||
}
|
||||
\ccGlue
|
||||
\ccMethod{int get_vertex_index (Vertex_const_handle vertex) const;}
|
||||
{
|
||||
Get/set vertex index. Default value is undefined.
|
||||
}
|
||||
\ccGlue
|
||||
\ccMethod{void set_vertex_index (Vertex_handle vertex, int index);}
|
||||
{
|
||||
}
|
||||
\ccGlue
|
||||
\ccMethod{int get_vertex_tag (Vertex_const_handle vertex) const;}
|
||||
{
|
||||
Get/set vertex' all purpose tag. Default value is undefined.
|
||||
}
|
||||
\ccGlue
|
||||
\ccMethod{void set_vertex_tag (Vertex_handle vertex, int tag);}
|
||||
{
|
||||
}
|
||||
\ccGlue
|
||||
\ccMethod{bool is_vertex_on_border (Vertex_const_handle vertex) const;}
|
||||
{
|
||||
Return true if a vertex belongs to ANY mesh's border.
|
||||
}
|
||||
\ccGlue
|
||||
\ccMethod{bool is_vertex_on_main_border (Vertex_const_handle vertex) const;}
|
||||
{
|
||||
Return true if a vertex belongs to the UNIQUE mesh's main border set by the constructor.
|
||||
}
|
||||
\ccGlue
|
||||
\ccMethod{Vertex_around_vertex_circulator vertices_around_vertex_begin (Vertex_handle vertex, Vertex_handle start_position = Vertex_handle());}
|
||||
{
|
||||
Get circulator over the vertices incident to 'vertex'. 'start\_position' defines the optional initial position of the circulator.
|
||||
}
|
||||
\ccGlue
|
||||
\ccMethod{Vertex_around_vertex_const_circulator vertices_around_vertex_begin (Vertex_const_handle vertex, Vertex_const_handle start_position = Vertex_const_handle()) const;}
|
||||
{
|
||||
}
|
||||
\ccGlue
|
||||
|
||||
%END-AUTO(\ccOperations)
|
||||
|
||||
|
||||
\ccSeeAlso
|
||||
|
||||
\ccRefIdfierPage{CGAL::Parameterization_polyhedron_adaptor_3} \\
|
||||
|
||||
|
||||
\ccExample
|
||||
|
||||
See \ccc{Mesh_cutting_parameterization.C} example.
|
||||
|
||||
|
||||
\end{ccRefClass}
|
||||
|
||||
% +------------------------------------------------------------------------+
|
||||
%%RefPage: end of main body, begin of footer
|
||||
% EOF
|
||||
% +------------------------------------------------------------------------+
|
||||
|
||||
|
|
@ -1,489 +0,0 @@
|
|||
% +------------------------------------------------------------------------+
|
||||
% | Reference manual page: Parameterization_polyhedron_adaptor_3.tex
|
||||
% +------------------------------------------------------------------------+
|
||||
% | 13.09.2005 Laurent Saboret, Pierre Alliez, Bruno Levy
|
||||
% | Package: Parameterization
|
||||
% |
|
||||
\RCSdef{\RCSMeshadaptorpolyhedronRev}{$Id$}
|
||||
\RCSdefDate{\RCSMeshadaptorpolyhedronDate}{$Date$}
|
||||
% |
|
||||
%%RefPage: end of header, begin of main body
|
||||
% +------------------------------------------------------------------------+
|
||||
|
||||
|
||||
\begin{ccRefClass}{Parameterization_polyhedron_adaptor_3} %% add template arg's if necessary
|
||||
|
||||
%% \ccHtmlCrossLink{} %% add further rules for cross referencing links
|
||||
%% \ccHtmlIndexC[class]{} %% add further index entries
|
||||
|
||||
|
||||
\ccDefinition
|
||||
|
||||
% The section below is automatically generated. Do not edit!
|
||||
%START-AUTO(\ccDefinition)
|
||||
|
||||
Parameterization\_polyhedron\_adaptor\_3 is an adaptor class to access to a Polyhedron 3D mesh using the ParameterizationPatchableMesh\_3 interface. Among other things, this concept defines the accessor to the (u,v) values computed by parameterizations methods.
|
||||
|
||||
Note that these interfaces are decorators that add {\em on the fly} the necessary fields to unmodified CGAL data structures (using STL maps). For performance reasons, it is recommended to use CGAL data structures enriched with the proper fields.
|
||||
|
||||
A ParameterizationMesh\_3 surface consists of vertices, facets and an incidence relation on them. No notion of edge is requested.
|
||||
|
||||
ParameterizationMesh\_3 meshes can have any genus, arity or number of components.
|
||||
|
||||
It can have have any number of borders. Its {\em main border} will be the mesh's longest border (if there is at least one border).
|
||||
|
||||
It has also the ability to support patches and virtual seams. Patches are a subset of a 3D mesh. Virtual seams are the ability to behave exactly as if the surface was {\em cut} following a certain path.
|
||||
|
||||
%END-AUTO(\ccDefinition)
|
||||
|
||||
\ccInclude{CGAL/Parameterization_polyhedron_adaptor_3.h}
|
||||
|
||||
|
||||
\ccIsModel
|
||||
|
||||
% The section below is automatically generated. Do not edit!
|
||||
%START-AUTO(\ccIsModel)
|
||||
|
||||
Model of ParameterizationPatchableMesh\_3 concept, whose purpose is to allow the parameterization package to access meshes in a uniform manner.
|
||||
|
||||
%END-AUTO(\ccIsModel)
|
||||
|
||||
|
||||
\ccHeading{Design Pattern}
|
||||
|
||||
% The section below is automatically generated. Do not edit!
|
||||
%START-AUTO(\ccHeading{Design Pattern})
|
||||
|
||||
Parameterization\_polyhedron\_adaptor\_3 is an Adaptor \cite{cgal:ghjv-dpero-95}: it changes the Polyhedron interface to match the ParameterizationPatchableMesh\_3 concept.
|
||||
|
||||
%END-AUTO(\ccHeading{Design Pattern})
|
||||
|
||||
|
||||
\ccParameters
|
||||
|
||||
The full template declaration is:
|
||||
|
||||
% The section below is automatically generated. Do not edit!
|
||||
%START-AUTO(\ccParameters)
|
||||
|
||||
template$<$ \\
|
||||
class Polyhedron\_3\_$>$ \\
|
||||
class Parameterization\_polyhedron\_adaptor\_3;
|
||||
|
||||
%END-AUTO(\ccParameters)
|
||||
|
||||
|
||||
\ccTypes
|
||||
|
||||
The following mutable handles, iterators, and circulators have appropriate
|
||||
non-mutable counterparts, i.e. \ccc{const_handle},
|
||||
\ccc{const_iterator}, and \ccc{const_circulator}. The mutable types are
|
||||
assignable to their non-mutable counterparts. Both circulators are
|
||||
assignable to the \ccc{Vertex_iterator}. The iterators are
|
||||
assignable to the respective handle types. Wherever the handles appear
|
||||
in function parameter lists, the corresponding iterators can be used as
|
||||
well.
|
||||
|
||||
% The section below is automatically generated. Do not edit!
|
||||
%START-AUTO(\ccTypes)
|
||||
|
||||
\ccNestedType{Polyhedron}
|
||||
{
|
||||
Export template parameter.
|
||||
}
|
||||
\ccGlue
|
||||
\ccNestedType{NT}
|
||||
{
|
||||
Number type to represent coordinates.
|
||||
}
|
||||
\ccGlue
|
||||
\ccNestedType{Point_2}
|
||||
{
|
||||
2D point that represents (u,v) coordinates computed by parameterization methods. Must provide X() and Y() methods.
|
||||
}
|
||||
\ccGlue
|
||||
\ccNestedType{Point_3}
|
||||
{
|
||||
3D point that represents vertices coordinates. Must provide X() and Y() methods.
|
||||
}
|
||||
\ccGlue
|
||||
\ccNestedType{Vector_2}
|
||||
{
|
||||
2D vector. Must provide X() and Y() methods.
|
||||
}
|
||||
\ccGlue
|
||||
\ccNestedType{Vector_3}
|
||||
{
|
||||
3D vector. Must provide X() and Y() methods.
|
||||
}
|
||||
\ccGlue
|
||||
\ccNestedType{Facet}
|
||||
{
|
||||
Opaque type representing a facet of the 3D mesh. No methods are expected.
|
||||
}
|
||||
\ccGlue
|
||||
\ccNestedType{Facet_handle}
|
||||
{
|
||||
Handle to a facet. Model of the Handle concept.
|
||||
}
|
||||
\ccGlue
|
||||
\ccNestedType{Facet_const_handle}
|
||||
{
|
||||
}
|
||||
\ccGlue
|
||||
\ccNestedType{Facet_iterator}
|
||||
{
|
||||
Iterator over all mesh facets. Model of the ForwardIterator concept.
|
||||
}
|
||||
\ccGlue
|
||||
\ccNestedType{Facet_const_iterator}
|
||||
{
|
||||
}
|
||||
\ccGlue
|
||||
\ccNestedType{Vertex}
|
||||
{
|
||||
Opaque type representing a vertex of the 3D mesh. No methods are expected.
|
||||
}
|
||||
\ccGlue
|
||||
\ccNestedType{Vertex_handle}
|
||||
{
|
||||
Handle to a vertex. Model of the Handle concept.
|
||||
}
|
||||
\ccGlue
|
||||
\ccNestedType{Vertex_const_handle}
|
||||
{
|
||||
}
|
||||
\ccGlue
|
||||
\ccNestedType{Vertex_iterator}
|
||||
{
|
||||
Iterator over all vertices of a mesh. Model of the ForwardIterator concept.
|
||||
}
|
||||
\ccGlue
|
||||
\ccNestedType{Vertex_const_iterator}
|
||||
{
|
||||
}
|
||||
\ccGlue
|
||||
\ccNestedType{Border_vertex_iterator}
|
||||
{
|
||||
Iterator over vertices of the mesh {\em main border}. Model of the ForwardIterator concept.
|
||||
}
|
||||
\ccGlue
|
||||
\ccNestedType{Border_vertex_const_iterator}
|
||||
{
|
||||
}
|
||||
\ccGlue
|
||||
\ccNestedType{Vertex_around_facet_circulator}
|
||||
{
|
||||
Counter-clockwise circulator over a facet's vertices. Model of the BidirectionalCirculator concept.
|
||||
}
|
||||
\ccGlue
|
||||
\ccNestedType{Vertex_around_facet_const_circulator}
|
||||
{
|
||||
}
|
||||
\ccGlue
|
||||
\ccNestedType{Vertex_around_vertex_circulator}
|
||||
{
|
||||
Clockwise circulator over the vertices incident to a vertex. Model of the BidirectionalCirculator concept.
|
||||
}
|
||||
\ccGlue
|
||||
\ccNestedType{Vertex_around_vertex_const_circulator}
|
||||
{
|
||||
}
|
||||
\ccGlue
|
||||
|
||||
%END-AUTO(\ccTypes)
|
||||
|
||||
|
||||
\ccCreation
|
||||
\ccCreationVariable{mesh} %% define variable name used by \ccMethod below
|
||||
|
||||
% The section below is automatically generated. Do not edit!
|
||||
%START-AUTO(\ccCreation)
|
||||
|
||||
\ccConstructor{Parameterization_polyhedron_adaptor_3 (Polyhedron * mesh);}
|
||||
{
|
||||
Create an adaptator for an existing Polyhedron\_3 mesh. The input mesh can be of any genus. It can have have any number of borders. Its {\em main border} will be the mesh's longest border (if there is at least one border).
|
||||
}
|
||||
\ccGlue
|
||||
|
||||
%END-AUTO(\ccCreation)
|
||||
|
||||
|
||||
\ccOperations
|
||||
|
||||
The following methods returning a mutable handle, iterator, or circulator have appropriate
|
||||
non-mutable counterpart methods, i.e. \ccc{const}, returning a \ccc{const_handle},
|
||||
\ccc{const_iterator}, or \ccc{const_circulator}.
|
||||
|
||||
% The section below is automatically generated. Do not edit!
|
||||
%START-AUTO(\ccOperations)
|
||||
|
||||
\ccMethod{Polyhedron* get_adapted_mesh ();}
|
||||
{
|
||||
Get the adapted mesh.
|
||||
}
|
||||
\ccGlue
|
||||
\ccMethod{const Polyhedron* get_adapted_mesh () const;}
|
||||
{
|
||||
}
|
||||
\ccGlue
|
||||
\ccMethod{Polyhedron::Halfedge_const_handle get_halfedge (Vertex_const_handle source, Vertex_const_handle target) const;}
|
||||
{
|
||||
Get halfedge from source and target vertices. Will assert if such an halfedge doesn't exist.
|
||||
}
|
||||
\ccGlue
|
||||
\ccMethod{Polyhedron::Halfedge_handle get_halfedge (Vertex_handle source, Vertex_handle target);}
|
||||
{
|
||||
}
|
||||
\ccGlue
|
||||
\ccMethod{const Halfedge_info* info (Halfedge_const_handle halfedge) const;}
|
||||
{
|
||||
Access to additional info attached to halfedges.
|
||||
}
|
||||
\ccGlue
|
||||
\ccMethod{Halfedge_info* info (Halfedge_const_handle halfedge);}
|
||||
{
|
||||
}
|
||||
\ccGlue
|
||||
\ccMethod{const Vertex_info* info (Vertex_const_handle vertex) const;}
|
||||
{
|
||||
Access to additional info attached to vertices.
|
||||
}
|
||||
\ccGlue
|
||||
\ccMethod{Vertex_info* info (Vertex_const_handle vertex);}
|
||||
{
|
||||
}
|
||||
\ccGlue
|
||||
\ccMethod{Vertex_iterator mesh_vertices_begin ();}
|
||||
{
|
||||
Get iterator over first vertex of mesh.
|
||||
}
|
||||
\ccGlue
|
||||
\ccMethod{Vertex_const_iterator mesh_vertices_begin () const;}
|
||||
{
|
||||
}
|
||||
\ccGlue
|
||||
\ccMethod{Vertex_iterator mesh_vertices_end ();}
|
||||
{
|
||||
Get iterator over past-the-end vertex of mesh.
|
||||
}
|
||||
\ccGlue
|
||||
\ccMethod{Vertex_const_iterator mesh_vertices_end () const;}
|
||||
{
|
||||
}
|
||||
\ccGlue
|
||||
\ccMethod{int count_mesh_vertices () const;}
|
||||
{
|
||||
Count the number of vertices of the mesh.
|
||||
}
|
||||
\ccGlue
|
||||
\ccMethod{void index_mesh_vertices ();}
|
||||
{
|
||||
Index vertices of the mesh from 0 to count\_mesh\_vertices()-1.
|
||||
}
|
||||
\ccGlue
|
||||
\ccMethod{Border_vertex_iterator mesh_main_border_vertices_begin ();}
|
||||
{
|
||||
Get iterator over first vertex of mesh's {\em main border}.
|
||||
}
|
||||
\ccGlue
|
||||
\ccMethod{Border_vertex_const_iterator mesh_main_border_vertices_begin () const;}
|
||||
{
|
||||
}
|
||||
\ccGlue
|
||||
\ccMethod{Border_vertex_iterator mesh_main_border_vertices_end ();}
|
||||
{
|
||||
Get iterator over past-the-end vertex of mesh's {\em main border}.
|
||||
}
|
||||
\ccGlue
|
||||
\ccMethod{Border_vertex_const_iterator mesh_main_border_vertices_end () const;}
|
||||
{
|
||||
}
|
||||
\ccGlue
|
||||
\ccMethod{std::list<Vertex_handle> get_border (Vertex_handle seed_vertex);}
|
||||
{
|
||||
Return the border containing seed\_vertex. Return an empty list if not found.
|
||||
}
|
||||
\ccGlue
|
||||
\ccMethod{Facet_iterator mesh_facets_begin ();}
|
||||
{
|
||||
Get iterator over first facet of mesh.
|
||||
}
|
||||
\ccGlue
|
||||
\ccMethod{Facet_const_iterator mesh_facets_begin () const;}
|
||||
{
|
||||
}
|
||||
\ccGlue
|
||||
\ccMethod{Facet_iterator mesh_facets_end ();}
|
||||
{
|
||||
Get iterator over past-the-end facet of mesh.
|
||||
}
|
||||
\ccGlue
|
||||
\ccMethod{Facet_const_iterator mesh_facets_end () const;}
|
||||
{
|
||||
}
|
||||
\ccGlue
|
||||
\ccMethod{int count_mesh_facets () const;}
|
||||
{
|
||||
Count the number of facets of the mesh.
|
||||
}
|
||||
\ccGlue
|
||||
\ccMethod{bool is_mesh_triangular () const;}
|
||||
{
|
||||
Return true of all mesh's facets are triangles.
|
||||
}
|
||||
\ccGlue
|
||||
\ccMethod{int count_mesh_halfedges () const;}
|
||||
{
|
||||
Count the number of halfedges of the mesh.
|
||||
}
|
||||
\ccGlue
|
||||
\ccMethod{Vertex_around_facet_circulator facet_vertices_begin (Facet_handle facet);}
|
||||
{
|
||||
Get circulator over facet's vertices.
|
||||
}
|
||||
\ccGlue
|
||||
\ccMethod{Vertex_around_facet_const_circulator facet_vertices_begin (Facet_const_handle facet) const;}
|
||||
{
|
||||
}
|
||||
\ccGlue
|
||||
\ccMethod{int count_facet_vertices (Facet_const_handle facet) const;}
|
||||
{
|
||||
Count the number of vertices of a facet.
|
||||
}
|
||||
\ccGlue
|
||||
\ccMethod{Point_3 get_vertex_position (Vertex_const_handle vertex) const;}
|
||||
{
|
||||
Get the 3D position of a vertex.
|
||||
}
|
||||
\ccGlue
|
||||
\ccMethod{Point_2 get_vertex_uv (Vertex_const_handle vertex) const;}
|
||||
{
|
||||
Get/set the 2D position (u/v pair) of a vertex. Default value is undefined. (stored in halfedges sharing the same vertex).
|
||||
}
|
||||
\ccGlue
|
||||
\ccMethod{void set_vertex_uv (Vertex_handle vertex, const Point_2 & uv);}
|
||||
{
|
||||
}
|
||||
\ccGlue
|
||||
\ccMethod{bool is_vertex_parameterized (Vertex_const_handle vertex) const;}
|
||||
{
|
||||
Get/set {\em is parameterized} field of vertex. Default value is undefined. (stored in halfedges sharing the same vertex).
|
||||
}
|
||||
\ccGlue
|
||||
\ccMethod{void set_vertex_parameterized (Vertex_handle vertex, bool parameterized);}
|
||||
{
|
||||
}
|
||||
\ccGlue
|
||||
\ccMethod{int get_vertex_index (Vertex_const_handle vertex) const;}
|
||||
{
|
||||
Get/set vertex index. Default value is undefined. (stored in Polyhedron vertex for debugging purpose).
|
||||
}
|
||||
\ccGlue
|
||||
\ccMethod{void set_vertex_index (Vertex_handle vertex, int index);}
|
||||
{
|
||||
}
|
||||
\ccGlue
|
||||
\ccMethod{int get_vertex_tag (Vertex_const_handle vertex) const;}
|
||||
{
|
||||
Get/set vertex' all purpose tag. Default value is undefined. (stored in halfedges sharing the same vertex).
|
||||
}
|
||||
\ccGlue
|
||||
\ccMethod{void set_vertex_tag (Vertex_handle vertex, int tag);}
|
||||
{
|
||||
}
|
||||
\ccGlue
|
||||
\ccMethod{bool is_vertex_on_border (Vertex_const_handle vertex) const;}
|
||||
{
|
||||
Return true if a vertex belongs to ANY mesh's border.
|
||||
}
|
||||
\ccGlue
|
||||
\ccMethod{bool is_vertex_on_main_border (Vertex_const_handle vertex) const;}
|
||||
{
|
||||
Return true if a vertex belongs to the UNIQUE mesh's main border, ie the mesh's LONGEST border.
|
||||
}
|
||||
\ccGlue
|
||||
\ccMethod{Vertex_around_vertex_circulator vertices_around_vertex_begin (Vertex_handle vertex, Vertex_handle start_position = Vertex_handle());}
|
||||
{
|
||||
Get circulator over the vertices incident to 'vertex'. 'start\_position' defines the optional initial position of the circulator.
|
||||
}
|
||||
\ccGlue
|
||||
\ccMethod{Vertex_around_vertex_const_circulator vertices_around_vertex_begin (Vertex_const_handle vertex, Vertex_const_handle start_position = Vertex_const_handle()) const;}
|
||||
{
|
||||
}
|
||||
\ccGlue
|
||||
\ccMethod{int get_vertex_seaming (Vertex_const_handle vertex) const;}
|
||||
{
|
||||
Get/set vertex seaming flag. Default value is undefined.
|
||||
}
|
||||
\ccGlue
|
||||
\ccMethod{void set_vertex_seaming (Vertex_handle vertex, int seaming);}
|
||||
{
|
||||
}
|
||||
\ccGlue
|
||||
\ccMethod{int get_halfedge_seaming (Vertex_const_handle source, Vertex_const_handle target) const;}
|
||||
{
|
||||
Get/set oriented edge's seaming flag, ie position of the oriented edge wrt to the UNIQUE main border.
|
||||
}
|
||||
\ccGlue
|
||||
\ccMethod{void set_halfedge_seaming (Vertex_handle source, Vertex_handle target, int seaming);}
|
||||
{
|
||||
}
|
||||
\ccGlue
|
||||
\ccMethod{Point_2 get_corners_uv (Vertex_const_handle vertex, Vertex_const_handle prev_vertex, Vertex_const_handle next_vertex) const;}
|
||||
{
|
||||
Get/set the 2D position (= (u,v) pair) of corners at the {\em right} of the prev\_vertex -$>$ vertex -$>$ next\_vertex line. Default value is undefined. (stored in incident halfedges).
|
||||
}
|
||||
\ccGlue
|
||||
\ccMethod{void set_corners_uv (Vertex_handle vertex, Vertex_const_handle prev_vertex, Vertex_const_handle next_vertex, const Point_2 & uv);}
|
||||
{
|
||||
}
|
||||
\ccGlue
|
||||
\ccMethod{bool are_corners_parameterized (Vertex_const_handle vertex, Vertex_const_handle prev_vertex, Vertex_const_handle next_vertex) const;}
|
||||
{
|
||||
Get/set {\em is parameterized} field of corners at the {\em right} of the prev\_vertex -$>$ vertex -$>$ next\_vertex line. Default value is undefined. (stored in incident halfedges).
|
||||
}
|
||||
\ccGlue
|
||||
\ccMethod{void set_corners_parameterized (Vertex_handle vertex, Vertex_const_handle prev_vertex, Vertex_const_handle next_vertex, bool parameterized);}
|
||||
{
|
||||
}
|
||||
\ccGlue
|
||||
\ccMethod{int get_corners_index (Vertex_const_handle vertex, Vertex_const_handle prev_vertex, Vertex_const_handle next_vertex) const;}
|
||||
{
|
||||
Get/set index of corners at the {\em right} of the prev\_vertex -$>$ vertex -$>$ next\_vertex line. Default value is undefined. (stored in incident halfedges).
|
||||
}
|
||||
\ccGlue
|
||||
\ccMethod{void set_corners_index (Vertex_handle vertex, Vertex_const_handle prev_vertex, Vertex_const_handle next_vertex, int index);}
|
||||
{
|
||||
}
|
||||
\ccGlue
|
||||
\ccMethod{int get_corners_tag (Vertex_const_handle vertex, Vertex_const_handle prev_vertex, Vertex_const_handle next_vertex) const;}
|
||||
{
|
||||
Get/set all purpose tag of corners at the {\em right} of the prev\_vertex -$>$ vertex -$>$ next\_vertex line. Default value is undefined. (stored in incident halfedges).
|
||||
}
|
||||
\ccGlue
|
||||
\ccMethod{void set_corners_tag (Vertex_handle vertex, Vertex_const_handle prev_vertex, Vertex_const_handle next_vertex, int tag);}
|
||||
{
|
||||
}
|
||||
\ccGlue
|
||||
|
||||
%END-AUTO(\ccOperations)
|
||||
|
||||
|
||||
\ccSeeAlso
|
||||
|
||||
\ccRefIdfierPage{CGAL::Parameterization_mesh_patch_3} \\
|
||||
|
||||
|
||||
\ccExample
|
||||
|
||||
See \ccc{Simple_parameterization.C} example.
|
||||
|
||||
|
||||
\end{ccRefClass}
|
||||
|
||||
% +------------------------------------------------------------------------+
|
||||
%%RefPage: end of main body, begin of footer
|
||||
% EOF
|
||||
% +------------------------------------------------------------------------+
|
||||
|
||||
|
|
@ -1,125 +0,0 @@
|
|||
% +------------------------------------------------------------------------+
|
||||
% | Reference manual page: ParameterizerTraits_3.tex
|
||||
% +------------------------------------------------------------------------+
|
||||
% | 21.09.2005 Laurent Saboret, Pierre Alliez, Bruno Levy
|
||||
% | Package: Parameterization
|
||||
% |
|
||||
\RCSdef{\RCSParameterizerTraitsRev}{$Id$}
|
||||
\RCSdefDate{\RCSParameterizerTraitsDate}{$Date$}
|
||||
% |
|
||||
%%RefPage: end of header, begin of main body
|
||||
% +------------------------------------------------------------------------+
|
||||
|
||||
|
||||
\begin{ccRefConcept}{ParameterizerTraits_3}
|
||||
|
||||
%% \ccHtmlCrossLink{} %% add further rules for cross referencing links
|
||||
%% \ccHtmlIndexC[concept]{} %% add further index entries
|
||||
|
||||
|
||||
\ccDefinition
|
||||
|
||||
% The section below is automatically generated. Do not edit!
|
||||
%START-AUTO(\ccDefinition)
|
||||
|
||||
ParameterizerTraits\_3 is a concept of parameterization object for a given type of mesh, 'Adaptor', which is a model of the ParameterizationMesh\_3 concept.
|
||||
|
||||
%END-AUTO(\ccDefinition)
|
||||
|
||||
|
||||
\ccTypes
|
||||
|
||||
% The section below is automatically generated. Do not edit!
|
||||
%START-AUTO(\ccTypes)
|
||||
|
||||
\ccNestedType{Adaptor}
|
||||
{
|
||||
Export the type of mesh to parameterize.
|
||||
}
|
||||
\ccGlue
|
||||
|
||||
%END-AUTO(\ccTypes)
|
||||
|
||||
|
||||
\ccConstants
|
||||
|
||||
% The section below is automatically generated. Do not edit!
|
||||
%START-AUTO(\ccConstants)
|
||||
|
||||
\ccEnum{enum Error_code { OK, ERROR_EMPTY_MESH, ERROR_NON_TRIANGULAR_MESH, ERROR_NO_SURFACE_MESH, ERROR_INVALID_BORDER, ERROR_BAD_MATRIX_CONDITIONING, ERROR_CANNOT_SOLVE_LINEAR_SYSTEM, ERROR_NO_1_TO_1_MAPPING, ERROR_NOT_ENOUGH_MEMORY, ERROR_WRONG_PARAMETER };}
|
||||
{
|
||||
List of errors detected by this package.
|
||||
}
|
||||
\ccGlue
|
||||
\begin{description}
|
||||
\item[Enumeration values: ]
|
||||
\begin{description}
|
||||
\item[OK
|
||||
]Success. \item[ERROR\_EMPTY\_MESH
|
||||
]Error: input mesh is empty. \item[ERROR\_NON\_TRIANGULAR\_MESH
|
||||
]Error: input mesh is not triangular. \item[ERROR\_NO\_SURFACE\_MESH
|
||||
]Error: input mesh is not a surface. \item[ERROR\_INVALID\_BORDER
|
||||
]Error: parameterization requires a convex border. \item[ERROR\_BAD\_MATRIX\_CONDITIONING
|
||||
]Error: result is mathematically unstable. \item[ERROR\_CANNOT\_SOLVE\_LINEAR\_SYSTEM
|
||||
]Error: cannot solve linear system. \item[ERROR\_NO\_1\_TO\_1\_MAPPING
|
||||
]Error: parameterization does not ensure 1 to 1 mapping. \item[ERROR\_NOT\_ENOUGH\_MEMORY
|
||||
]Error: not enough memory. \item[ERROR\_WRONG\_PARAMETER
|
||||
]Error: a method received an unexpected parameter. \end{description}
|
||||
\end{description}
|
||||
\ccGlue
|
||||
|
||||
%END-AUTO(\ccConstants)
|
||||
|
||||
|
||||
\ccCreation
|
||||
\ccCreationVariable{param} %% variable name for \ccMethod
|
||||
|
||||
Construction and destruction are undefined.
|
||||
|
||||
% The section below is automatically generated. Do not edit!
|
||||
%START-AUTO(\ccCreation)
|
||||
|
||||
|
||||
|
||||
%END-AUTO(\ccCreation)
|
||||
|
||||
|
||||
\ccOperations
|
||||
|
||||
% The section below is automatically generated. Do not edit!
|
||||
%START-AUTO(\ccOperations)
|
||||
|
||||
\ccMethod{Error_code parameterize (Adaptor * mesh);}
|
||||
{
|
||||
Compute a 1 to 1 mapping from a triangular 3D surface 'mesh' to a piece of the 2D space. The mapping is linear by pieces (linear in each triangle). The result is the (u,v) pair image of each vertex of the 3D surface.
|
||||
Preconditions:\begin{itemize}
|
||||
\item 'mesh' must be a surface with 1 connected component and no hole.\item 'mesh' must be a triangular mesh. \end{itemize}
|
||||
}
|
||||
\ccGlue
|
||||
|
||||
%END-AUTO(\ccOperations)
|
||||
|
||||
|
||||
\ccHasModels
|
||||
|
||||
\ccRefIdfierPage{CGAL::Parameterizer_traits_3} \\
|
||||
\ccRefIdfierPage{CGAL::Fixed_border_parameterizer_3} \\
|
||||
\ccRefIdfierPage{CGAL::Barycentric_mapping_parameterizer_3} \\
|
||||
\ccRefIdfierPage{CGAL::Discrete_authalic_parameterizer_3} \\
|
||||
\ccRefIdfierPage{CGAL::Discrete_conformal_map_parameterizer_3} \\
|
||||
\ccRefIdfierPage{CGAL::LSCM_parameterizer_3} \\
|
||||
\ccRefIdfierPage{CGAL::Mean_value_coordinates_parameterizer_3} \\
|
||||
|
||||
|
||||
\ccSeeAlso
|
||||
|
||||
\ccRefIdfierPage{ParameterizationMesh_3} \\
|
||||
|
||||
|
||||
\end{ccRefConcept}
|
||||
|
||||
% +------------------------------------------------------------------------+
|
||||
%%RefPage: end of main body, begin of footer
|
||||
% EOF
|
||||
% +------------------------------------------------------------------------+
|
||||
|
||||
|
|
@ -1,148 +0,0 @@
|
|||
% +------------------------------------------------------------------------+
|
||||
% | Reference manual page: Parameterizer_traits_3.tex
|
||||
% +------------------------------------------------------------------------+
|
||||
% | 21.09.2005 Laurent Saboret, Pierre Alliez, Bruno Levy
|
||||
% | Package: Parameterization
|
||||
% |
|
||||
\RCSdef{\RCSParameterizertraitsRev}{$Id$}
|
||||
\RCSdefDate{\RCSParameterizertraitsDate}{$Date$}
|
||||
% |
|
||||
%%RefPage: end of header, begin of main body
|
||||
% +------------------------------------------------------------------------+
|
||||
|
||||
|
||||
\begin{ccRefClass}{Parameterizer_traits_3} %% add template arg's if necessary
|
||||
|
||||
%% \ccHtmlCrossLink{} %% add further rules for cross referencing links
|
||||
%% \ccHtmlIndexC[class]{} %% add further index entries
|
||||
|
||||
|
||||
\ccDefinition
|
||||
|
||||
% The section below is automatically generated. Do not edit!
|
||||
%START-AUTO(\ccDefinition)
|
||||
|
||||
The class Parameterizer\_traits\_3 is the base class of all parameterization methods. This class is a pure virtual class, thus cannot be instantiated.
|
||||
|
||||
This class doesn't do much. Its main goal is to ensure that subclasses will be proper models of the ParameterizerTraits\_3 concept:\begin{itemize}
|
||||
\item Parameterizer\_traits\_3 defines the Error\_code list of errors detected by this package\item Parameterizer\_traits\_3 declares a pure virtual method parameterize()\end{itemize}
|
||||
|
||||
%END-AUTO(\ccDefinition)
|
||||
|
||||
\ccInclude{CGAL/Parameterizer_traits_3.h}
|
||||
|
||||
|
||||
\ccIsModel
|
||||
|
||||
% The section below is automatically generated. Do not edit!
|
||||
%START-AUTO(\ccIsModel)
|
||||
|
||||
Model of the ParameterizerTraits\_3 concept (although you cannot instantiate this class).
|
||||
|
||||
%END-AUTO(\ccIsModel)
|
||||
|
||||
|
||||
\ccParameters
|
||||
|
||||
The full template declaration is:
|
||||
|
||||
% The section below is automatically generated. Do not edit!
|
||||
%START-AUTO(\ccParameters)
|
||||
|
||||
template$<$ \\
|
||||
class ParameterizationMesh\_3$>$ \\
|
||||
class Parameterizer\_traits\_3;
|
||||
|
||||
%END-AUTO(\ccParameters)
|
||||
|
||||
|
||||
\ccTypes
|
||||
|
||||
% The section below is automatically generated. Do not edit!
|
||||
%START-AUTO(\ccTypes)
|
||||
|
||||
\ccNestedType{Adaptor}
|
||||
{
|
||||
Export ParameterizationMesh\_3 template parameter.
|
||||
}
|
||||
\ccGlue
|
||||
|
||||
%END-AUTO(\ccTypes)
|
||||
|
||||
|
||||
\ccConstants
|
||||
|
||||
% The section below is automatically generated. Do not edit!
|
||||
%START-AUTO(\ccConstants)
|
||||
|
||||
\ccEnum{enum Error_code { OK, ERROR_EMPTY_MESH, ERROR_NON_TRIANGULAR_MESH, ERROR_NO_SURFACE_MESH, ERROR_INVALID_BORDER, ERROR_BAD_MATRIX_CONDITIONING, ERROR_CANNOT_SOLVE_LINEAR_SYSTEM, ERROR_NO_1_TO_1_MAPPING, ERROR_NOT_ENOUGH_MEMORY, ERROR_WRONG_PARAMETER };}
|
||||
{
|
||||
List of errors detected by this package.
|
||||
}
|
||||
\ccGlue
|
||||
\begin{description}
|
||||
\item[Enumeration values: ]
|
||||
\begin{description}
|
||||
\item[OK
|
||||
]Success. \item[ERROR\_EMPTY\_MESH
|
||||
]Error: input mesh is empty. \item[ERROR\_NON\_TRIANGULAR\_MESH
|
||||
]Error: input mesh is not triangular. \item[ERROR\_NO\_SURFACE\_MESH
|
||||
]Error: input mesh is not a surface. \item[ERROR\_INVALID\_BORDER
|
||||
]Error: parameterization requires a convex border. \item[ERROR\_BAD\_MATRIX\_CONDITIONING
|
||||
]Error: result is mathematically unstable. \item[ERROR\_CANNOT\_SOLVE\_LINEAR\_SYSTEM
|
||||
]Error: cannot solve linear system. \item[ERROR\_NO\_1\_TO\_1\_MAPPING
|
||||
]Error: parameterization does not ensure 1 to 1 mapping. \item[ERROR\_NOT\_ENOUGH\_MEMORY
|
||||
]Error: not enough memory. \item[ERROR\_WRONG\_PARAMETER
|
||||
]Error: a method received an unexpected parameter. \end{description}
|
||||
\end{description}
|
||||
\ccGlue
|
||||
|
||||
%END-AUTO(\ccConstants)
|
||||
|
||||
|
||||
\ccCreation
|
||||
\ccCreationVariable{param} %% variable name used by \ccMethod below
|
||||
|
||||
\ccConstructor{Parameterizer_traits_3();}{default constructor.}
|
||||
|
||||
% The section below is automatically generated. Do not edit!
|
||||
%START-AUTO(\ccCreation)
|
||||
|
||||
|
||||
|
||||
%END-AUTO(\ccCreation)
|
||||
|
||||
|
||||
\ccOperations
|
||||
|
||||
% The section below is automatically generated. Do not edit!
|
||||
%START-AUTO(\ccOperations)
|
||||
|
||||
\ccMethod{virtual Error_code parameterize (Adaptor * mesh);}
|
||||
{
|
||||
Compute a 1 to 1 mapping from a 3D surface 'mesh' to a piece of the 2D space. The mapping is linear by pieces (linear in each triangle). The result is the (u,v) pair image of each vertex of the 3D surface.
|
||||
Preconditions:\begin{itemize}
|
||||
\item 'mesh' must be a surface with 1 connected component.\item 'mesh' must be a triangular mesh. \end{itemize}
|
||||
}
|
||||
\ccGlue
|
||||
|
||||
%END-AUTO(\ccOperations)
|
||||
|
||||
|
||||
\ccSeeAlso
|
||||
|
||||
\ccRefIdfierPage{CGAL::Fixed_border_parameterizer_3} \\
|
||||
\ccRefIdfierPage{CGAL::Barycentric_mapping_parameterizer_3} \\
|
||||
\ccRefIdfierPage{CGAL::Discrete_authalic_parameterizer_3} \\
|
||||
\ccRefIdfierPage{CGAL::Discrete_conformal_map_parameterizer_3} \\
|
||||
\ccRefIdfierPage{CGAL::LSCM_parameterizer_3} \\
|
||||
\ccRefIdfierPage{CGAL::Mean_value_coordinates_parameterizer_3} \\
|
||||
|
||||
|
||||
\end{ccRefClass}
|
||||
|
||||
% +------------------------------------------------------------------------+
|
||||
%%RefPage: end of main body, begin of footer
|
||||
% EOF
|
||||
% +------------------------------------------------------------------------+
|
||||
|
||||
|
|
@ -1,122 +0,0 @@
|
|||
% +------------------------------------------------------------------------+
|
||||
% | Reference manual page: SparseLinearAlgebraTraits_d.tex
|
||||
% +------------------------------------------------------------------------+
|
||||
% | 21.09.2005 Laurent Saboret, Pierre Alliez, Bruno Levy
|
||||
% | Package: Parameterization
|
||||
% |
|
||||
\RCSdef{\RCSSparseLinearAlgebraTraitsdRev}{$Id$}
|
||||
\RCSdefDate{\RCSSparseLinearAlgebraTraitsdDate}{$Date$}
|
||||
% |
|
||||
%%RefPage: end of header, begin of main body
|
||||
% +------------------------------------------------------------------------+
|
||||
|
||||
|
||||
\begin{ccRefConcept}{SparseLinearAlgebraTraits_d}
|
||||
|
||||
%% \ccHtmlCrossLink{} %% add further rules for cross referencing links
|
||||
%% \ccHtmlIndexC[concept]{} %% add further index entries
|
||||
|
||||
|
||||
\ccDefinition
|
||||
|
||||
% The section below is automatically generated. Do not edit!
|
||||
%START-AUTO(\ccDefinition)
|
||||
|
||||
The concept SparseLinearAlgebraTraits\_d is used to solve sparse linear systems {\em A$\ast$X = B}.
|
||||
|
||||
\begin{description}
|
||||
\item[Todo]Add to SparseLinearAlgebraTraits\_d the ability to solve linear systems in the least squares sense.\end{description}
|
||||
|
||||
%END-AUTO(\ccDefinition)
|
||||
|
||||
|
||||
\ccRefines
|
||||
|
||||
% The section below is automatically generated. Do not edit!
|
||||
%START-AUTO(\ccRefines)
|
||||
|
||||
This is a sub-concept of LinearAlgebraTraits\_d.
|
||||
|
||||
%END-AUTO(\ccRefines)
|
||||
|
||||
|
||||
\ccTypes
|
||||
|
||||
% The section below is automatically generated. Do not edit!
|
||||
%START-AUTO(\ccTypes)
|
||||
|
||||
\ccNestedType{Matrix}
|
||||
{
|
||||
}
|
||||
\ccGlue
|
||||
\ccNestedType{Vector}
|
||||
{
|
||||
}
|
||||
\ccGlue
|
||||
\ccNestedType{NT}
|
||||
{
|
||||
}
|
||||
\ccGlue
|
||||
|
||||
%END-AUTO(\ccTypes)
|
||||
|
||||
|
||||
\ccCreation
|
||||
\ccCreationVariable{sparse_LA} %% variable name for \ccMethod
|
||||
|
||||
% The section below is automatically generated. Do not edit!
|
||||
%START-AUTO(\ccCreation)
|
||||
|
||||
\ccConstructor{SparseLinearAlgebraTraits_d ();}
|
||||
{
|
||||
Default constructor.
|
||||
}
|
||||
\ccGlue
|
||||
|
||||
%END-AUTO(\ccCreation)
|
||||
|
||||
|
||||
\ccOperations
|
||||
|
||||
% The section below is automatically generated. Do not edit!
|
||||
%START-AUTO(\ccOperations)
|
||||
|
||||
\ccMethod{bool linear_solver (const Matrix & A, const Vector & B, Vector & X, NT & D);}
|
||||
{
|
||||
Solve the sparse linear system {\em A$\ast$X = B}. Return true on success. The solution is then (1/D) $\ast$ X.
|
||||
Preconditions:\begin{itemize}
|
||||
\item A.row\_dimension() == B.dimension().\item A.column\_dimension() == X.dimension(). \end{itemize}
|
||||
}
|
||||
\ccGlue
|
||||
\ccMethod{bool is_solvable (const Matrix & A, const Vector & B);}
|
||||
{
|
||||
Indicate if the linear system can be solved and if the matrix conditioning is good.
|
||||
Preconditions:\begin{itemize}
|
||||
\item A.row\_dimension() == B.dimension(). \end{itemize}
|
||||
}
|
||||
\ccGlue
|
||||
|
||||
%END-AUTO(\ccOperations)
|
||||
|
||||
|
||||
\ccHasModels
|
||||
|
||||
\ccRefIdfierPage{CGAL::Taucs_solver_traits} \\
|
||||
\ccRefIdfierPage{CGAL::Taucs_symmetric_solver_traits} \\
|
||||
\ccc{OpenNL::DefaultLinearSolverTraits} \\
|
||||
\ccc{OpenNL::SymmetricLinearSolverTraits} \\
|
||||
|
||||
|
||||
\ccSeeAlso
|
||||
|
||||
\ccRefIdfierPage{SparseLinearAlgebraTraits_d::Matrix} \\
|
||||
\ccRefIdfierPage{SparseLinearAlgebraTraits_d::Vector} \\
|
||||
|
||||
|
||||
\end{ccRefConcept}
|
||||
|
||||
% +------------------------------------------------------------------------+
|
||||
%%RefPage: end of main body, begin of footer
|
||||
% EOF
|
||||
% +------------------------------------------------------------------------+
|
||||
|
||||
|
|
@ -1,125 +0,0 @@
|
|||
% +------------------------------------------------------------------------+
|
||||
% | Reference manual page: Square_border_arc_length_parameterizer_3.tex
|
||||
% +------------------------------------------------------------------------+
|
||||
% | 21.09.2005 Laurent Saboret, Pierre Alliez, Bruno Levy
|
||||
% | Package: Parameterization
|
||||
% |
|
||||
\RCSdef{\RCSSquareborderarclengthparameterizerRev}{$Id$}
|
||||
\RCSdefDate{\RCSSquareborderarclengthparameterizerDate}{$Date$}
|
||||
% |
|
||||
%%RefPage: end of header, begin of main body
|
||||
% +------------------------------------------------------------------------+
|
||||
|
||||
|
||||
\begin{ccRefClass}{Square_border_arc_length_parameterizer_3} %% add template arg's if necessary
|
||||
|
||||
%% \ccHtmlCrossLink{} %% add further rules for cross referencing links
|
||||
%% \ccHtmlIndexC[class]{} %% add further index entries
|
||||
|
||||
|
||||
\ccDefinition
|
||||
|
||||
% The section below is automatically generated. Do not edit!
|
||||
%START-AUTO(\ccDefinition)
|
||||
|
||||
This class parameterizes the border of a 3D surface onto a square, with an arc-length parameterization: (u,v) values are proportional to the length of border edges.
|
||||
|
||||
Square\_border\_parameterizer\_3 implements most of the boudary parameterization algorithm. This class implements only compute\_edge\_length() to compute a segment's length.
|
||||
|
||||
%END-AUTO(\ccDefinition)
|
||||
|
||||
\ccInclude{CGAL/Square_border_parameterizer_3.h}
|
||||
|
||||
|
||||
\ccIsModel
|
||||
|
||||
% The section below is automatically generated. Do not edit!
|
||||
%START-AUTO(\ccIsModel)
|
||||
|
||||
Model of the BorderParameterizer\_3 concept.
|
||||
|
||||
%END-AUTO(\ccIsModel)
|
||||
|
||||
|
||||
\ccHeading{Design Pattern}
|
||||
|
||||
% The section below is automatically generated. Do not edit!
|
||||
%START-AUTO(\ccHeading{Design Pattern})
|
||||
|
||||
BorderParameterizer\_3 models are Strategies \cite{cgal:ghjv-dpero-95}: they implement a strategy of border parameterization for models of ParameterizationMesh\_3
|
||||
|
||||
%END-AUTO(\ccHeading{Design Pattern})
|
||||
|
||||
|
||||
\ccParameters
|
||||
|
||||
The full template declaration is:
|
||||
|
||||
% The section below is automatically generated. Do not edit!
|
||||
%START-AUTO(\ccParameters)
|
||||
|
||||
template$<$ \\
|
||||
class ParameterizationMesh\_3$>$ \\
|
||||
class Square\_border\_arc\_length\_parameterizer\_3;
|
||||
|
||||
%END-AUTO(\ccParameters)
|
||||
|
||||
|
||||
\ccTypes
|
||||
|
||||
% The section below is automatically generated. Do not edit!
|
||||
%START-AUTO(\ccTypes)
|
||||
|
||||
|
||||
|
||||
%END-AUTO(\ccTypes)
|
||||
|
||||
|
||||
\ccCreation
|
||||
\ccCreationVariable{bp} %% variable name for \ccMethod
|
||||
|
||||
\ccConstructor{Square_border_arc_length_parameterizer_3();}{default constructor.}
|
||||
|
||||
% The section below is automatically generated. Do not edit!
|
||||
%START-AUTO(\ccCreation)
|
||||
|
||||
|
||||
|
||||
%END-AUTO(\ccCreation)
|
||||
|
||||
|
||||
\ccOperations
|
||||
|
||||
% The section below is automatically generated. Do not edit!
|
||||
%START-AUTO(\ccOperations)
|
||||
|
||||
\ccMethod{virtual double compute_edge_length (const Adaptor & mesh, Vertex_const_handle source, Vertex_const_handle target);}
|
||||
{
|
||||
Compute the length of an edge.
|
||||
Arc-length border parameterization: (u,v) values are proportional to the length of border edges.
|
||||
}
|
||||
\ccGlue
|
||||
|
||||
%END-AUTO(\ccOperations)
|
||||
|
||||
|
||||
\ccSeeAlso
|
||||
|
||||
\ccRefIdfierPage{CGAL::Circular_border_arc_length_parameterizer_3} \\
|
||||
\ccRefIdfierPage{CGAL::Circular_border_uniform_parameterizer_3} \\
|
||||
\ccRefIdfierPage{CGAL::Square_border_uniform_parameterizer_3} \\
|
||||
\ccRefIdfierPage{CGAL::Two_vertices_parameterizer_3} \\
|
||||
|
||||
|
||||
\ccExample
|
||||
|
||||
See \ccc{Square_border_parameterization.C} example.
|
||||
|
||||
|
||||
\end{ccRefClass}
|
||||
|
||||
% +------------------------------------------------------------------------+
|
||||
%%RefPage: end of main body, begin of footer
|
||||
% EOF
|
||||
% +------------------------------------------------------------------------+
|
||||
|
||||
|
|
@ -1,133 +0,0 @@
|
|||
% +------------------------------------------------------------------------+
|
||||
% | Reference manual page: Square_border_parameterizer_3.tex
|
||||
% +------------------------------------------------------------------------+
|
||||
% | 28.09.2005 Laurent Saboret, Pierre Alliez, Bruno Levy
|
||||
% | Package: Parameterization
|
||||
% |
|
||||
\RCSdef{\RCSSquareborderparameterizerRev}{$Id$}
|
||||
\RCSdefDate{\RCSSquareborderparameterizerDate}{$Date$}
|
||||
% |
|
||||
%%RefPage: end of header, begin of main body
|
||||
% +------------------------------------------------------------------------+
|
||||
|
||||
|
||||
\begin{ccRefClass}{Square_border_parameterizer_3} %% add template arg's if necessary
|
||||
|
||||
%% \ccHtmlCrossLink{} %% add further rules for cross referencing links
|
||||
%% \ccHtmlIndexC[class]{} %% add further index entries
|
||||
|
||||
|
||||
\ccDefinition
|
||||
|
||||
% The section below is automatically generated. Do not edit!
|
||||
%START-AUTO(\ccDefinition)
|
||||
|
||||
This is the base class of strategies that parameterize the border of a 3D surface onto a square. Square\_border\_parameterizer\_3 is a pure virtual class, thus cannot be instantiated.
|
||||
|
||||
It implements most of the algorithm. Subclasses just have to implement compute\_edge\_length() to compute a segment's length.
|
||||
|
||||
Implementation note: To simplify the implementation, BorderParameterizer\_3 models know only the ParameterizationMesh\_3 class. They do not know the parameterization algorithm requirements nor the kind of sparse linear system used.
|
||||
|
||||
%END-AUTO(\ccDefinition)
|
||||
|
||||
\ccInclude{CGAL/Square_border_parameterizer_3.h}
|
||||
|
||||
|
||||
\ccIsModel
|
||||
|
||||
% The section below is automatically generated. Do not edit!
|
||||
%START-AUTO(\ccIsModel)
|
||||
|
||||
Model of the BorderParameterizer\_3 concept (although you cannot instantiate this class).
|
||||
|
||||
%END-AUTO(\ccIsModel)
|
||||
|
||||
|
||||
\ccHeading{Design Pattern}
|
||||
|
||||
% The section below is automatically generated. Do not edit!
|
||||
%START-AUTO(\ccHeading{Design Pattern})
|
||||
|
||||
BorderParameterizer\_3 models are Strategies \cite{cgal:ghjv-dpero-95}: they implement a strategy of border parameterization for models of ParameterizationMesh\_3.
|
||||
|
||||
%END-AUTO(\ccHeading{Design Pattern})
|
||||
|
||||
|
||||
\ccParameters
|
||||
|
||||
The full template declaration is:
|
||||
|
||||
% The section below is automatically generated. Do not edit!
|
||||
%START-AUTO(\ccParameters)
|
||||
|
||||
template$<$ \\
|
||||
class ParameterizationMesh\_3$>$ \\
|
||||
class Square\_border\_parameterizer\_3;
|
||||
|
||||
%END-AUTO(\ccParameters)
|
||||
|
||||
|
||||
\ccTypes
|
||||
|
||||
% The section below is automatically generated. Do not edit!
|
||||
%START-AUTO(\ccTypes)
|
||||
|
||||
\ccNestedType{Adaptor}
|
||||
{
|
||||
Export ParameterizationMesh\_3 template parameter.
|
||||
}
|
||||
\ccGlue
|
||||
|
||||
%END-AUTO(\ccTypes)
|
||||
|
||||
|
||||
\ccCreation
|
||||
\ccCreationVariable{bp} %% choose variable name for \ccMethod
|
||||
|
||||
\ccConstructor{Square_border_parameterizer_3();}{default constructor.}
|
||||
|
||||
% The section below is automatically generated. Do not edit!
|
||||
%START-AUTO(\ccCreation)
|
||||
|
||||
|
||||
|
||||
%END-AUTO(\ccCreation)
|
||||
|
||||
|
||||
\ccOperations
|
||||
|
||||
% The section below is automatically generated. Do not edit!
|
||||
%START-AUTO(\ccOperations)
|
||||
|
||||
\ccMethod{Parameterizer_traits_3< Adaptor >::Error_code parameterize_border (Adaptor * mesh);}
|
||||
{
|
||||
Assign to mesh's border vertices a 2D position (ie a (u,v) pair) on border's shape. Mark them as {\em parameterized}.
|
||||
}
|
||||
\ccGlue
|
||||
\ccMethod{bool is_border_convex ();}
|
||||
{
|
||||
Indicate if border's shape is convex.
|
||||
}
|
||||
\ccGlue
|
||||
\ccMethod{virtual double compute_edge_length (const Adaptor & mesh, Vertex_const_handle source, Vertex_const_handle target);}
|
||||
{
|
||||
Compute the length of an edge.
|
||||
}
|
||||
\ccGlue
|
||||
|
||||
%END-AUTO(\ccOperations)
|
||||
|
||||
|
||||
\ccSeeAlso
|
||||
|
||||
\ccRefIdfierPage{CGAL::Square_border_arc_length_parameterizer_3} \\
|
||||
\ccRefIdfierPage{CGAL::Square_border_uniform_parameterizer_3} \\
|
||||
|
||||
|
||||
\end{ccRefClass}
|
||||
|
||||
% +------------------------------------------------------------------------+
|
||||
%%RefPage: end of main body, begin of footer
|
||||
% EOF
|
||||
% +------------------------------------------------------------------------+
|
||||
|
||||
|
|
@ -1,158 +0,0 @@
|
|||
% +------------------------------------------------------------------------+
|
||||
% | Reference manual page: Square_border_uniform_parameterizer_3.tex
|
||||
% +------------------------------------------------------------------------+
|
||||
% | 21.09.2005 Laurent Saboret, Pierre Alliez, Bruno Levy
|
||||
% | Package: Parameterization
|
||||
% |
|
||||
\RCSdef{\RCSSquareborderuniformparameterizerRev}{$Id$}
|
||||
\RCSdefDate{\RCSSquareborderuniformparameterizerDate}{$Date$}
|
||||
% |
|
||||
%%RefPage: end of header, begin of main body
|
||||
% +------------------------------------------------------------------------+
|
||||
|
||||
|
||||
\begin{ccRefClass}{Square_border_uniform_parameterizer_3} %% add template arg's if necessary
|
||||
|
||||
%% \ccHtmlCrossLink{} %% add further rules for cross referencing links
|
||||
%% \ccHtmlIndexC[class]{} %% add further index entries
|
||||
|
||||
|
||||
\ccDefinition
|
||||
|
||||
% The section below is automatically generated. Do not edit!
|
||||
%START-AUTO(\ccDefinition)
|
||||
|
||||
This class parameterizes the border of a 3D surface onto a square in a uniform manner: points are equally spaced.
|
||||
|
||||
Square\_border\_parameterizer\_3 implements most of the boudary parameterization algorithm. This class implements only compute\_edge\_length() to compute a segment's length.
|
||||
|
||||
%END-AUTO(\ccDefinition)
|
||||
|
||||
\ccInclude{CGAL/Square_border_parameterizer_3.h}
|
||||
|
||||
|
||||
\ccIsModel
|
||||
|
||||
% The section below is automatically generated. Do not edit!
|
||||
%START-AUTO(\ccIsModel)
|
||||
|
||||
Model of the BorderParameterizer\_3 concept.
|
||||
|
||||
%END-AUTO(\ccIsModel)
|
||||
|
||||
|
||||
\ccHeading{Design Pattern}
|
||||
|
||||
% The section below is automatically generated. Do not edit!
|
||||
%START-AUTO(\ccHeading{Design Pattern})
|
||||
|
||||
BorderParameterizer\_3 models are Strategies \cite{cgal:ghjv-dpero-95}: they implement a strategy of border parameterization for models of ParameterizationMesh\_3.
|
||||
|
||||
%END-AUTO(\ccHeading{Design Pattern})
|
||||
|
||||
|
||||
\ccParameters
|
||||
|
||||
The full template declaration is:
|
||||
|
||||
% The section below is automatically generated. Do not edit!
|
||||
%START-AUTO(\ccParameters)
|
||||
|
||||
template$<$ \\
|
||||
class ParameterizationMesh\_3$>$ \\
|
||||
class Square\_border\_uniform\_parameterizer\_3;
|
||||
|
||||
%END-AUTO(\ccParameters)
|
||||
|
||||
|
||||
\ccTypes
|
||||
|
||||
% The section below is automatically generated. Do not edit!
|
||||
%START-AUTO(\ccTypes)
|
||||
|
||||
|
||||
|
||||
%END-AUTO(\ccTypes)
|
||||
|
||||
|
||||
\ccCreation
|
||||
\ccCreationVariable{bp} %% variable name for \ccMethod
|
||||
|
||||
\ccConstructor{Square_border_uniform_parameterizer_3();}{default constructor.}
|
||||
|
||||
% The section below is automatically generated. Do not edit!
|
||||
%START-AUTO(\ccCreation)
|
||||
|
||||
|
||||
|
||||
%END-AUTO(\ccCreation)
|
||||
|
||||
|
||||
\ccOperations
|
||||
|
||||
% The section below is automatically generated. Do not edit!
|
||||
%START-AUTO(\ccOperations)
|
||||
|
||||
\ccMethod{virtual double compute_edge_length (const Adaptor & mesh, Vertex_const_handle source, Vertex_const_handle target);}
|
||||
{
|
||||
Compute the length of an edge.
|
||||
Uniform border parameterization: points are equally spaced.
|
||||
}
|
||||
\ccGlue
|
||||
|
||||
%END-AUTO(\ccOperations)
|
||||
|
||||
|
||||
\ccSeeAlso
|
||||
|
||||
\ccRefIdfierPage{CGAL::Circular_border_arc_length_parameterizer_3} \\
|
||||
\ccRefIdfierPage{CGAL::Circular_border_uniform_parameterizer_3} \\
|
||||
\ccRefIdfierPage{CGAL::Square_border_arc_length_parameterizer_3} \\
|
||||
\ccRefIdfierPage{CGAL::Two_vertices_parameterizer_3} \\
|
||||
|
||||
|
||||
\ccExample
|
||||
|
||||
\begin{ccExampleCode}
|
||||
|
||||
// CGAL kernel
|
||||
typedef CGAL::Cartesian<double> Kernel;
|
||||
|
||||
// Mesh true type and parameterization adaptor
|
||||
typedef CGAL::Polyhedron_3<Kernel> Polyhedron;
|
||||
typedef CGAL::Parameterization_polyhedron_adaptor_3<Polyhedron>
|
||||
Parameterization_polyhedron_adaptor;
|
||||
|
||||
// Square uniform border parameterizer
|
||||
typedef CGAL::Square_border_uniform_parameterizer_3<Parameterization_polyhedron_adaptor>
|
||||
Border_parameterizer;
|
||||
|
||||
// Floater Mean Value Coordinates parameterizer
|
||||
// with Square uniform border parameterization
|
||||
typedef CGAL::Mean_value_coordinates_parameterizer_3<Parameterization_polyhedron_adaptor,
|
||||
Border_parameterizer>
|
||||
Parameterizer;
|
||||
|
||||
int main(int argc,char * argv[])
|
||||
{
|
||||
Polyhedron mesh;
|
||||
...
|
||||
|
||||
// The parameterization package needs an adaptor to handle Polyhedron_3 meshes
|
||||
// The mesh must be a topological disk
|
||||
Parameterization_polyhedron_adaptor mesh_adaptor(&mesh);
|
||||
|
||||
Parameterizer::Error_code err = CGAL::parameterize(&mesh_adaptor, Parameterizer());
|
||||
...
|
||||
}
|
||||
|
||||
\end{ccExampleCode}
|
||||
|
||||
|
||||
\end{ccRefClass}
|
||||
|
||||
% +------------------------------------------------------------------------+
|
||||
%%RefPage: end of main body, begin of footer
|
||||
% EOF
|
||||
% +------------------------------------------------------------------------+
|
||||
|
||||
|
|
@ -1,193 +0,0 @@
|
|||
% +------------------------------------------------------------------------+
|
||||
% | Reference manual page: Taucs_matrix.tex
|
||||
% +------------------------------------------------------------------------+
|
||||
% | 21.09.2005 Laurent Saboret, Pierre Alliez, Bruno Levy
|
||||
% | Package: Parameterization
|
||||
% |
|
||||
\RCSdef{\RCSTaucsmatrixRev}{$Id$}
|
||||
\RCSdefDate{\RCSTaucsmatrixDate}{$Date$}
|
||||
% |
|
||||
%%RefPage: end of header, begin of main body
|
||||
% +------------------------------------------------------------------------+
|
||||
|
||||
|
||||
\begin{ccRefClass}{Taucs_matrix} %% add template arg's if necessary
|
||||
|
||||
%% \ccHtmlCrossLink{} %% add further rules for cross referencing links
|
||||
%% \ccHtmlIndexC[class]{} %% add further index entries
|
||||
|
||||
|
||||
\ccDefinition
|
||||
|
||||
% The section below is automatically generated. Do not edit!
|
||||
%START-AUTO(\ccDefinition)
|
||||
|
||||
The class Taucs\_matrix is a C++ wrapper around TAUCS' matrix type taucs\_ccs\_matrix.
|
||||
|
||||
This kind of matrix can be either symmetric or not. Symmetric matrices store only the lower triangle.
|
||||
|
||||
\begin{description}
|
||||
\item[Todo]Taucs\_matrix must reallocate the array of non null elements when it's full.
|
||||
|
||||
Filling a Taucs\_matrix by lines is very slow. We must improve this code.\end{description}
|
||||
|
||||
%END-AUTO(\ccDefinition)
|
||||
|
||||
\ccInclude{CGAL/Taucs_matrix.h}
|
||||
|
||||
|
||||
\ccIsModel
|
||||
|
||||
% The section below is automatically generated. Do not edit!
|
||||
%START-AUTO(\ccIsModel)
|
||||
|
||||
Model of the SparseLinearAlgebraTraits\_d::Matrix concept.
|
||||
|
||||
%END-AUTO(\ccIsModel)
|
||||
|
||||
|
||||
\ccParameters
|
||||
|
||||
The full template declaration is:
|
||||
|
||||
% The section below is automatically generated. Do not edit!
|
||||
%START-AUTO(\ccParameters)
|
||||
|
||||
template$<$ \\
|
||||
class T$>$ \\
|
||||
struct Taucs\_matrix;
|
||||
|
||||
%END-AUTO(\ccParameters)
|
||||
|
||||
|
||||
\ccTypes
|
||||
|
||||
% The section below is automatically generated. Do not edit!
|
||||
%START-AUTO(\ccTypes)
|
||||
|
||||
\ccNestedType{NT}
|
||||
{
|
||||
}
|
||||
\ccGlue
|
||||
|
||||
%END-AUTO(\ccTypes)
|
||||
|
||||
|
||||
\ccCreation
|
||||
\ccCreationVariable{M} %% choose variable name for \ccMethod
|
||||
|
||||
% The section below is automatically generated. Do not edit!
|
||||
%START-AUTO(\ccCreation)
|
||||
|
||||
\ccConstructor{Taucs_matrix (int dim, bool is_symmetric = false, int nb_max_elements = 0);}
|
||||
{
|
||||
Create a square matrix initialized with zeros.
|
||||
}
|
||||
\ccGlue
|
||||
\begin{description}
|
||||
\item[Parameters: ]
|
||||
\begin{description}
|
||||
\item[dim]Matrix dimension. \item[is\_symmetric]Symmetric/hermitian? \item[nb\_max\_elements]Max number of non 0 elements in the matrix (automatically computed if 0). \end{description}
|
||||
\end{description}
|
||||
\ccGlue
|
||||
\ccConstructor{Taucs_matrix (int rows, int columns, bool is_symmetric = false, int nb_max_elements = 0);}
|
||||
{
|
||||
Create a rectangular matrix initialized with zeros.
|
||||
}
|
||||
\ccGlue
|
||||
\begin{description}
|
||||
\item[Parameters: ]
|
||||
\begin{description}
|
||||
\item[rows]Matrix dimensions. \item[is\_symmetric]Symmetric/hermitian? \item[nb\_max\_elements]Max number of non 0 elements in the matrix (automatically computed if 0). \end{description}
|
||||
\end{description}
|
||||
\ccGlue
|
||||
|
||||
%END-AUTO(\ccCreation)
|
||||
|
||||
|
||||
\ccOperations
|
||||
|
||||
% The section below is automatically generated. Do not edit!
|
||||
%START-AUTO(\ccOperations)
|
||||
|
||||
\ccMethod{int row_dimension () const;}
|
||||
{
|
||||
Return the matrix' number of rows.
|
||||
}
|
||||
\ccGlue
|
||||
\ccMethod{int column_dimension () const;}
|
||||
{
|
||||
Return the matrix' number of columns.
|
||||
}
|
||||
\ccGlue
|
||||
\ccMethod{T get_coef (int i, int j) const;}
|
||||
{
|
||||
Read access to 1 matrix coefficient.
|
||||
Preconditions:\begin{itemize}
|
||||
\item 0 $<$= i $<$ row\_dimension().\item 0 $<$= j $<$ column\_dimension(). \end{itemize}
|
||||
}
|
||||
\ccGlue
|
||||
\ccMethod{void set_coef (int i, int j, T val);}
|
||||
{
|
||||
Write access to 1 matrix coefficient: a\_ij $<$- val.
|
||||
Optimization: For symmetric matrices, Taucs\_matrix stores only the lower triangle set\_coef() does nothing if (i,j) belongs to the upper triangle.
|
||||
Preconditions:\begin{itemize}
|
||||
\item 0 $<$= i $<$ row\_dimension().\item 0 $<$= j $<$ column\_dimension(). \end{itemize}
|
||||
}
|
||||
\ccGlue
|
||||
\ccMethod{void add_coef (int i, int j, T val);}
|
||||
{
|
||||
Write access to 1 matrix coefficient: a\_ij $<$- a\_ij + val.
|
||||
Optimization: For symmetric matrices, Taucs\_matrix stores only the lower triangle add\_coef() does nothing if (i,j) belongs to the upper triangle.
|
||||
Preconditions:\begin{itemize}
|
||||
\item 0 $<$= i $<$ row\_dimension().\item 0 $<$= j $<$ column\_dimension(). \end{itemize}
|
||||
}
|
||||
\ccGlue
|
||||
\ccMethod{const taucs_ccs_matrix* get_taucs_matrix () const;}
|
||||
{
|
||||
Get TAUCS matrix wrapped by this object.
|
||||
}
|
||||
\ccGlue
|
||||
\ccMethod{taucs_ccs_matrix* get_taucs_matrix ();}
|
||||
{
|
||||
}
|
||||
\ccGlue
|
||||
|
||||
%END-AUTO(\ccOperations)
|
||||
|
||||
|
||||
\ccSeeAlso
|
||||
|
||||
\ccRefIdfierPage{CGAL::Taucs_solver_traits} \\
|
||||
\ccRefIdfierPage{CGAL::Taucs_symmetric_solver_traits} \\
|
||||
\ccRefIdfierPage{CGAL::Taucs_symmetric_matrix} \\
|
||||
\ccRefIdfierPage{CGAL::Taucs_vector} \\
|
||||
|
||||
|
||||
\ccExample
|
||||
|
||||
A Taucs\_matrix object can be used as a 2D array of floating points.
|
||||
Use get\_coef() and set\_coef() to access to the matrix elements.
|
||||
|
||||
\begin{ccExampleCode}
|
||||
|
||||
typedef CGAL::Taucs_matrix<double> Matrix;
|
||||
|
||||
int main()
|
||||
{
|
||||
Matrix m(100, 50); // 100 x 50 elements
|
||||
m.set_coef(0, 0, 4.3);
|
||||
double val = m.get_coef(0, 0);
|
||||
...
|
||||
}
|
||||
|
||||
\end{ccExampleCode}
|
||||
|
||||
|
||||
\end{ccRefClass}
|
||||
|
||||
% +------------------------------------------------------------------------+
|
||||
%%RefPage: end of main body, begin of footer
|
||||
% EOF
|
||||
% +------------------------------------------------------------------------+
|
||||
|
||||
|
|
@ -1,141 +0,0 @@
|
|||
% +------------------------------------------------------------------------+
|
||||
% | Reference manual page: Taucs_solver_traits.tex
|
||||
% +------------------------------------------------------------------------+
|
||||
% | 21.09.2005 Laurent Saboret, Pierre Alliez, Bruno Levy
|
||||
% | Package: Parameterization
|
||||
% |
|
||||
\RCSdef{\RCSTaucssolvertraitsRev}{$Id$}
|
||||
\RCSdefDate{\RCSTaucssolvertraitsDate}{$Date$}
|
||||
% |
|
||||
%%RefPage: end of header, begin of main body
|
||||
% +------------------------------------------------------------------------+
|
||||
|
||||
|
||||
\begin{ccRefClass}{Taucs_solver_traits} %% add template arg's if necessary
|
||||
|
||||
%% \ccHtmlCrossLink{} %% add further rules for cross referencing links
|
||||
%% \ccHtmlIndexC[class]{} %% add further index entries
|
||||
|
||||
|
||||
\ccDefinition
|
||||
|
||||
% The section below is automatically generated. Do not edit!
|
||||
%START-AUTO(\ccDefinition)
|
||||
|
||||
The class Taucs\_solver\_traits is a traits class for solving GENERAL (aka unsymmetric) sparse linear systems using TAUCS out-of-core LU factorization.
|
||||
|
||||
%END-AUTO(\ccDefinition)
|
||||
|
||||
\ccInclude{CGAL/Taucs_solver_traits.h}
|
||||
|
||||
|
||||
\ccIsModel
|
||||
|
||||
% The section below is automatically generated. Do not edit!
|
||||
%START-AUTO(\ccIsModel)
|
||||
|
||||
Model of the SparseLinearAlgebraTraits\_d concept.
|
||||
|
||||
%END-AUTO(\ccIsModel)
|
||||
|
||||
|
||||
\ccParameters
|
||||
|
||||
The full template declaration is:
|
||||
|
||||
% The section below is automatically generated. Do not edit!
|
||||
%START-AUTO(\ccParameters)
|
||||
|
||||
template$<$ \\
|
||||
class T$>$ \\
|
||||
class Taucs\_solver\_traits;
|
||||
|
||||
%END-AUTO(\ccParameters)
|
||||
|
||||
|
||||
\ccTypes
|
||||
|
||||
% The section below is automatically generated. Do not edit!
|
||||
%START-AUTO(\ccTypes)
|
||||
|
||||
\ccNestedType{Matrix}
|
||||
{
|
||||
}
|
||||
\ccGlue
|
||||
\ccNestedType{Vector}
|
||||
{
|
||||
}
|
||||
\ccGlue
|
||||
\ccNestedType{NT}
|
||||
{
|
||||
}
|
||||
\ccGlue
|
||||
|
||||
%END-AUTO(\ccTypes)
|
||||
|
||||
|
||||
\ccCreation
|
||||
\ccCreationVariable{solver} %% choose variable name for \ccMethod
|
||||
|
||||
\ccConstructor{Taucs_solver_traits();}{default constructor.}
|
||||
|
||||
% The section below is automatically generated. Do not edit!
|
||||
%START-AUTO(\ccCreation)
|
||||
|
||||
\ccConstructor{Taucs_solver_traits ();}
|
||||
{
|
||||
Create a TAUCS sparse linear solver for GENERAL (aka unsymmetric) matrices.
|
||||
}
|
||||
\ccGlue
|
||||
|
||||
%END-AUTO(\ccCreation)
|
||||
|
||||
|
||||
\ccOperations
|
||||
|
||||
% The section below is automatically generated. Do not edit!
|
||||
%START-AUTO(\ccOperations)
|
||||
|
||||
\ccMethod{bool linear_solver (const Matrix & A, const Vector & B, Vector & X, NT & D);}
|
||||
{
|
||||
Solve the sparse linear system {\em A$\ast$X = B}. Return true on success. The solution is then (1/D) $\ast$ X.
|
||||
Preconditions:\begin{itemize}
|
||||
\item A.row\_dimension() == B.dimension().\item A.column\_dimension() == X.dimension(). \end{itemize}
|
||||
}
|
||||
\ccGlue
|
||||
\ccMethod{bool is_solvable (const Matrix & A, const Vector & B);}
|
||||
{
|
||||
Indicate if the linear system can be solved and if the matrix conditioning is good.
|
||||
Preconditions:\begin{itemize}
|
||||
\item A.row\_dimension() == B.dimension().\end{itemize}
|
||||
}
|
||||
\ccGlue
|
||||
\begin{description}
|
||||
\item[Todo]Implement Taucs\_solver\_traits::is\_solvable() by solving the system, then checking that $|$ $|$$|$A$\ast$X$|$$|$/$|$$|$B$|$$|$ - 1 $|$ $<$ epsilon. \end{description}
|
||||
\ccGlue
|
||||
|
||||
%END-AUTO(\ccOperations)
|
||||
|
||||
|
||||
\ccSeeAlso
|
||||
|
||||
\ccRefIdfierPage{CGAL::Taucs_symmetric_solver_traits} \\
|
||||
\ccRefIdfierPage{CGAL::Taucs_matrix} \\
|
||||
\ccRefIdfierPage{CGAL::Taucs_symmetric_matrix} \\
|
||||
\ccRefIdfierPage{CGAL::Taucs_vector} \\
|
||||
\ccc{OpenNL::DefaultLinearSolverTraits} \\
|
||||
\ccc{OpenNL::SymmetricLinearSolverTraits} \\
|
||||
|
||||
|
||||
\ccExample
|
||||
|
||||
See \ccc{Taucs_parameterization.C} example.
|
||||
|
||||
|
||||
\end{ccRefClass}
|
||||
|
||||
% +------------------------------------------------------------------------+
|
||||
%%RefPage: end of main body, begin of footer
|
||||
% EOF
|
||||
% +------------------------------------------------------------------------+
|
||||
|
||||
|
|
@ -1,149 +0,0 @@
|
|||
% +------------------------------------------------------------------------+
|
||||
% | Reference manual page: Taucs_symmetric_matrix.tex
|
||||
% +------------------------------------------------------------------------+
|
||||
% | 21.09.2005 Laurent Saboret, Pierre Alliez, Bruno Levy
|
||||
% | Package: Parameterization
|
||||
% |
|
||||
\RCSdef{\RCSTaucssymmetricmatrixRev}{$Id$}
|
||||
\RCSdefDate{\RCSTaucssymmetricmatrixDate}{$Date$}
|
||||
% |
|
||||
%%RefPage: end of header, begin of main body
|
||||
% +------------------------------------------------------------------------+
|
||||
|
||||
|
||||
\begin{ccRefClass}{Taucs_symmetric_matrix} %% add template arg's if necessary
|
||||
|
||||
%% \ccHtmlCrossLink{} %% add further rules for cross referencing links
|
||||
%% \ccHtmlIndexC[class]{} %% add further index entries
|
||||
|
||||
|
||||
\ccDefinition
|
||||
|
||||
% The section below is automatically generated. Do not edit!
|
||||
%START-AUTO(\ccDefinition)
|
||||
|
||||
The class Taucs\_symmetric\_matrix is a C++ wrapper around a TAUCS $\ast$symmetric$\ast$ matrix (type taucs\_ccs\_matrix).
|
||||
|
||||
Symmetric matrices store only the lower triangle.
|
||||
|
||||
%END-AUTO(\ccDefinition)
|
||||
|
||||
\ccInclude{CGAL/Taucs_matrix.h}
|
||||
|
||||
|
||||
\ccIsModel
|
||||
|
||||
% The section below is automatically generated. Do not edit!
|
||||
%START-AUTO(\ccIsModel)
|
||||
|
||||
Model of the SparseLinearAlgebraTraits\_d::Matrix concept.
|
||||
|
||||
%END-AUTO(\ccIsModel)
|
||||
|
||||
|
||||
\ccParameters
|
||||
|
||||
The full template declaration is:
|
||||
|
||||
% The section below is automatically generated. Do not edit!
|
||||
%START-AUTO(\ccParameters)
|
||||
|
||||
template$<$ \\
|
||||
class T$>$ \\
|
||||
struct Taucs\_symmetric\_matrix;
|
||||
|
||||
%END-AUTO(\ccParameters)
|
||||
|
||||
|
||||
\ccTypes
|
||||
|
||||
% The section below is automatically generated. Do not edit!
|
||||
%START-AUTO(\ccTypes)
|
||||
|
||||
\ccNestedType{NT}
|
||||
{
|
||||
}
|
||||
\ccGlue
|
||||
|
||||
%END-AUTO(\ccTypes)
|
||||
|
||||
|
||||
\ccCreation
|
||||
\ccCreationVariable{M} %% choose variable name for \ccMethod
|
||||
|
||||
% The section below is automatically generated. Do not edit!
|
||||
%START-AUTO(\ccCreation)
|
||||
|
||||
\ccConstructor{Taucs_symmetric_matrix (int dim);}
|
||||
{
|
||||
Create a square SYMMETRIC matrix initialized with zeros. The max number of non 0 elements in the matrix is automatically computed.
|
||||
}
|
||||
\ccGlue
|
||||
\begin{description}
|
||||
\item[Parameters: ]
|
||||
\begin{description}
|
||||
\item[dim]Matrix dimension. \end{description}
|
||||
\end{description}
|
||||
\ccGlue
|
||||
\ccConstructor{Taucs_symmetric_matrix (int rows, int columns, int nb_max_elements = 0);}
|
||||
{
|
||||
Create a square SYMMETRIC matrix initialized with zeros.
|
||||
}
|
||||
\ccGlue
|
||||
\begin{description}
|
||||
\item[Parameters: ]
|
||||
\begin{description}
|
||||
\item[rows]Matrix dimensions. \item[nb\_max\_elements]Max number of non 0 elements in the matrix (automatically computed if 0). \end{description}
|
||||
\end{description}
|
||||
\ccGlue
|
||||
|
||||
%END-AUTO(\ccCreation)
|
||||
|
||||
|
||||
\ccOperations
|
||||
|
||||
% The section below is automatically generated. Do not edit!
|
||||
%START-AUTO(\ccOperations)
|
||||
|
||||
|
||||
|
||||
%END-AUTO(\ccOperations)
|
||||
|
||||
|
||||
\ccSeeAlso
|
||||
|
||||
\ccRefIdfierPage{CGAL::Taucs_solver_traits} \\
|
||||
\ccRefIdfierPage{CGAL::Taucs_symmetric_solver_traits} \\
|
||||
\ccRefIdfierPage{CGAL::Taucs_matrix} \\
|
||||
\ccRefIdfierPage{CGAL::Taucs_vector} \\
|
||||
\ccc{OpenNL::DefaultLinearSolverTraits} \\
|
||||
\ccc{OpenNL::SymmetricLinearSolverTraits} \\
|
||||
|
||||
|
||||
\ccExample
|
||||
|
||||
A Taucs\_matrix object can be used as a 2D array of floating points.
|
||||
Use get\_coef() and set\_coef() to access to the matrix elements.
|
||||
|
||||
\begin{ccExampleCode}
|
||||
|
||||
typedef CGAL::Taucs_symmetric_matrix<double> Matrix;
|
||||
|
||||
int main()
|
||||
{
|
||||
Matrix m(100); // 100 x 100 elements
|
||||
m.set_coef(0, 0, 4.3);
|
||||
double val = m.get_coef(0, 0);
|
||||
...
|
||||
}
|
||||
|
||||
\end{ccExampleCode}
|
||||
|
||||
|
||||
\end{ccRefClass}
|
||||
|
||||
% +------------------------------------------------------------------------+
|
||||
%%RefPage: end of main body, begin of footer
|
||||
% EOF
|
||||
% +------------------------------------------------------------------------+
|
||||
|
||||
|
|
@ -1,149 +0,0 @@
|
|||
% +------------------------------------------------------------------------+
|
||||
% | Reference manual page: Taucs_symmetric_solver_traits.tex
|
||||
% +------------------------------------------------------------------------+
|
||||
% | 21.09.2005 Laurent Saboret, Pierre Alliez, Bruno Levy
|
||||
% | Package: Parameterization
|
||||
% |
|
||||
\RCSdef{\RCSTaucssymmetricsolvertraitsRev}{$Id$}
|
||||
\RCSdefDate{\RCSTaucssymmetricsolvertraitsDate}{$Date$}
|
||||
% |
|
||||
%%RefPage: end of header, begin of main body
|
||||
% +------------------------------------------------------------------------+
|
||||
|
||||
|
||||
\begin{ccRefClass}{Taucs_symmetric_solver_traits} %% add template arg's if necessary
|
||||
|
||||
%% \ccHtmlCrossLink{} %% add further rules for cross referencing links
|
||||
%% \ccHtmlIndexC[class]{} %% add further index entries
|
||||
|
||||
|
||||
\ccDefinition
|
||||
|
||||
% The section below is automatically generated. Do not edit!
|
||||
%START-AUTO(\ccDefinition)
|
||||
|
||||
The class Taucs\_symmetric\_solver\_traits is a traits class for solving SYMMETRIC DEFINIE POSITIVE sparse linear systems using TAUCS solvers family. The default solver is the Multifrontal Supernodal Cholesky Factorization.
|
||||
|
||||
\begin{description}
|
||||
\item[Todo]Add to Taucs\_symmetric\_solver\_traits the ability to solve linear systems in the least squares sense.\end{description}
|
||||
|
||||
%END-AUTO(\ccDefinition)
|
||||
|
||||
\ccInclude{CGAL/Taucs_solver_traits.h}
|
||||
|
||||
|
||||
\ccIsModel
|
||||
|
||||
% The section below is automatically generated. Do not edit!
|
||||
%START-AUTO(\ccIsModel)
|
||||
|
||||
Model of the SparseLinearAlgebraTraits\_d concept.
|
||||
|
||||
%END-AUTO(\ccIsModel)
|
||||
|
||||
|
||||
\ccParameters
|
||||
|
||||
The full template declaration is:
|
||||
|
||||
% The section below is automatically generated. Do not edit!
|
||||
%START-AUTO(\ccParameters)
|
||||
|
||||
template$<$ \\
|
||||
class T$>$ \\
|
||||
class Taucs\_symmetric\_solver\_traits;
|
||||
|
||||
%END-AUTO(\ccParameters)
|
||||
|
||||
|
||||
\ccTypes
|
||||
|
||||
% The section below is automatically generated. Do not edit!
|
||||
%START-AUTO(\ccTypes)
|
||||
|
||||
\ccNestedType{Matrix}
|
||||
{
|
||||
}
|
||||
\ccGlue
|
||||
\ccNestedType{Vector}
|
||||
{
|
||||
}
|
||||
\ccGlue
|
||||
\ccNestedType{NT}
|
||||
{
|
||||
}
|
||||
\ccGlue
|
||||
|
||||
%END-AUTO(\ccTypes)
|
||||
|
||||
|
||||
\ccCreation
|
||||
\ccCreationVariable{solver} %% choose variable name for \ccMethod
|
||||
|
||||
% The section below is automatically generated. Do not edit!
|
||||
%START-AUTO(\ccCreation)
|
||||
|
||||
\ccConstructor{Taucs_symmetric_solver_traits (const char * options[] = NULL, const void * arguments[] = NULL);}
|
||||
{
|
||||
Create a TAUCS sparse linear solver for SYMMETRIC DEFINIE POSITIVE matrices. The default solver is the Multifrontal Supernodal Cholesky Factorization. See taucs\_linsolve() documentation for the meaning of the 'options' and 'arguments' parameters.
|
||||
}
|
||||
\ccGlue
|
||||
\begin{description}
|
||||
\item[Parameters: ]
|
||||
\begin{description}
|
||||
\item[options]must be persistent \item[arguments]must be persistent \end{description}
|
||||
\end{description}
|
||||
\ccGlue
|
||||
|
||||
%END-AUTO(\ccCreation)
|
||||
|
||||
|
||||
\ccOperations
|
||||
|
||||
% The section below is automatically generated. Do not edit!
|
||||
%START-AUTO(\ccOperations)
|
||||
|
||||
\ccMethod{bool linear_solver (const Matrix & A, const Vector & B, Vector & X, NT & D);}
|
||||
{
|
||||
Solve the sparse linear system {\em A$\ast$X = B}. Return true on success. The solution is then (1/D) $\ast$ X.
|
||||
Preconditions:\begin{itemize}
|
||||
\item A.row\_dimension() == B.dimension().\item A.column\_dimension() == X.dimension(). \end{itemize}
|
||||
}
|
||||
\ccGlue
|
||||
\ccMethod{bool is_solvable (const Matrix & A, const Vector & B);}
|
||||
{
|
||||
Indicate if the linear system can be solved and if the matrix conditioning is good.
|
||||
Preconditions:\begin{itemize}
|
||||
\item A.row\_dimension() == B.dimension().\end{itemize}
|
||||
}
|
||||
\ccGlue
|
||||
\begin{description}
|
||||
\item[Todo]Implement Taucs\_symmetric\_solver\_traits::is\_solvable() by solving the system, then checking that $|$ $|$$|$A$\ast$X$|$$|$/$|$$|$B$|$$|$ - 1 $|$ $<$ epsilon. \end{description}
|
||||
\ccGlue
|
||||
|
||||
%END-AUTO(\ccOperations)
|
||||
|
||||
|
||||
\ccSeeAlso
|
||||
|
||||
\ccRefIdfierPage{CGAL::Taucs_solver_traits} \\
|
||||
\ccRefIdfierPage{CGAL::Taucs_matrix} \\
|
||||
\ccRefIdfierPage{CGAL::Taucs_symmetric_matrix} \\
|
||||
\ccRefIdfierPage{CGAL::Taucs_vector} \\
|
||||
\ccc{OpenNL::DefaultLinearSolverTraits} \\
|
||||
\ccc{OpenNL::SymmetricLinearSolverTraits} \\
|
||||
|
||||
|
||||
\ccExample
|
||||
|
||||
Currently, the Parameterization package creates non symmetric square linear
|
||||
systems, thus no example is available.
|
||||
|
||||
|
||||
\end{ccRefClass}
|
||||
|
||||
% +------------------------------------------------------------------------+
|
||||
%%RefPage: end of main body, begin of footer
|
||||
% EOF
|
||||
% +------------------------------------------------------------------------+
|
||||
|
||||
|
|
@ -1,161 +0,0 @@
|
|||
% +------------------------------------------------------------------------+
|
||||
% | Reference manual page: Taucs_vector.tex
|
||||
% +------------------------------------------------------------------------+
|
||||
% | 21.09.2005 Laurent Saboret, Pierre Alliez, Bruno Levy
|
||||
% | Package: Parameterization
|
||||
% |
|
||||
\RCSdef{\RCSTaucsvectorRev}{$Id$}
|
||||
\RCSdefDate{\RCSTaucsvectorDate}{$Date$}
|
||||
% |
|
||||
%%RefPage: end of header, begin of main body
|
||||
% +------------------------------------------------------------------------+
|
||||
|
||||
|
||||
\begin{ccRefClass}{Taucs_vector} %% add template arg's if necessary
|
||||
|
||||
%% \ccHtmlCrossLink{} %% add further rules for cross referencing links
|
||||
%% \ccHtmlIndexC[class]{} %% add further index entries
|
||||
|
||||
|
||||
\ccDefinition
|
||||
|
||||
% The section below is automatically generated. Do not edit!
|
||||
%START-AUTO(\ccDefinition)
|
||||
|
||||
The class Taucs\_vector is a C++ wrapper around TAUCS' vector type, which is a simple array.
|
||||
|
||||
%END-AUTO(\ccDefinition)
|
||||
|
||||
\ccInclude{CGAL/Taucs_vector.h}
|
||||
|
||||
|
||||
\ccIsModel
|
||||
|
||||
% The section below is automatically generated. Do not edit!
|
||||
%START-AUTO(\ccIsModel)
|
||||
|
||||
Model of the SparseLinearAlgebraTraits\_d::Vector concept.
|
||||
|
||||
%END-AUTO(\ccIsModel)
|
||||
|
||||
|
||||
\ccParameters
|
||||
|
||||
The full template declaration is:
|
||||
|
||||
% The section below is automatically generated. Do not edit!
|
||||
%START-AUTO(\ccParameters)
|
||||
|
||||
template$<$ \\
|
||||
class T$>$ \\
|
||||
class Taucs\_vector;
|
||||
|
||||
%END-AUTO(\ccParameters)
|
||||
|
||||
|
||||
\ccTypes
|
||||
|
||||
% The section below is automatically generated. Do not edit!
|
||||
%START-AUTO(\ccTypes)
|
||||
|
||||
\ccNestedType{NT}
|
||||
{
|
||||
}
|
||||
\ccGlue
|
||||
|
||||
%END-AUTO(\ccTypes)
|
||||
|
||||
|
||||
\ccCreation
|
||||
\ccCreationVariable{v} %% choose variable name for \ccMethod
|
||||
|
||||
% The section below is automatically generated. Do not edit!
|
||||
%START-AUTO(\ccCreation)
|
||||
|
||||
\ccConstructor{Taucs_vector (int dimension);}
|
||||
{
|
||||
Create a vector initialized with zeros.
|
||||
}
|
||||
\ccGlue
|
||||
\ccConstructor{Taucs_vector (const Taucs_vector< T > & toCopy);}
|
||||
{
|
||||
Copy constructor.
|
||||
}
|
||||
\ccGlue
|
||||
|
||||
%END-AUTO(\ccCreation)
|
||||
|
||||
|
||||
\ccOperations
|
||||
|
||||
% The section below is automatically generated. Do not edit!
|
||||
%START-AUTO(\ccOperations)
|
||||
|
||||
\ccMethod{Taucs_vector& operator= (const Taucs_vector< T > & toCopy);}
|
||||
{
|
||||
operator =()
|
||||
}
|
||||
\ccGlue
|
||||
\ccMethod{int dimension () const;}
|
||||
{
|
||||
Return the vector's number of coefficients.
|
||||
}
|
||||
\ccGlue
|
||||
\ccMethod{T operator[] (int i) const;}
|
||||
{
|
||||
Read/write access to 1 vector coefficient.
|
||||
Preconditions: 0 $<$= i $<$ dimension().
|
||||
}
|
||||
\ccGlue
|
||||
\ccMethod{T& operator[] (int i);}
|
||||
{
|
||||
}
|
||||
\ccGlue
|
||||
\ccMethod{const T* get_taucs_vector () const;}
|
||||
{
|
||||
Get TAUCS vector wrapped by this object.
|
||||
}
|
||||
\ccGlue
|
||||
\ccMethod{T* get_taucs_vector ();}
|
||||
{
|
||||
}
|
||||
\ccGlue
|
||||
|
||||
%END-AUTO(\ccOperations)
|
||||
|
||||
|
||||
\ccSeeAlso
|
||||
|
||||
\ccRefIdfierPage{CGAL::Taucs_solver_traits} \\
|
||||
\ccRefIdfierPage{CGAL::Taucs_symmetric_solver_traits} \\
|
||||
\ccRefIdfierPage{CGAL::Taucs_matrix} \\
|
||||
\ccRefIdfierPage{CGAL::Taucs_symmetric_matrix} \\
|
||||
\ccc{OpenNL::DefaultLinearSolverTraits} \\
|
||||
\ccc{OpenNL::SymmetricLinearSolverTraits} \\
|
||||
|
||||
|
||||
\ccExample
|
||||
|
||||
A Taucs\_vector object can be used as any array of floating points:
|
||||
|
||||
\begin{ccExampleCode}
|
||||
|
||||
typedef CGAL::Taucs_vector<double> Vector;
|
||||
|
||||
int main(int argc,char * argv[])
|
||||
{
|
||||
Vector v(100); // 100 elements
|
||||
v[0] = 4.3;
|
||||
...
|
||||
}
|
||||
|
||||
\end{ccExampleCode}
|
||||
|
||||
|
||||
\end{ccRefClass}
|
||||
|
||||
% +------------------------------------------------------------------------+
|
||||
%%RefPage: end of main body, begin of footer
|
||||
% EOF
|
||||
% +------------------------------------------------------------------------+
|
||||
|
||||
|
|
@ -1,165 +0,0 @@
|
|||
% +------------------------------------------------------------------------+
|
||||
% | Reference manual page: Two_vertices_parameterizer_3.tex
|
||||
% +------------------------------------------------------------------------+
|
||||
% | 21.09.2005 Laurent Saboret, Pierre Alliez, Bruno Levy
|
||||
% | Package: Parameterization
|
||||
% |
|
||||
\RCSdef{\RCSTwoverticesparameterizerRev}{$Id$}
|
||||
\RCSdefDate{\RCSTwoverticesparameterizerDate}{$Date$}
|
||||
% |
|
||||
%%RefPage: end of header, begin of main body
|
||||
% +------------------------------------------------------------------------+
|
||||
|
||||
|
||||
\begin{ccRefClass}{Two_vertices_parameterizer_3} %% add template arg's if necessary
|
||||
|
||||
%% \ccHtmlCrossLink{} %% add further rules for cross referencing links
|
||||
%% \ccHtmlIndexC[class]{} %% add further index entries
|
||||
|
||||
|
||||
\ccDefinition
|
||||
|
||||
Two\_vertices\_parameterizer\_3 is the default border parameterizer
|
||||
for Least Squares Conformal Maps parameterization.
|
||||
|
||||
% The section below is automatically generated. Do not edit!
|
||||
%START-AUTO(\ccDefinition)
|
||||
|
||||
The class Two\_vertices\_parameterizer\_3 parameterizes 2 extreme vertices of a 3D surface. This kind of border parameterization is used by free border parameterizations.
|
||||
|
||||
Implementation note: To simplify the implementation, BorderParameterizer\_3 models know only the ParameterizationMesh\_3 class. They do not know the parameterization algorithm requirements nor the kind of sparse linear system used.
|
||||
|
||||
%END-AUTO(\ccDefinition)
|
||||
|
||||
\ccInclude{CGAL/Two_vertices_parameterizer_3.h}
|
||||
|
||||
|
||||
\ccIsModel
|
||||
|
||||
% The section below is automatically generated. Do not edit!
|
||||
%START-AUTO(\ccIsModel)
|
||||
|
||||
Model of the BorderParameterizer\_3 concept.
|
||||
|
||||
%END-AUTO(\ccIsModel)
|
||||
|
||||
|
||||
\ccHeading{Design Pattern}
|
||||
|
||||
% The section below is automatically generated. Do not edit!
|
||||
%START-AUTO(\ccHeading{Design Pattern})
|
||||
|
||||
BorderParameterizer\_3 models are Strategies \cite{cgal:ghjv-dpero-95}: they implement a strategy of border parameterization for models of ParameterizationMesh\_3.
|
||||
|
||||
%END-AUTO(\ccHeading{Design Pattern})
|
||||
|
||||
|
||||
\ccParameters
|
||||
|
||||
The full template declaration is:
|
||||
|
||||
% The section below is automatically generated. Do not edit!
|
||||
%START-AUTO(\ccParameters)
|
||||
|
||||
template$<$ \\
|
||||
class ParameterizationMesh\_3$>$ \\
|
||||
class Two\_vertices\_parameterizer\_3;
|
||||
|
||||
%END-AUTO(\ccParameters)
|
||||
|
||||
|
||||
\ccTypes
|
||||
|
||||
% The section below is automatically generated. Do not edit!
|
||||
%START-AUTO(\ccTypes)
|
||||
|
||||
\ccNestedType{Adaptor}
|
||||
{
|
||||
Export ParameterizationMesh\_3 template parameter.
|
||||
}
|
||||
\ccGlue
|
||||
|
||||
%END-AUTO(\ccTypes)
|
||||
|
||||
|
||||
\ccCreation
|
||||
\ccCreationVariable{bp} %% choose variable name for \ccMethod
|
||||
|
||||
\ccConstructor{Two_vertices_parameterizer_3();}{default constructor.}
|
||||
|
||||
% The section below is automatically generated. Do not edit!
|
||||
%START-AUTO(\ccCreation)
|
||||
|
||||
|
||||
|
||||
%END-AUTO(\ccCreation)
|
||||
|
||||
|
||||
\ccOperations
|
||||
|
||||
% The section below is automatically generated. Do not edit!
|
||||
%START-AUTO(\ccOperations)
|
||||
|
||||
\ccMethod{Parameterizer_traits_3< Adaptor >::Error_code parameterize_border (Adaptor * mesh);}
|
||||
{
|
||||
Map 2 extreme vertices of the 3D mesh and mark them as {\em parameterized}.
|
||||
Map 2 extreme vertices of the 3D mesh and mark them as {\em parameterized}. Return false on error.
|
||||
}
|
||||
\ccGlue
|
||||
\ccMethod{bool is_border_convex ();}
|
||||
{
|
||||
Indicate if border's shape is convex. Meaningless for free border parameterization algorithms.
|
||||
}
|
||||
\ccGlue
|
||||
|
||||
%END-AUTO(\ccOperations)
|
||||
|
||||
|
||||
\ccSeeAlso
|
||||
|
||||
\ccRefIdfierPage{CGAL::Circular_border_arc_length_parameterizer_3} \\
|
||||
\ccRefIdfierPage{CGAL::Circular_border_uniform_parameterizer_3} \\
|
||||
\ccRefIdfierPage{CGAL::Square_border_arc_length_parameterizer_3} \\
|
||||
\ccRefIdfierPage{CGAL::Square_border_uniform_parameterizer_3} \\
|
||||
|
||||
|
||||
\ccExample
|
||||
|
||||
\begin{ccExampleCode}
|
||||
|
||||
// CGAL kernel
|
||||
typedef CGAL::Cartesian<double> Kernel;
|
||||
|
||||
// Mesh true type and parameterization adaptor
|
||||
typedef CGAL::Polyhedron_3<Kernel> Polyhedron;
|
||||
typedef CGAL::Parameterization_polyhedron_adaptor_3<Polyhedron>
|
||||
Parameterization_polyhedron_adaptor;
|
||||
|
||||
// Least Squares Conformal Maps parameterization with
|
||||
// the default border parameterization: Two_vertices_parameterizer_3
|
||||
typedef CGAL::LSCM_parameterizer_3<Parameterization_polyhedron_adaptor>
|
||||
Parameterizer;
|
||||
|
||||
int main(int argc,char * argv[])
|
||||
{
|
||||
Polyhedron mesh;
|
||||
...
|
||||
|
||||
// The parameterization package needs an adaptor to handle Polyhedron_3 meshes
|
||||
// The mesh must be a topological disk
|
||||
Parameterization_polyhedron_adaptor mesh_adaptor(&mesh);
|
||||
|
||||
Parameterizer::Error_code err = CGAL::parameterize(&mesh_adaptor, Parameterizer());
|
||||
...
|
||||
}
|
||||
|
||||
\end{ccExampleCode}
|
||||
|
||||
|
||||
\end{ccRefClass}
|
||||
|
||||
% +------------------------------------------------------------------------+
|
||||
%%RefPage: end of main body, begin of footer
|
||||
% EOF
|
||||
% +------------------------------------------------------------------------+
|
||||
|
||||
|
|
@ -1,119 +0,0 @@
|
|||
% +------------------------------------------------------------------------+
|
||||
% | Reference manual page: Vector.tex
|
||||
% +------------------------------------------------------------------------+
|
||||
% | 21.09.2005 Laurent Saboret, Pierre Alliez, Bruno Levy
|
||||
% | Package: Parameterization
|
||||
% |
|
||||
\RCSdef{\RCSVectorRev}{$Id$}
|
||||
\RCSdefDate{\RCSVectorDate}{$Date$}
|
||||
% |
|
||||
%%RefPage: end of header, begin of main body
|
||||
% +------------------------------------------------------------------------+
|
||||
|
||||
|
||||
\begin{ccRefConcept}[SparseLinearAlgebra_d::]{Vector}
|
||||
|
||||
%% \ccHtmlCrossLink{} %% add further rules for cross referencing links
|
||||
%% \ccHtmlIndexC[concept]{} %% add further index entries
|
||||
|
||||
|
||||
\ccDefinition
|
||||
|
||||
% The section below is automatically generated. Do not edit!
|
||||
%START-AUTO(\ccDefinition)
|
||||
|
||||
SparseLinearAlgebraTraits\_d::Vector is a concept of a vector that can be multiplied by a sparse matrix.
|
||||
|
||||
%END-AUTO(\ccDefinition)
|
||||
|
||||
\ccRefines
|
||||
|
||||
% The section below is automatically generated. Do not edit!
|
||||
%START-AUTO(\ccRefines)
|
||||
|
||||
This is a sub-concept of LinearAlgebraTraits\_d::Vector.
|
||||
|
||||
%END-AUTO(\ccRefines)
|
||||
|
||||
|
||||
\ccTypes
|
||||
|
||||
% The section below is automatically generated. Do not edit!
|
||||
%START-AUTO(\ccTypes)
|
||||
|
||||
\ccNestedType{NT}
|
||||
{
|
||||
}
|
||||
\ccGlue
|
||||
|
||||
%END-AUTO(\ccTypes)
|
||||
|
||||
|
||||
\ccCreation
|
||||
\ccCreationVariable{v} %% variable name for \ccMethod
|
||||
|
||||
% The section below is automatically generated. Do not edit!
|
||||
%START-AUTO(\ccCreation)
|
||||
|
||||
\ccConstructor{Vector (int rows);}
|
||||
{
|
||||
Create a vector initialized with zeros.
|
||||
}
|
||||
\ccGlue
|
||||
\ccConstructor{Vector (const Vector & toCopy);}
|
||||
{
|
||||
Copy constructor.
|
||||
}
|
||||
\ccGlue
|
||||
|
||||
%END-AUTO(\ccCreation)
|
||||
|
||||
|
||||
\ccOperations
|
||||
|
||||
% The section below is automatically generated. Do not edit!
|
||||
%START-AUTO(\ccOperations)
|
||||
|
||||
\ccMethod{Vector& operator= (const Vector & toCopy);}
|
||||
{
|
||||
operator =()
|
||||
}
|
||||
\ccGlue
|
||||
\ccMethod{int dimension () const;}
|
||||
{
|
||||
Return the vector's number of coefficients.
|
||||
}
|
||||
\ccGlue
|
||||
\ccMethod{NT operator[] (int row) const;}
|
||||
{
|
||||
Read/write access to 1 vector coefficient.
|
||||
Precondition: 0 $<$= row $<$ dimension().
|
||||
}
|
||||
\ccGlue
|
||||
\ccMethod{NT& operator[] (int row);}
|
||||
{
|
||||
}
|
||||
\ccGlue
|
||||
|
||||
%END-AUTO(\ccOperations)
|
||||
|
||||
|
||||
\ccHasModels
|
||||
|
||||
\ccRefIdfierPage{CGAL::Taucs_vector} \\
|
||||
\ccc{OpenNL::FullVector} \\
|
||||
|
||||
|
||||
\ccSeeAlso
|
||||
|
||||
\ccRefIdfierPage{SparseLinearAlgebraTraits_d} \\
|
||||
\ccRefIdfierPage{SparseLinearAlgebraTraits_d::Matrix} \\
|
||||
|
||||
|
||||
\end{ccRefConcept}
|
||||
|
||||
% +------------------------------------------------------------------------+
|
||||
%%RefPage: end of main body, begin of footer
|
||||
% EOF
|
||||
% +------------------------------------------------------------------------+
|
||||
|
||||
|
|
@ -1,252 +0,0 @@
|
|||
% +------------------------------------------------------------------------+
|
||||
% | Reference manual page: Parameterization/intro.tex
|
||||
% +------------------------------------------------------------------------+
|
||||
% | 08.22.2005 Laurent Saboret, Pierre Alliez, Bruno Levy
|
||||
% | Package: Parameterization
|
||||
% |
|
||||
% |
|
||||
% +------------------------------------------------------------------------+
|
||||
|
||||
%\clearpage
|
||||
%\section{Reference Pages for Planar Parameterization of Triangulated Surface Meshes}
|
||||
\chapter{Planar Parameterization of Triangulated Surface Meshes}
|
||||
\label{chap:parameterization_ref}
|
||||
\ccChapterAuthor{Laurent Saboret, Pierre Alliez \and Bruno Levy}
|
||||
|
||||
% pierre: replace border by boundary
|
||||
% laurent: Andreas asked to replace boundary by border everywhere...
|
||||
|
||||
|
||||
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.
|
||||
|
||||
\ccHeading{Parameterization methods}
|
||||
|
||||
This \cgal\ package implements some of
|
||||
the state-of-the-art parameterization methods:
|
||||
|
||||
\begin{itemize}
|
||||
|
||||
\item Fixed border:
|
||||
|
||||
\begin{itemize}
|
||||
|
||||
\item Tutte Barycentric Mapping \cite{t-hdg-63}.
|
||||
One-to-one mapping is guaranteed for convex border.
|
||||
|
||||
\item Floater Mean Value Coordinates \cite{cgal:f-mvc-03}.
|
||||
One-to-one mapping is guaranteed for convex border.
|
||||
|
||||
\item Discrete Conformal Map \cite{cgal:eddhls-maam-95}.
|
||||
Conditionally guaranteed if all weights are positive and border is convex.
|
||||
|
||||
\item Discrete Authalic parameterization \cite{cgal:dma-ipsm-02}.
|
||||
Conditionally guaranteed if all weights are positive and border is convex.
|
||||
|
||||
\end{itemize}
|
||||
|
||||
\item Free border:
|
||||
|
||||
\begin{itemize}
|
||||
|
||||
\item Least Squares Conformal Maps \cite{cgal:lprm-lscm-02}.
|
||||
|
||||
\item Natural Conformal Map \cite{cgal:dma-ipsm-02}.
|
||||
|
||||
\end{itemize}
|
||||
|
||||
\end{itemize}
|
||||
|
||||
|
||||
\ccHeading{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:
|
||||
\begin{itemize}
|
||||
|
||||
\item For free border methods: at least two constraints (the pinned
|
||||
vertices). They have to be on the specified border.
|
||||
|
||||
\item For fixed border methods:
|
||||
|
||||
\begin{itemize}
|
||||
|
||||
\item the user can select a border
|
||||
parameterization among two common methods: uniform or
|
||||
arc-length parameterization.
|
||||
|
||||
\item one convex shape specified by:
|
||||
|
||||
\begin{itemize}
|
||||
|
||||
\item one shape among a set of standard ones (circle, square).
|
||||
|
||||
\item a convex polygon.
|
||||
|
||||
\end{itemize}
|
||||
|
||||
\end{itemize}
|
||||
|
||||
\end{itemize}
|
||||
|
||||
|
||||
\ccHeading{Mesh}
|
||||
|
||||
The general definition of input meshes handled by the package is:
|
||||
|
||||
\begin{itemize}
|
||||
|
||||
\item Triangulated
|
||||
|
||||
\item 2-manifold
|
||||
|
||||
\item Oriented.
|
||||
|
||||
\item Surface parameterization methods deal only with topological discs.
|
||||
The input mesh can be of any genus and have any number of connected components.
|
||||
If it is not a topological disc, it has to come with a description of a border
|
||||
(a list of vertices) which is the border of a topological disc.
|
||||
If no border is given, we assume that the surface border
|
||||
is the longest border already in the input mesh (the other borders will
|
||||
be considered as holes).
|
||||
|
||||
The package will only parameterize the inside part of the given border,
|
||||
thus only one connected component.
|
||||
|
||||
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.
|
||||
|
||||
\end{itemize}
|
||||
|
||||
The package proposes
|
||||
an interface with both the 2D Triangulation Data Structure enriched
|
||||
with 3D points (not yet implemented) and the Polyhedron.
|
||||
|
||||
The \cgal\ parameterization package is loosely linked to the
|
||||
mesh data structure. Replacing it is relatively easy.
|
||||
|
||||
|
||||
\ccHeading{Output}
|
||||
|
||||
One uv coordinate for each interior vertex, and one uv coordinate for
|
||||
each instance of a vertex along the input border.
|
||||
|
||||
|
||||
\ccHeading{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:
|
||||
\begin{itemize}
|
||||
\item OpenNL (Bruno L{\'e}vy) is shipped with \cgal. This is the default solver.
|
||||
\item TAUCS is a state-of-the-art direct solver for sparse symmetric matrices.
|
||||
\item SuperLU is a state-of-the-art direct solver for sparse unsymmetric matrices (not yet implemented).
|
||||
\end{itemize}
|
||||
|
||||
The \cgal\ parameterization package is loosely linked to the
|
||||
solver. Replacing it is easy.
|
||||
|
||||
|
||||
\ccHeading{Assertions}
|
||||
|
||||
The assertion flags for the package
|
||||
use \ccc{PARAMETERIZATION} in their names (\textit{e.g.},
|
||||
\ccc{CGAL_PARAMETERIZATION_NO_ASSERTIONS}).
|
||||
|
||||
For \emph{fixed} border parameterizations:
|
||||
\begin{itemize}
|
||||
\item Preconditions:
|
||||
\begin{itemize}
|
||||
\item check that the border is mapped onto a convex polygon.
|
||||
\item check that the input mesh is triangular (expensive check).
|
||||
\item check that the input mesh is a surface with 1 connected component (expensive check).
|
||||
\end{itemize}
|
||||
\item Postconditions:
|
||||
\begin{itemize}
|
||||
\item check one-to-one mapping.
|
||||
\item check if the linear system was solved with a good conditioning (expensive check).
|
||||
\end{itemize}
|
||||
\end{itemize}
|
||||
|
||||
For \emph{free} border parameterizations:
|
||||
\begin{itemize}
|
||||
\item Preconditions:
|
||||
\begin{itemize}
|
||||
\item check that the input mesh is triangular (expensive check).
|
||||
\item check that the input mesh is a surface with 1 connected component (expensive check).
|
||||
\end{itemize}
|
||||
\item Postconditions:
|
||||
\begin{itemize}
|
||||
\item check one-to-one mapping.
|
||||
\item check if the linear system was solved with a good conditioning (expensive check, not yet implemented).
|
||||
\end{itemize}
|
||||
\end{itemize}
|
||||
|
||||
Expensive checking is off by default. It can be enabled by
|
||||
defining \ccc{CGAL_PARAMETERIZATION_CHECK_EXPENSIVE}.
|
||||
|
||||
|
||||
\ccHeading{Concepts}
|
||||
|
||||
\ccRefIdfierPage{ParameterizerTraits_3} \\
|
||||
\ccRefIdfierPage{BorderParameterizer_3} \\
|
||||
\ccRefIdfierPage{ParameterizationMesh_3} \\
|
||||
\ccRefIdfierPage{ParameterizationPatchableMesh_3} \\
|
||||
\ccRefIdfierPage{SparseLinearAlgebraTraits_d} \\
|
||||
|
||||
|
||||
\ccHeading{Parameterization Methods Traits Classes}
|
||||
|
||||
\ccRefIdfierPage{CGAL::Parameterizer_traits_3} \\
|
||||
\ccRefIdfierPage{CGAL::Fixed_border_parameterizer_3} \\
|
||||
\ccRefIdfierPage{CGAL::Barycentric_mapping_parameterizer_3} \\
|
||||
\ccRefIdfierPage{CGAL::Discrete_authalic_parameterizer_3} \\
|
||||
\ccRefIdfierPage{CGAL::Discrete_conformal_map_parameterizer_3} \\
|
||||
\ccRefIdfierPage{CGAL::LSCM_parameterizer_3} \\
|
||||
\ccRefIdfierPage{CGAL::Mean_value_coordinates_parameterizer_3} \\
|
||||
|
||||
|
||||
\ccHeading{Border Parameterization Methods Traits Classes}
|
||||
|
||||
\ccRefIdfierPage{CGAL::Circular_border_arc_length_parameterizer_3} \\
|
||||
\ccRefIdfierPage{CGAL::Circular_border_uniform_parameterizer_3} \\
|
||||
\ccRefIdfierPage{CGAL::Square_border_arc_length_parameterizer_3} \\
|
||||
\ccRefIdfierPage{CGAL::Square_border_uniform_parameterizer_3} \\
|
||||
\ccRefIdfierPage{CGAL::Two_vertices_parameterizer_3} \\
|
||||
|
||||
|
||||
\ccHeading{MeshAdaptor\_3 and PatchableMeshAdaptor\_3 Traits Classes}
|
||||
|
||||
\ccRefIdfierPage{CGAL::Parameterization_polyhedron_adaptor_3} \\
|
||||
\ccRefIdfierPage{CGAL::Parameterization_mesh_patch_3} \\
|
||||
|
||||
|
||||
\ccHeading{Sparse Linear Algebra Traits Classes}
|
||||
|
||||
\ccRefIdfierPage{CGAL::Taucs_solver_traits} \\
|
||||
\ccRefIdfierPage{CGAL::Taucs_symmetric_solver_traits} \\
|
||||
\ccc{OpenNL::DefaultLinearSolverTraits} \\
|
||||
\ccc{OpenNL::SymmetricLinearSolverTraits} \\
|
||||
|
||||
|
||||
\ccHeading{Helper Classes}
|
||||
|
||||
\ccRefIdfierPage{CGAL::Parameterization_mesh_feature_extractor} \\
|
||||
|
||||
|
||||
\ccHeading{Functions}
|
||||
|
||||
\ccRefIdfierPage{CGAL::parameterize} \\
|
||||
|
||||
|
||||
\clearpage
|
||||
|
||||
\lcHtml{\ccHeading{Alphabetical Listing of Reference Pages}}
|
||||
|
|
@ -1,41 +0,0 @@
|
|||
% +------------------------------------------------------------------------+
|
||||
% | CBP Reference Manual: main.tex
|
||||
% +------------------------------------------------------------------------+
|
||||
% | Automatically generated driver file for the reference manual chapter
|
||||
% | of this package. Do not edit manually, you may loose your changes.
|
||||
% +------------------------------------------------------------------------+
|
||||
|
||||
\input{Parameterization_ref/intro.tex}
|
||||
|
||||
\input{Parameterization_ref/Barycentric_mapping_parameterizer_3.tex}
|
||||
\input{Parameterization_ref/BorderParameterizer_3.tex}
|
||||
\input{Parameterization_ref/Circular_border_arc_length_parameterizer_3.tex}
|
||||
\input{Parameterization_ref/Circular_border_parameterizer_3.tex}
|
||||
\input{Parameterization_ref/Circular_border_uniform_parameterizer_3.tex}
|
||||
\input{Parameterization_ref/Discrete_authalic_parameterizer_3.tex}
|
||||
\input{Parameterization_ref/Discrete_conformal_map_parameterizer_3.tex}
|
||||
\input{Parameterization_ref/Fixed_border_parameterizer_3.tex}
|
||||
\input{Parameterization_ref/LSCM_parameterizer_3.tex}
|
||||
\input{Parameterization_ref/Matrix.tex}
|
||||
\input{Parameterization_ref/Mean_value_coordinates_parameterizer_3.tex}
|
||||
\input{Parameterization_ref/parameterize.tex}
|
||||
\input{Parameterization_ref/ParameterizationMesh_3.tex}
|
||||
\input{Parameterization_ref/ParameterizationPatchableMesh_3.tex}
|
||||
\input{Parameterization_ref/Parameterization_mesh_feature_extractor.tex}
|
||||
\input{Parameterization_ref/Parameterization_mesh_patch_3.tex}
|
||||
\input{Parameterization_ref/Parameterization_polyhedron_adaptor_3.tex}
|
||||
\input{Parameterization_ref/ParameterizerTraits_3.tex}
|
||||
\input{Parameterization_ref/Parameterizer_traits_3.tex}
|
||||
\input{Parameterization_ref/SparseLinearAlgebraTraits_d.tex}
|
||||
\input{Parameterization_ref/Square_border_arc_length_parameterizer_3.tex}
|
||||
\input{Parameterization_ref/Square_border_parameterizer_3.tex}
|
||||
\input{Parameterization_ref/Square_border_uniform_parameterizer_3.tex}
|
||||
\input{Parameterization_ref/Taucs_matrix.tex}
|
||||
\input{Parameterization_ref/Taucs_solver_traits.tex}
|
||||
\input{Parameterization_ref/Taucs_symmetric_matrix.tex}
|
||||
\input{Parameterization_ref/Taucs_symmetric_solver_traits.tex}
|
||||
\input{Parameterization_ref/Taucs_vector.tex}
|
||||
\input{Parameterization_ref/Two_vertices_parameterizer_3.tex}
|
||||
\input{Parameterization_ref/Vector.tex}
|
||||
|
||||
%% EOF
|
||||
|
|
@ -1,104 +0,0 @@
|
|||
% +------------------------------------------------------------------------+
|
||||
% | Reference manual page: parameterize.tex
|
||||
% +------------------------------------------------------------------------+
|
||||
% | 23.09.2005 Laurent Saboret, Pierre Alliez, Bruno Levy
|
||||
% | Package: parameterization
|
||||
% |
|
||||
\RCSdef{\RCSparameterizeRev}{$Id$}
|
||||
\RCSdefDate{\RCSparameterizeDate}{$Date$}
|
||||
% |
|
||||
%%RefPage: end of header, begin of main body
|
||||
% +------------------------------------------------------------------------+
|
||||
|
||||
|
||||
\begin{ccRefFunction}{parameterize} %% add template arg's if necessary
|
||||
|
||||
%% \ccHtmlCrossLink{} %% add further rules for cross referencing links
|
||||
%% \ccHtmlIndexC[function]{} %% add further index entries
|
||||
|
||||
|
||||
\ccDefinition
|
||||
|
||||
\ccc{parameterize()} is the main entry-point of the Parameterization package.
|
||||
|
||||
It computes a 1 to 1 mapping from a triangular 3D surface 'mesh' to a piece of the 2D space.
|
||||
The mapping is linear by pieces (linear in each triangle).
|
||||
The result is the (u,v) pair image of each vertex of the 3D surface.
|
||||
1 to 1 mapping may be guaranteed or not, depending of the algorithm chosen.
|
||||
|
||||
\ccInclude{CGAL/parameterize.h}
|
||||
|
||||
% The section below is automatically generated. Do not edit!
|
||||
%START-AUTO(\ccDefinition)
|
||||
|
||||
\ccFunction{Parameterizer_traits_3<ParameterizationMesh_3>::Error_code parameterize (ParameterizationMesh_3 * mesh);}
|
||||
{
|
||||
Compute a 1 to 1 mapping from a triangular 3D surface 'mesh' to 2D circle, using Floater Mean Value Coordinates algorithm. 1 to 1 mapping is guaranteed.
|
||||
The mapping is linear by pieces (linear in each triangle). The result is the (u,v) pair image of each vertex of the 3D surface.
|
||||
Preconditions:\begin{itemize}
|
||||
\item 'mesh' must be a surface with 1 connected component.\item 'mesh' must be a triangular mesh.\end{itemize}
|
||||
}
|
||||
\ccGlue
|
||||
\begin{description}
|
||||
\item[Parameters: ]
|
||||
\begin{description}
|
||||
\item[mesh]3D mesh, model of ParameterizationMesh\_3 concept \end{description}
|
||||
\end{description}
|
||||
\ccGlue
|
||||
\ccFunction{Parameterizer_traits_3<ParameterizationMesh_3>::Error_code parameterize (ParameterizationMesh_3 * mesh, ParameterizerTraits_3 parameterizer);}
|
||||
{
|
||||
Compute a 1 to 1 mapping from a triangular 3D surface 'mesh' to a piece of the 2D space. The mapping is linear by pieces (linear in each triangle). The result is the (u,v) pair image of each vertex of the 3D surface.
|
||||
1 to 1 mapping may be guaranteed or not, depending of ParameterizerTraits\_3 algorithm chosen.
|
||||
Preconditions:\begin{itemize}
|
||||
\item 'mesh' must be a surface with 1 connected component.\item 'mesh' must be a triangular mesh.\item the mesh border must be mapped onto a convex polygon (for fixed border parameterizations).\end{itemize}
|
||||
}
|
||||
\ccGlue
|
||||
\begin{description}
|
||||
\item[Parameters: ]
|
||||
\begin{description}
|
||||
\item[mesh]3D mesh, model of ParameterizationMesh\_3 \item[parameterizer]Parameterization method for 'mesh' \end{description}
|
||||
\end{description}
|
||||
\ccGlue
|
||||
|
||||
%END-AUTO(\ccDefinition)
|
||||
|
||||
|
||||
\ccParameters
|
||||
|
||||
The full template declaration is:
|
||||
|
||||
% The section below is automatically generated. Do not edit!
|
||||
%START-AUTO(\ccParameters)
|
||||
|
||||
|
||||
|
||||
%END-AUTO(\ccParameters)
|
||||
|
||||
|
||||
\ccSeeAlso
|
||||
|
||||
\ccRefIdfierPage{CGAL::Barycentric_mapping_parameterizer_3} \\
|
||||
\ccRefIdfierPage{CGAL::Discrete_authalic_parameterizer_3} \\
|
||||
\ccRefIdfierPage{CGAL::Discrete_conformal_map_parameterizer_3} \\
|
||||
\ccRefIdfierPage{CGAL::LSCM_parameterizer_3} \\
|
||||
\ccRefIdfierPage{CGAL::Mean_value_coordinates_parameterizer_3} \\
|
||||
|
||||
|
||||
\ccExample
|
||||
|
||||
See \ccc{Simple_parameterization.C} example.
|
||||
|
||||
|
||||
\ccImplementation
|
||||
|
||||
This function simply calls the parameterize() method of the parameterization
|
||||
algorithm chosen.
|
||||
|
||||
|
||||
\end{ccRefFunction}
|
||||
|
||||
% +------------------------------------------------------------------------+
|
||||
%%RefPage: end of main body, begin of footer
|
||||
% EOF
|
||||
% +------------------------------------------------------------------------+
|
||||
|
||||
|
|
@ -1,2 +0,0 @@
|
|||
doc
|
||||
|
||||
|
|
@ -1,109 +0,0 @@
|
|||
// Authalic_parameterization.C
|
||||
|
||||
#include "short_names.h" // must be included first
|
||||
|
||||
#include <CGAL/Cartesian.h>
|
||||
#include <CGAL/Polyhedron_3.h>
|
||||
#include <CGAL/IO/Polyhedron_iostream.h>
|
||||
#include <CGAL/Parameterization_polyhedron_adaptor_3.h>
|
||||
#include <CGAL/parameterize.h>
|
||||
#include <CGAL/Discrete_authalic_parameterizer_3.h>
|
||||
|
||||
#include <iostream>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <fstream>
|
||||
#include <cassert>
|
||||
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Private types
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
typedef CGAL::Cartesian<double> Kernel;
|
||||
typedef CGAL::Polyhedron_3<Kernel> Polyhedron;
|
||||
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// main()
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
int main(int argc,char * argv[])
|
||||
{
|
||||
std::cerr << "PARAMETERIZATION" << std::endl;
|
||||
std::cerr << " Discrete Authalic Parameterization" << std::endl;
|
||||
std::cerr << " circle border" << std::endl;
|
||||
std::cerr << " OpenNL solver" << std::endl;
|
||||
|
||||
//***************************************
|
||||
// decode parameters
|
||||
//***************************************
|
||||
|
||||
if (argc-1 != 1)
|
||||
{
|
||||
std::cerr << "Usage: " << argv[0] << " input_file.off" << std::endl;
|
||||
return(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
// File name is:
|
||||
const char* input_filename = argv[1];
|
||||
|
||||
//***************************************
|
||||
// Read the mesh
|
||||
//***************************************
|
||||
|
||||
// Read the mesh
|
||||
std::ifstream stream(input_filename);
|
||||
if(!stream)
|
||||
{
|
||||
std::cerr << "FATAL ERROR: cannot open file " << input_filename << std::endl;
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
Polyhedron mesh;
|
||||
stream >> mesh;
|
||||
|
||||
//***************************************
|
||||
// Create mesh adaptor
|
||||
// Note: parameterization methods support only
|
||||
// meshes that are topological disks
|
||||
//***************************************
|
||||
|
||||
// The parameterization package needs an adaptor to handle Polyhedron_3 meshes
|
||||
typedef CGAL::Parameterization_polyhedron_adaptor_3<Polyhedron>
|
||||
Parameterization_polyhedron_adaptor;
|
||||
Parameterization_polyhedron_adaptor mesh_adaptor(&mesh);
|
||||
|
||||
//***************************************
|
||||
// Discrete Authalic Parameterization
|
||||
//***************************************
|
||||
|
||||
typedef CGAL::Discrete_authalic_parameterizer_3<Parameterization_polyhedron_adaptor>
|
||||
Parameterizer;
|
||||
|
||||
Parameterizer::Error_code err = CGAL::parameterize(&mesh_adaptor, Parameterizer());
|
||||
if (err != Parameterizer::OK)
|
||||
std::cerr << "FATAL ERROR: " << Parameterizer::get_error_message(err) << std::endl;
|
||||
|
||||
//***************************************
|
||||
// Output
|
||||
//***************************************
|
||||
|
||||
if (err == Parameterizer::OK)
|
||||
{
|
||||
// Raw output: dump (u,v) pairs
|
||||
Polyhedron::Vertex_const_iterator pVertex;
|
||||
for (pVertex = mesh.vertices_begin();
|
||||
pVertex != mesh.vertices_end();
|
||||
pVertex++)
|
||||
{
|
||||
// (u,v) pair is stored in any halfedge
|
||||
double u = mesh_adaptor.info(pVertex->halfedge())->uv().x();
|
||||
double v = mesh_adaptor.info(pVertex->halfedge())->uv().y();
|
||||
std::cout << "(u,v) = (" << u << "," << v << ")" << std::endl;
|
||||
}
|
||||
}
|
||||
|
||||
return (err == Parameterizer::OK) ? EXIT_SUCCESS : EXIT_FAILURE;
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -1 +0,0 @@
|
|||
data/holes.off
|
||||
|
|
@ -1,216 +0,0 @@
|
|||
<?xml version="1.0" encoding="Windows-1252"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="7.10"
|
||||
Name="Authalic_parameterization"
|
||||
ProjectGUID="{E2A5087B-4619-4EDD-A6BA-5655F62BA4FE}"
|
||||
Keyword="Win32Proj">
|
||||
<Platforms>
|
||||
<Platform
|
||||
Name="Win32"/>
|
||||
</Platforms>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="Debug|Win32"
|
||||
OutputDirectory="Debug"
|
||||
IntermediateDirectory="Debug"
|
||||
ConfigurationType="1"
|
||||
CharacterSet="0">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
ImproveFloatingPointConsistency="TRUE"
|
||||
AdditionalIncludeDirectories=".\include;..\..\include;..\..\..\OpenNL\include;"$(CGALROOT)\include\CGAL\config\msvc7";"$(CGALROOT)\include""
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;CGAL_PARAMETERIZATION_CHECK_EXPENSIVE;CGAL_USE_GMP"
|
||||
MinimalRebuild="TRUE"
|
||||
BasicRuntimeChecks="0"
|
||||
RuntimeLibrary="5"
|
||||
BufferSecurityCheck="FALSE"
|
||||
DisableLanguageExtensions="FALSE"
|
||||
ForceConformanceInForLoopScope="FALSE"
|
||||
RuntimeTypeInfo="TRUE"
|
||||
UsePrecompiledHeader="0"
|
||||
BrowseInformation="1"
|
||||
WarningLevel="2"
|
||||
Detect64BitPortabilityProblems="FALSE"
|
||||
DebugInformationFormat="4"
|
||||
ShowIncludes="FALSE"/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalOptions="CGAL_debug.lib gmp.lib"
|
||||
OutputFile="$(OutDir)/Authalic_parameterization.exe"
|
||||
LinkIncremental="2"
|
||||
AdditionalLibraryDirectories=""$(CGALROOT)\lib\msvc7""
|
||||
GenerateDebugInformation="TRUE"
|
||||
ProgramDatabaseFile="$(OutDir)/$(ProjectName).pdb"
|
||||
SubSystem="1"
|
||||
TargetMachine="1"/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"/>
|
||||
<Tool
|
||||
Name="VCManagedWrapperGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
OutputDirectory="Release"
|
||||
IntermediateDirectory="Release"
|
||||
ConfigurationType="1"
|
||||
CharacterSet="0">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalOptions="/Og-"
|
||||
Optimization="2"
|
||||
GlobalOptimizations="TRUE"
|
||||
EnableIntrinsicFunctions="TRUE"
|
||||
ImproveFloatingPointConsistency="TRUE"
|
||||
FavorSizeOrSpeed="1"
|
||||
OptimizeForProcessor="3"
|
||||
OptimizeForWindowsApplication="TRUE"
|
||||
AdditionalIncludeDirectories=".\include;..\..\include;..\..\..\OpenNL\include;"$(CGALROOT)\include\CGAL\config\msvc7";"$(CGALROOT)\include""
|
||||
PreprocessorDefinitions="WIN32;CGAL_PARAMETERIZATION_CHECK_EXPENSIVE;CGAL_USE_GMP"
|
||||
RuntimeLibrary="4"
|
||||
DisableLanguageExtensions="FALSE"
|
||||
ForceConformanceInForLoopScope="TRUE"
|
||||
RuntimeTypeInfo="TRUE"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="2"
|
||||
Detect64BitPortabilityProblems="FALSE"
|
||||
DebugInformationFormat="0"/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalOptions="CGAL.lib gmp.lib"
|
||||
OutputFile="$(OutDir)/Authalic_parameterization.exe"
|
||||
LinkIncremental="1"
|
||||
AdditionalLibraryDirectories=""$(CGALROOT)\lib\msvc7""
|
||||
GenerateDebugInformation="FALSE"
|
||||
SubSystem="1"
|
||||
OptimizeReferences="2"
|
||||
EnableCOMDATFolding="2"
|
||||
TargetMachine="1"/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"/>
|
||||
<Tool
|
||||
Name="VCManagedWrapperGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<References>
|
||||
</References>
|
||||
<Files>
|
||||
<Filter
|
||||
Name="Source Files"
|
||||
Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
|
||||
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}">
|
||||
<File
|
||||
RelativePath=".\Authalic_parameterization.C">
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
CompileAs="2"/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
CompileAs="2"/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Header Files"
|
||||
Filter="h;hpp;hxx;hm;inl;inc;xsd"
|
||||
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}">
|
||||
<File
|
||||
RelativePath=".\include\short_names.h">
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Parameterization package"
|
||||
Filter="">
|
||||
<File
|
||||
RelativePath="..\..\include\Cgal\Circular_Border_parameterizer_3.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\include\Cgal\Discrete_authalic_parameterizer_3.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\include\Cgal\Fixed_border_parameterizer_3.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\include\Cgal\Parameterization_mesh_feature_extractor.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\include\Cgal\Parameterization_polyhedron_adaptor_3.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\include\Cgal\parameterize.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\include\Cgal\parameterization_assertions.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\include\Cgal\Parameterizer_traits_3.h">
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="OpenNL"
|
||||
Filter="">
|
||||
<File
|
||||
RelativePath="..\..\..\OpenNL\include\OpenNL\bicgstab.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\OpenNL\include\OpenNL\blas.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\OpenNL\include\OpenNL\conjugate_gradient.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\OpenNL\include\OpenNL\full_vector.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\OpenNL\include\OpenNL\linear_solver.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\OpenNL\include\OpenNL\sparse_matrix.h">
|
||||
</File>
|
||||
</Filter>
|
||||
</Files>
|
||||
<Globals>
|
||||
</Globals>
|
||||
</VisualStudioProject>
|
||||
|
|
@ -1,299 +0,0 @@
|
|||
// Complete_parameterization_example.C
|
||||
|
||||
#ifdef CGAL_USE_TAUCS
|
||||
|
||||
|
||||
#include "short_names.h" // must be included first
|
||||
|
||||
#include <CGAL/Cartesian.h>
|
||||
#include <CGAL/Polyhedron_3.h>
|
||||
#include <CGAL/IO/Polyhedron_iostream.h>
|
||||
#include <CGAL/Parameterization_polyhedron_adaptor_3.h>
|
||||
#include <CGAL/parameterize.h>
|
||||
#include <CGAL/Discrete_authalic_parameterizer_3.h>
|
||||
#include <CGAL/Square_border_parameterizer_3.h>
|
||||
#include <CGAL/Parameterization_mesh_patch_3.h>
|
||||
|
||||
#include <CGAL/Taucs_solver_traits.h>
|
||||
|
||||
#include <iostream>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <fstream>
|
||||
#include <cassert>
|
||||
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Private types
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
typedef CGAL::Cartesian<double> Kernel;
|
||||
typedef CGAL::Polyhedron_3<Kernel> Polyhedron;
|
||||
|
||||
// Mesh adaptors
|
||||
typedef CGAL::Parameterization_polyhedron_adaptor_3<Polyhedron>
|
||||
Parameterization_polyhedron_adaptor;
|
||||
typedef CGAL::Parameterization_mesh_patch_3<Parameterization_polyhedron_adaptor>
|
||||
Mesh_patch_polyhedron;
|
||||
|
||||
// Type describing a border or seam as a vertex list
|
||||
typedef std::list<Parameterization_polyhedron_adaptor::Vertex_handle>
|
||||
Seam;
|
||||
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Private functions
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
// If the mesh is a topological disk, extract its longest border,
|
||||
// else compute a very simple cut to make it homeomorphic to a disk.
|
||||
// Return the border of this region (empty on error)
|
||||
//
|
||||
// CAUTION:
|
||||
// This method is provided "as is". It is very buggy and simply part of this example.
|
||||
// Developers using this package should implement a more robust cut algorithm!
|
||||
static Seam cut_mesh(Parameterization_polyhedron_adaptor* mesh_adaptor)
|
||||
{
|
||||
// Helper class to compute genus or extract borders
|
||||
typedef CGAL::Parameterization_mesh_feature_extractor<Parameterization_polyhedron_adaptor>
|
||||
Mesh_feature_extractor;
|
||||
|
||||
Seam seam; // returned list
|
||||
|
||||
// Get pointer to Polyhedron_3 mesh
|
||||
assert(mesh_adaptor != NULL);
|
||||
Polyhedron* mesh = mesh_adaptor->get_adapted_mesh();
|
||||
assert(mesh != NULL);
|
||||
|
||||
// Extract mesh borders and compute genus
|
||||
Mesh_feature_extractor feature_extractor(mesh_adaptor);
|
||||
int nb_borders = feature_extractor.get_nb_borders();
|
||||
int genus = feature_extractor.get_genus();
|
||||
|
||||
// If mesh is a topological disk
|
||||
if (genus == 0 && nb_borders > 0)
|
||||
{
|
||||
// Pick the longest border
|
||||
const Mesh_feature_extractor::Border* pBorder = feature_extractor.get_longest_border();
|
||||
seam = *pBorder;
|
||||
}
|
||||
else // if mesh is NOT a topological disk, create a virtual cut
|
||||
{
|
||||
const int CUT_LENGTH = 6;
|
||||
|
||||
// Build consecutive halfedges array
|
||||
Polyhedron::Halfedge_handle seam_halfedges[CUT_LENGTH];
|
||||
seam_halfedges[0] = mesh->halfedges_begin();
|
||||
if (seam_halfedges[0] == NULL)
|
||||
return seam; // return empty list
|
||||
int i;
|
||||
for (i=1; i<CUT_LENGTH; i++)
|
||||
{
|
||||
seam_halfedges[i] = seam_halfedges[i-1]->next()->opposite()->next();
|
||||
if (seam_halfedges[i] == NULL)
|
||||
return seam; // return empty list
|
||||
}
|
||||
|
||||
// Convert halfedges array to 2-ways vertices list
|
||||
for (i=0; i<CUT_LENGTH; i++)
|
||||
seam.push_back(seam_halfedges[i]->vertex());
|
||||
for (i=CUT_LENGTH-1; i>=0; i--)
|
||||
seam.push_back(seam_halfedges[i]->opposite()->vertex());
|
||||
}
|
||||
|
||||
return seam;
|
||||
}
|
||||
|
||||
// Dump parameterized mesh to a Wavefront OBJ file
|
||||
// v x y z
|
||||
// f 1 2 3 4 (1-based)
|
||||
//
|
||||
// Implementation note: the UV is meaningless for a NON parameterized halfedge
|
||||
static bool write_file_obj(Parameterization_polyhedron_adaptor* mesh_adaptor,
|
||||
const char *pFilename)
|
||||
{
|
||||
assert(mesh_adaptor != NULL);
|
||||
Polyhedron* mesh = mesh_adaptor->get_adapted_mesh();
|
||||
assert(mesh != NULL);
|
||||
assert(pFilename != NULL);
|
||||
|
||||
std::ofstream out(pFilename);
|
||||
if(!out)
|
||||
return false;
|
||||
CGAL::set_ascii_mode(out);
|
||||
|
||||
// Index all mesh vertices following the order of vertices_begin() iterator
|
||||
Polyhedron::Vertex_const_iterator pVertex;
|
||||
unsigned int i = 0;
|
||||
for(pVertex = mesh->vertices_begin(); pVertex != mesh->vertices_end(); pVertex++)
|
||||
mesh_adaptor->info(pVertex)->index(i++);
|
||||
|
||||
// Index all mesh half edges following the order of halfedges_begin() iterator
|
||||
Polyhedron::Halfedge_const_iterator pHalfedge;
|
||||
i = 0;
|
||||
for(pHalfedge = mesh->halfedges_begin(); pHalfedge != mesh->halfedges_end(); pHalfedge++)
|
||||
mesh_adaptor->info(pHalfedge)->index(i++);
|
||||
|
||||
// write the name of material file
|
||||
out << "mtllib parameterization.mtl" << std::endl ;
|
||||
|
||||
// output coordinates
|
||||
out << "# vertices" << std::endl ;
|
||||
for(pVertex = mesh->vertices_begin(); pVertex != mesh->vertices_end(); pVertex++)
|
||||
out << "v " << pVertex->point().x() << " "
|
||||
<< pVertex->point().y() << " "
|
||||
<< pVertex->point().z() << std::endl;
|
||||
|
||||
// Write UVs (1 UV / halfedge)
|
||||
out << "# uv coordinates" << std::endl ;
|
||||
for(pHalfedge = mesh->halfedges_begin(); pHalfedge != mesh->halfedges_end(); pHalfedge++)
|
||||
{
|
||||
Parameterization_polyhedron_adaptor::Halfedge_info* he_info = mesh_adaptor->info(pHalfedge);
|
||||
if (he_info->is_parameterized())
|
||||
out << "vt " << he_info->uv().x() << " " << he_info->uv().y() << std::endl;
|
||||
else
|
||||
out << "vt " << 0.0 << " " << 0.0 << std::endl;
|
||||
}
|
||||
|
||||
// Write facets using the unique material # 1
|
||||
out << "# facets" << std::endl;
|
||||
out << "usemtl Mat_1" << std::endl;
|
||||
Polyhedron::Facet_const_iterator pFacet;
|
||||
for(pFacet = mesh->facets_begin(); pFacet != mesh->facets_end(); pFacet++)
|
||||
{
|
||||
Polyhedron::Halfedge_around_facet_const_circulator h = pFacet->facet_begin();
|
||||
out << "f";
|
||||
do {
|
||||
Parameterization_polyhedron_adaptor::Halfedge_info* he_info = mesh_adaptor->info(h);
|
||||
Parameterization_polyhedron_adaptor::Vertex_info* vtx_info = mesh_adaptor->info(h->vertex());
|
||||
out << " " << vtx_info->index()+1;
|
||||
if (he_info->is_parameterized())
|
||||
out << "/" << he_info->index()+1;
|
||||
}
|
||||
while(++h != pFacet->facet_begin());
|
||||
out << std::endl;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// main()
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
int main(int argc,char * argv[])
|
||||
{
|
||||
std::cerr << "PARAMETERIZATION" << std::endl;
|
||||
std::cerr << " Discrete Authalic Parameterization" << std::endl;
|
||||
std::cerr << " Square border" << std::endl;
|
||||
std::cerr << " TAUCS solver" << std::endl;
|
||||
std::cerr << " Very simple cut if model is not a topological disk" << std::endl;
|
||||
std::cerr << " Output: OBJ" << std::endl;
|
||||
|
||||
//***************************************
|
||||
// decode parameters
|
||||
//***************************************
|
||||
|
||||
if (argc-1 != 2)
|
||||
{
|
||||
std::cerr << "Usage: " << argv[0] << " input_file.off output_file.obj" << std::endl;
|
||||
return(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
// File names are:
|
||||
const char* input_filename = argv[1];
|
||||
const char* output_filename = argv[2];
|
||||
|
||||
//***************************************
|
||||
// Read the mesh
|
||||
//***************************************
|
||||
|
||||
// Read the mesh
|
||||
std::ifstream stream(input_filename);
|
||||
if(!stream)
|
||||
{
|
||||
std::cerr << "FATAL ERROR: cannot open file " << input_filename << std::endl;
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
Polyhedron mesh;
|
||||
stream >> mesh;
|
||||
|
||||
//***************************************
|
||||
// Create mesh adaptors
|
||||
//***************************************
|
||||
|
||||
// The parameterization package needs an adaptor to handle Polyhedron_3 meshes
|
||||
Parameterization_polyhedron_adaptor mesh_adaptor(&mesh);
|
||||
|
||||
// The parameterization methods support only meshes that
|
||||
// are topological disks => we need to compute a "cutting" of the mesh
|
||||
// that makes it it homeomorphic to a disk
|
||||
Seam seam = cut_mesh(&mesh_adaptor);
|
||||
if (seam.empty())
|
||||
{
|
||||
fprintf(stderr, "\nFATAL ERROR: an unexpected error occurred while cutting the shape!\n\n");
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
// Create adaptor that virtually "cuts" the mesh following the 'seam' path
|
||||
Mesh_patch_polyhedron mesh_patch(&mesh_adaptor, seam.begin(), seam.end());
|
||||
|
||||
//***************************************
|
||||
// Discrete Authalic Parameterization (square border)
|
||||
// with TAUCS solver
|
||||
//***************************************
|
||||
|
||||
// Border parameterizer
|
||||
typedef CGAL::Square_border_arc_length_parameterizer_3<Mesh_patch_polyhedron>
|
||||
Border_parameterizer;
|
||||
// TAUCS solver
|
||||
typedef CGAL::Taucs_solver_traits<double> Solver;
|
||||
|
||||
// Discrete Authalic Parameterization (square border)
|
||||
// with TAUCS solver
|
||||
typedef CGAL::Discrete_authalic_parameterizer_3<Mesh_patch_polyhedron,
|
||||
Border_parameterizer,
|
||||
Solver> Parameterizer;
|
||||
|
||||
Parameterizer::Error_code err = CGAL::parameterize(&mesh_patch, Parameterizer());
|
||||
if (err != Parameterizer::OK)
|
||||
std::cerr << "FATAL ERROR: " << Parameterizer::get_error_message(err) << std::endl;
|
||||
|
||||
//***************************************
|
||||
// Output
|
||||
//***************************************
|
||||
|
||||
// Write Wavefront OBJ file
|
||||
if (err == Parameterizer::OK)
|
||||
{
|
||||
if ( ! write_file_obj(&mesh_adaptor, output_filename) )
|
||||
{
|
||||
std::cerr << "FATAL ERROR: cannot write file " << output_filename << std::endl;
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
}
|
||||
|
||||
return (err == Parameterizer::OK) ? EXIT_SUCCESS : EXIT_FAILURE;
|
||||
}
|
||||
|
||||
|
||||
#else // CGAL_USE_TAUCS
|
||||
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Empty main() if TAUCS is not installed
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
int main(int argc,char * argv[])
|
||||
{
|
||||
std::cerr << "Skip test as TAUCS is not installed" << std::endl;
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
#endif // CGAL_USE_TAUCS
|
||||
|
||||
|
|
@ -1 +0,0 @@
|
|||
data/sphere966.off sphere966_authalic_square_taucs_parameterized.obj
|
||||
|
|
@ -1,220 +0,0 @@
|
|||
<?xml version="1.0" encoding="Windows-1252"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="7.10"
|
||||
Name="Complete_parameterization_example"
|
||||
ProjectGUID="{E2A5087B-4619-4EDD-A6BA-5655F62BA4FE}"
|
||||
Keyword="Win32Proj">
|
||||
<Platforms>
|
||||
<Platform
|
||||
Name="Win32"/>
|
||||
</Platforms>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="Debug|Win32"
|
||||
OutputDirectory="Debug"
|
||||
IntermediateDirectory="Debug"
|
||||
ConfigurationType="1"
|
||||
CharacterSet="0">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalOptions="$(TESTSUITE_CXXFLAGS)"
|
||||
Optimization="0"
|
||||
ImproveFloatingPointConsistency="TRUE"
|
||||
AdditionalIncludeDirectories=".\include;..\..\include;..\..\..\OpenNL\include;"$(CGALROOT)\include\CGAL\config\msvc7";"$(CGALROOT)\include""
|
||||
PreprocessorDefinitions="WIN32;_WIN32_WINNT=0x0400;CGAL_PARAMETERIZATION_CHECK_EXPENSIVE;CGAL_USE_GMP"
|
||||
MinimalRebuild="TRUE"
|
||||
BasicRuntimeChecks="0"
|
||||
RuntimeLibrary="4"
|
||||
BufferSecurityCheck="FALSE"
|
||||
DisableLanguageExtensions="FALSE"
|
||||
ForceConformanceInForLoopScope="FALSE"
|
||||
RuntimeTypeInfo="TRUE"
|
||||
UsePrecompiledHeader="0"
|
||||
BrowseInformation="1"
|
||||
WarningLevel="2"
|
||||
Detect64BitPortabilityProblems="FALSE"
|
||||
DebugInformationFormat="4"
|
||||
ShowIncludes="FALSE"/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalOptions="CGAL.lib gmp.lib /NODEFAULTLIB:LIBCMT $(TESTSUITE_LDFLAGS)"
|
||||
OutputFile="$(OutDir)/Complete_parameterization_example.exe"
|
||||
LinkIncremental="2"
|
||||
AdditionalLibraryDirectories=""$(CGALROOT)\lib\msvc7""
|
||||
GenerateDebugInformation="TRUE"
|
||||
ProgramDatabaseFile="$(OutDir)/$(ProjectName).pdb"
|
||||
SubSystem="1"
|
||||
TargetMachine="1"/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"/>
|
||||
<Tool
|
||||
Name="VCManagedWrapperGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
OutputDirectory="Release"
|
||||
IntermediateDirectory="Release"
|
||||
ConfigurationType="1"
|
||||
CharacterSet="0">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalOptions="/Og- $(TESTSUITE_CXXFLAGS)"
|
||||
Optimization="2"
|
||||
GlobalOptimizations="TRUE"
|
||||
EnableIntrinsicFunctions="TRUE"
|
||||
ImproveFloatingPointConsistency="TRUE"
|
||||
FavorSizeOrSpeed="1"
|
||||
OptimizeForProcessor="3"
|
||||
OptimizeForWindowsApplication="TRUE"
|
||||
AdditionalIncludeDirectories=".\include;..\..\include;..\..\..\OpenNL\include;"$(CGALROOT)\include\CGAL\config\msvc7";"$(CGALROOT)\include""
|
||||
PreprocessorDefinitions="WIN32;_WIN32_WINNT=0x0400;CGAL_PARAMETERIZATION_CHECK_EXPENSIVE;CGAL_USE_GMP"
|
||||
RuntimeLibrary="4"
|
||||
DisableLanguageExtensions="FALSE"
|
||||
ForceConformanceInForLoopScope="TRUE"
|
||||
RuntimeTypeInfo="TRUE"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="2"
|
||||
Detect64BitPortabilityProblems="FALSE"
|
||||
DebugInformationFormat="0"/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalOptions="CGAL.lib gmp.lib /NODEFAULTLIB:LIBCMT $(TESTSUITE_LDFLAGS)"
|
||||
OutputFile="$(OutDir)/Complete_parameterization_example.exe"
|
||||
LinkIncremental="1"
|
||||
AdditionalLibraryDirectories=""$(CGALROOT)\lib\msvc7""
|
||||
GenerateDebugInformation="FALSE"
|
||||
SubSystem="1"
|
||||
OptimizeReferences="2"
|
||||
EnableCOMDATFolding="2"
|
||||
TargetMachine="1"/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"/>
|
||||
<Tool
|
||||
Name="VCManagedWrapperGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<References>
|
||||
</References>
|
||||
<Files>
|
||||
<Filter
|
||||
Name="Source Files"
|
||||
Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
|
||||
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}">
|
||||
<File
|
||||
RelativePath=".\Complete_parameterization_example.C">
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
CompileAs="2"/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
CompileAs="2"/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Header Files"
|
||||
Filter="h;hpp;hxx;hm;inl;inc;xsd"
|
||||
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}">
|
||||
<File
|
||||
RelativePath=".\include\short_names.h">
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Parameterization package"
|
||||
Filter="">
|
||||
<File
|
||||
RelativePath="..\..\include\Cgal\Discrete_authalic_parameterizer_3.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\include\Cgal\Fixed_border_parameterizer_3.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\include\Cgal\Parameterization_mesh_feature_extractor.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\include\Cgal\Parameterization_mesh_patch_3.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\include\Cgal\Param_mesh_patch_circulators.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\include\Cgal\Param_mesh_patch_iterators.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\include\Cgal\Param_mesh_patch_vertex.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\include\Cgal\Parameterization_polyhedron_adaptor_3.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\include\Cgal\parameterize.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\include\Cgal\parameterization_assertions.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\include\Cgal\Parameterizer_traits_3.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\include\Cgal\Square_border_parameterizer_3.h">
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="TAUCS"
|
||||
Filter="">
|
||||
<File
|
||||
RelativePath="..\..\include\Cgal\Taucs_matrix.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\include\Cgal\Taucs_solver_traits.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\include\Cgal\Taucs_vector.h">
|
||||
</File>
|
||||
</Filter>
|
||||
</Files>
|
||||
<Globals>
|
||||
</Globals>
|
||||
</VisualStudioProject>
|
||||
|
|
@ -1,215 +0,0 @@
|
|||
/***************************************************************************
|
||||
begin : jan 02
|
||||
copyright : (C) 2002 by Pierre Alliez
|
||||
email : pierre.alliez@sophia.inria.fr
|
||||
***************************************************************************/
|
||||
|
||||
/***************************************************************************
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or modify *
|
||||
* it under the terms of the GNU General Public License as published by *
|
||||
* the Free Software Foundation; either version 2 of the License, or *
|
||||
* (at your option) any later version. *
|
||||
* *
|
||||
***************************************************************************/
|
||||
|
||||
#include "short_names.h" // must be included first
|
||||
#include <CGAL/Cartesian.h>
|
||||
|
||||
#include "Mesh_cutter.h"
|
||||
|
||||
|
||||
//***************************************************
|
||||
// simple cut for genus 0 mesh
|
||||
//***************************************************
|
||||
void Mesh_cutter::cut(Backbone *pBackbone)
|
||||
{
|
||||
m_pBackbone = pBackbone;
|
||||
CGAL_assertion(pBackbone != NULL);
|
||||
|
||||
// special init -> tag all vertices, but two
|
||||
m_pPolyhedron->tag_vertices(FREE);
|
||||
Polyhedron_ex::Vertex_handle pVertexMin,pVertexMax;
|
||||
m_pPolyhedron->farthest_point_aligned(pVertexMin,pVertexMax);
|
||||
pVertexMin->tag(FIXED);
|
||||
pVertexMax->tag(FIXED);
|
||||
init();
|
||||
|
||||
// cutting
|
||||
while(extend()) {}
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////
|
||||
// GENUS > 0
|
||||
/////////////////////////////////////////////////////
|
||||
|
||||
//***************************************************
|
||||
// cut for genus>0 mesh
|
||||
//***************************************************
|
||||
void Mesh_cutter::cut_genus(Backbone *pBackbone)
|
||||
{
|
||||
m_pBackbone = pBackbone;
|
||||
CGAL_assertion(pBackbone != NULL);
|
||||
|
||||
// init
|
||||
m_pPolyhedron->tag_vertices(FREE); // all free
|
||||
init();
|
||||
|
||||
// cutting
|
||||
while(extend()) {}
|
||||
}
|
||||
|
||||
//***************************************************
|
||||
// init
|
||||
//***************************************************
|
||||
bool Mesh_cutter::init()
|
||||
{
|
||||
// tag facets
|
||||
m_pPolyhedron->tag_facets(FREE);
|
||||
|
||||
// compute bounding box and center
|
||||
double xmin = m_pPolyhedron->min(0);
|
||||
double ymin = m_pPolyhedron->min(1);
|
||||
double zmin = m_pPolyhedron->min(2);
|
||||
double xmax = m_pPolyhedron->max(0);
|
||||
double ymax = m_pPolyhedron->max(1);
|
||||
double zmax = m_pPolyhedron->max(2);
|
||||
double xcenter = 0.5*(xmin+xmax);
|
||||
double ycenter = 0.5*(ymin+ymax);
|
||||
double zcenter = 0.5*(zmin+zmax);
|
||||
Point_3 center(xcenter,ycenter,zcenter);
|
||||
|
||||
// get closest facet
|
||||
m_pSeedFacet = m_pPolyhedron->get_closest_inner_facet(¢er);
|
||||
CGAL_assertion(m_pSeedFacet != NULL);
|
||||
|
||||
Polyhedron_ex::Halfedge_handle he = m_pSeedFacet->halfedge();
|
||||
CGAL_assertion(he != NULL);
|
||||
CGAL_assertion(m_pBackbone != NULL);
|
||||
m_pBackbone->push_back(he);
|
||||
m_pBackbone->push_back(he->next());
|
||||
m_pBackbone->push_back(he->next()->next());
|
||||
|
||||
precompute_distances();
|
||||
m_pSeedFacet->tag(DONE);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
//***************************************************
|
||||
// extend
|
||||
//***************************************************
|
||||
bool Mesh_cutter::extend()
|
||||
{
|
||||
std::list<Polyhedron_ex::Halfedge_handle>::iterator pos;
|
||||
Polyhedron_ex::Halfedge_handle pHalfedge = pick_best_halfedge(pos);
|
||||
if(pHalfedge == NULL)
|
||||
return false;
|
||||
|
||||
// flag facet
|
||||
pHalfedge->opposite()->facet()->tag(DONE);
|
||||
|
||||
// insert halfedge
|
||||
std::list<Polyhedron_ex::Halfedge_handle>::iterator tmp =
|
||||
m_pBackbone->insert(pos,pHalfedge->opposite()->next()->next());
|
||||
m_pBackbone->insert(tmp,pHalfedge->opposite()->next());
|
||||
|
||||
// remove this one
|
||||
m_pBackbone->remove(pHalfedge);
|
||||
|
||||
// simplify current backbone
|
||||
while(simplify());
|
||||
return true;
|
||||
}
|
||||
|
||||
//***************************************************
|
||||
// simplify
|
||||
//***************************************************
|
||||
bool Mesh_cutter::simplify()
|
||||
{
|
||||
// cleanup
|
||||
std::list<Polyhedron_ex::Halfedge_handle>::iterator iter;
|
||||
for(iter = m_pBackbone->begin();
|
||||
iter != m_pBackbone->end();
|
||||
iter++)
|
||||
{
|
||||
Polyhedron_ex::Halfedge_handle pHalfedge = (*iter);
|
||||
Polyhedron_ex::Halfedge_handle opposite = pHalfedge->opposite();
|
||||
|
||||
// get next halfedge in the list
|
||||
iter++;
|
||||
Polyhedron_ex::Halfedge_handle pNext = NULL;
|
||||
if(iter == m_pBackbone->end()) // loop
|
||||
pNext = (*m_pBackbone->begin());
|
||||
else
|
||||
pNext = (*iter);
|
||||
|
||||
if(pNext == opposite &&
|
||||
pHalfedge->vertex()->tag() == FREE)
|
||||
{
|
||||
m_pBackbone->remove(pHalfedge);
|
||||
m_pBackbone->remove(opposite);
|
||||
return true;
|
||||
}
|
||||
|
||||
iter--; // restore
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
//***************************************************
|
||||
// precompute_distances
|
||||
//***************************************************
|
||||
void Mesh_cutter::precompute_distances()
|
||||
{
|
||||
Polyhedron_ex::Halfedge_iterator pHalfedge;
|
||||
for(pHalfedge = m_pPolyhedron->halfedges_begin();
|
||||
pHalfedge != m_pPolyhedron->halfedges_end();
|
||||
pHalfedge++)
|
||||
pHalfedge->distance(m_pPolyhedron->distance(m_pSeedFacet,pHalfedge));
|
||||
}
|
||||
|
||||
//***************************************************
|
||||
// pick_best_halfedge
|
||||
//***************************************************
|
||||
Polyhedron_ex::Halfedge_handle Mesh_cutter::pick_best_halfedge(
|
||||
std::list<Polyhedron_ex::Halfedge_handle>::iterator &pos)
|
||||
{
|
||||
Polyhedron_ex::Halfedge_handle pBest = NULL;
|
||||
double min_distance = 1e308; //
|
||||
|
||||
// cleanup
|
||||
std::list<Polyhedron_ex::Halfedge_handle>::iterator iter;
|
||||
for(iter = m_pBackbone->begin();
|
||||
iter != m_pBackbone->end();
|
||||
iter++)
|
||||
{
|
||||
Polyhedron_ex::Halfedge_handle pHalfedge = (*iter);
|
||||
Polyhedron_ex::Halfedge_handle opposite = pHalfedge->opposite();
|
||||
Polyhedron_ex::Facet_handle pFacet = opposite->facet();
|
||||
|
||||
// check
|
||||
if(pHalfedge->is_border() ||
|
||||
pFacet == NULL)
|
||||
continue;
|
||||
|
||||
if(pFacet->tag() == DONE)
|
||||
continue;
|
||||
|
||||
// no border vertex
|
||||
Polyhedron_ex::Vertex_handle pVertex = opposite->next()->vertex();
|
||||
if(m_pPolyhedron->is_border(pVertex))
|
||||
continue;
|
||||
|
||||
// precomputed distance
|
||||
double distance = pHalfedge->distance();
|
||||
if(distance < min_distance)
|
||||
{
|
||||
pos = iter;
|
||||
pBest = pHalfedge;
|
||||
min_distance = distance;
|
||||
}
|
||||
}
|
||||
return pBest;
|
||||
}
|
||||
|
||||
|
|
@ -1,194 +0,0 @@
|
|||
// Mesh_cutting_parameterization.C
|
||||
|
||||
#include "short_names.h" // must be included first
|
||||
|
||||
#include <CGAL/Cartesian.h>
|
||||
#include <CGAL/Polyhedron_3.h>
|
||||
#include <CGAL/IO/Polyhedron_iostream.h>
|
||||
#include <CGAL/Parameterization_polyhedron_adaptor_3.h>
|
||||
#include <CGAL/parameterize.h>
|
||||
#include <CGAL/Parameterization_mesh_patch_3.h>
|
||||
|
||||
#include <iostream>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <fstream>
|
||||
#include <cassert>
|
||||
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Private types
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
typedef CGAL::Cartesian<double> Kernel;
|
||||
typedef CGAL::Polyhedron_3<Kernel> Polyhedron;
|
||||
|
||||
// Mesh adaptors
|
||||
typedef CGAL::Parameterization_polyhedron_adaptor_3<Polyhedron>
|
||||
Parameterization_polyhedron_adaptor;
|
||||
typedef CGAL::Parameterization_mesh_patch_3<Parameterization_polyhedron_adaptor>
|
||||
Mesh_patch_polyhedron;
|
||||
|
||||
// Type describing a border or seam as a vertex list
|
||||
typedef std::list<Parameterization_polyhedron_adaptor::Vertex_handle>
|
||||
Seam;
|
||||
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Private functions
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
// If the mesh is a topological disk, extract its longest border,
|
||||
// else compute a very simple cut to make it homeomorphic to a disk.
|
||||
// Return the border of this region (empty on error)
|
||||
//
|
||||
// CAUTION:
|
||||
// This method is provided "as is". It is very buggy and simply part of this example.
|
||||
// Developers using this package should implement a more robust cut algorithm!
|
||||
static Seam cut_mesh(Parameterization_polyhedron_adaptor* mesh_adaptor)
|
||||
{
|
||||
// Helper class to compute genus or extract borders
|
||||
typedef CGAL::Parameterization_mesh_feature_extractor<Parameterization_polyhedron_adaptor>
|
||||
Mesh_feature_extractor;
|
||||
|
||||
Seam seam; // returned list
|
||||
|
||||
// Get pointer to Polyhedron_3 mesh
|
||||
assert(mesh_adaptor != NULL);
|
||||
Polyhedron* mesh = mesh_adaptor->get_adapted_mesh();
|
||||
assert(mesh != NULL);
|
||||
|
||||
// Extract mesh borders and compute genus
|
||||
Mesh_feature_extractor feature_extractor(mesh_adaptor);
|
||||
int nb_borders = feature_extractor.get_nb_borders();
|
||||
int genus = feature_extractor.get_genus();
|
||||
|
||||
// If mesh is a topological disk
|
||||
if (genus == 0 && nb_borders > 0)
|
||||
{
|
||||
// Pick the longest border
|
||||
const Mesh_feature_extractor::Border* pBorder = feature_extractor.get_longest_border();
|
||||
seam = *pBorder;
|
||||
}
|
||||
else // if mesh is NOT a topological disk, create a virtual cut
|
||||
{
|
||||
const int CUT_LENGTH = 6;
|
||||
|
||||
// Build consecutive halfedges array
|
||||
Polyhedron::Halfedge_handle seam_halfedges[CUT_LENGTH];
|
||||
seam_halfedges[0] = mesh->halfedges_begin();
|
||||
if (seam_halfedges[0] == NULL)
|
||||
return seam; // return empty list
|
||||
int i;
|
||||
for (i=1; i<CUT_LENGTH; i++)
|
||||
{
|
||||
seam_halfedges[i] = seam_halfedges[i-1]->next()->opposite()->next();
|
||||
if (seam_halfedges[i] == NULL)
|
||||
return seam; // return empty list
|
||||
}
|
||||
|
||||
// Convert halfedges array to 2-ways vertices list
|
||||
for (i=0; i<CUT_LENGTH; i++)
|
||||
seam.push_back(seam_halfedges[i]->vertex());
|
||||
for (i=CUT_LENGTH-1; i>=0; i--)
|
||||
seam.push_back(seam_halfedges[i]->opposite()->vertex());
|
||||
}
|
||||
|
||||
return seam;
|
||||
}
|
||||
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// main()
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
int main(int argc,char * argv[])
|
||||
{
|
||||
std::cerr << "PARAMETERIZATION" << std::endl;
|
||||
std::cerr << " Floater parameterization" << std::endl;
|
||||
std::cerr << " Circle border" << std::endl;
|
||||
std::cerr << " OpenNL solver" << std::endl;
|
||||
std::cerr << " Very simple cut if model is not a topological disk" << std::endl;
|
||||
|
||||
//***************************************
|
||||
// decode parameters
|
||||
//***************************************
|
||||
|
||||
if (argc-1 != 1)
|
||||
{
|
||||
std::cerr << "Usage: " << argv[0] << " input_file.off" << std::endl;
|
||||
return(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
// File name is:
|
||||
const char* input_filename = argv[1];
|
||||
|
||||
//***************************************
|
||||
// Read the mesh
|
||||
//***************************************
|
||||
|
||||
// Read the mesh
|
||||
std::ifstream stream(input_filename);
|
||||
if(!stream)
|
||||
{
|
||||
std::cerr << "FATAL ERROR: cannot open file " << input_filename << std::endl;
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
Polyhedron mesh;
|
||||
stream >> mesh;
|
||||
|
||||
//***************************************
|
||||
// Create mesh adaptor
|
||||
//***************************************
|
||||
|
||||
// The parameterization package needs an adaptor to handle Polyhedron_3 meshes
|
||||
Parameterization_polyhedron_adaptor mesh_adaptor(&mesh);
|
||||
|
||||
// The parameterization methods support only meshes that
|
||||
// are topological disks => we need to compute a "cutting" of the mesh
|
||||
// that makes it it homeomorphic to a disk
|
||||
Seam seam = cut_mesh(&mesh_adaptor);
|
||||
if (seam.empty())
|
||||
{
|
||||
fprintf(stderr, "\nFATAL ERROR: an unexpected error occurred while cutting the shape!\n\n");
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
// Create adaptor that virtually "cuts" the mesh following the 'seam' path
|
||||
Mesh_patch_polyhedron mesh_patch(&mesh_adaptor, seam.begin(), seam.end());
|
||||
|
||||
//***************************************
|
||||
// Floater Mean Value Coordinates parameterization
|
||||
//***************************************
|
||||
|
||||
// Type that defines the error codes
|
||||
typedef CGAL::Parameterizer_traits_3<Mesh_patch_polyhedron>
|
||||
Parameterizer;
|
||||
|
||||
Parameterizer::Error_code err = CGAL::parameterize(&mesh_patch);
|
||||
if (err != Parameterizer::OK)
|
||||
std::cerr << "FATAL ERROR: " << Parameterizer::get_error_message(err) << std::endl;
|
||||
|
||||
//***************************************
|
||||
// Output
|
||||
//***************************************
|
||||
|
||||
if (err == Parameterizer::OK)
|
||||
{
|
||||
// Raw output: dump (u,v) pairs
|
||||
Polyhedron::Vertex_const_iterator pVertex;
|
||||
for (pVertex = mesh.vertices_begin();
|
||||
pVertex != mesh.vertices_end();
|
||||
pVertex++)
|
||||
{
|
||||
// (u,v) pair is stored in any halfedge
|
||||
double u = mesh_adaptor.info(pVertex->halfedge())->uv().x();
|
||||
double v = mesh_adaptor.info(pVertex->halfedge())->uv().y();
|
||||
std::cout << "(u,v) = (" << u << "," << v << ")" << std::endl;
|
||||
}
|
||||
}
|
||||
|
||||
return (err == Parameterizer::OK) ? EXIT_SUCCESS : EXIT_FAILURE;
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -1 +0,0 @@
|
|||
data/mask_cone.off
|
||||
|
|
@ -1,228 +0,0 @@
|
|||
<?xml version="1.0" encoding="Windows-1252"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="7.10"
|
||||
Name="Mesh_cutting_parameterization"
|
||||
ProjectGUID="{E2A5087B-4619-4EDD-A6BA-5655F62BA4FE}"
|
||||
Keyword="Win32Proj">
|
||||
<Platforms>
|
||||
<Platform
|
||||
Name="Win32"/>
|
||||
</Platforms>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="Debug|Win32"
|
||||
OutputDirectory="Debug"
|
||||
IntermediateDirectory="Debug"
|
||||
ConfigurationType="1"
|
||||
CharacterSet="0">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
ImproveFloatingPointConsistency="TRUE"
|
||||
AdditionalIncludeDirectories=".\include;..\..\include;..\..\..\OpenNL\include;"$(CGALROOT)\include\CGAL\config\msvc7";"$(CGALROOT)\include""
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;CGAL_PARAMETERIZATION_CHECK_EXPENSIVE;CGAL_USE_GMP"
|
||||
MinimalRebuild="TRUE"
|
||||
BasicRuntimeChecks="0"
|
||||
RuntimeLibrary="5"
|
||||
BufferSecurityCheck="FALSE"
|
||||
DisableLanguageExtensions="FALSE"
|
||||
ForceConformanceInForLoopScope="FALSE"
|
||||
RuntimeTypeInfo="TRUE"
|
||||
UsePrecompiledHeader="0"
|
||||
BrowseInformation="1"
|
||||
WarningLevel="2"
|
||||
Detect64BitPortabilityProblems="FALSE"
|
||||
DebugInformationFormat="4"
|
||||
ShowIncludes="FALSE"/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalOptions="CGAL_debug.lib gmp.lib"
|
||||
OutputFile="$(OutDir)/Mesh_cutting_parameterization.exe"
|
||||
LinkIncremental="2"
|
||||
AdditionalLibraryDirectories=""$(CGALROOT)\lib\msvc7""
|
||||
GenerateDebugInformation="TRUE"
|
||||
ProgramDatabaseFile="$(OutDir)/$(ProjectName).pdb"
|
||||
SubSystem="1"
|
||||
TargetMachine="1"/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"/>
|
||||
<Tool
|
||||
Name="VCManagedWrapperGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
OutputDirectory="Release"
|
||||
IntermediateDirectory="Release"
|
||||
ConfigurationType="1"
|
||||
CharacterSet="0">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalOptions="/Og-"
|
||||
Optimization="2"
|
||||
GlobalOptimizations="TRUE"
|
||||
EnableIntrinsicFunctions="TRUE"
|
||||
ImproveFloatingPointConsistency="TRUE"
|
||||
FavorSizeOrSpeed="1"
|
||||
OptimizeForProcessor="3"
|
||||
OptimizeForWindowsApplication="TRUE"
|
||||
AdditionalIncludeDirectories=".\include;..\..\include;..\..\..\OpenNL\include;"$(CGALROOT)\include\CGAL\config\msvc7";"$(CGALROOT)\include""
|
||||
PreprocessorDefinitions="WIN32;CGAL_PARAMETERIZATION_CHECK_EXPENSIVE;CGAL_USE_GMP"
|
||||
RuntimeLibrary="4"
|
||||
DisableLanguageExtensions="FALSE"
|
||||
ForceConformanceInForLoopScope="TRUE"
|
||||
RuntimeTypeInfo="TRUE"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="2"
|
||||
Detect64BitPortabilityProblems="FALSE"
|
||||
DebugInformationFormat="0"/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalOptions="CGAL.lib gmp.lib"
|
||||
OutputFile="$(OutDir)/Mesh_cutting_parameterization.exe"
|
||||
LinkIncremental="1"
|
||||
AdditionalLibraryDirectories=""$(CGALROOT)\lib\msvc7""
|
||||
GenerateDebugInformation="FALSE"
|
||||
SubSystem="1"
|
||||
OptimizeReferences="2"
|
||||
EnableCOMDATFolding="2"
|
||||
TargetMachine="1"/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"/>
|
||||
<Tool
|
||||
Name="VCManagedWrapperGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<References>
|
||||
</References>
|
||||
<Files>
|
||||
<Filter
|
||||
Name="Source Files"
|
||||
Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
|
||||
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}">
|
||||
<File
|
||||
RelativePath=".\Mesh_cutting_parameterization.C">
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
CompileAs="2"/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
CompileAs="2"/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Header Files"
|
||||
Filter="h;hpp;hxx;hm;inl;inc;xsd"
|
||||
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}">
|
||||
<File
|
||||
RelativePath=".\include\short_names.h">
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Parameterization package"
|
||||
Filter="">
|
||||
<File
|
||||
RelativePath="..\..\include\Cgal\Circular_Border_parameterizer_3.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\include\Cgal\Fixed_border_parameterizer_3.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\include\Cgal\Mean_value_coordinates_parameterizer_3.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\include\Cgal\Parameterization_mesh_feature_extractor.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\include\Cgal\Parameterization_mesh_patch_3.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\include\Cgal\Param_mesh_patch_circulators.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\include\Cgal\Param_mesh_patch_iterators.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\include\Cgal\Param_mesh_patch_vertex.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\include\Cgal\Parameterization_polyhedron_adaptor_3.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\include\Cgal\parameterize.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\include\Cgal\parameterization_assertions.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\include\Cgal\Parameterizer_traits_3.h">
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="OpenNL"
|
||||
Filter="">
|
||||
<File
|
||||
RelativePath="..\..\..\OpenNL\include\OpenNL\bicgstab.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\OpenNL\include\OpenNL\blas.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\OpenNL\include\OpenNL\conjugate_gradient.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\OpenNL\include\OpenNL\full_vector.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\OpenNL\include\OpenNL\linear_solver.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\OpenNL\include\OpenNL\sparse_matrix.h">
|
||||
</File>
|
||||
</Filter>
|
||||
</Files>
|
||||
<Globals>
|
||||
</Globals>
|
||||
</VisualStudioProject>
|
||||
|
|
@ -1,69 +0,0 @@
|
|||
Microsoft Visual Studio Solution File, Format Version 8.00
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Simple_parameterization", "Simple_parameterization.vcproj", "{E2A5087B-4619-4EDD-A6BA-5655F62BA4FE}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Authalic_parameterization", "Authalic_parameterization.vcproj", "{E2A5087B-4619-4EDD-A6BA-5655F62BA4FE}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Complete_parameterization_example", "Complete_parameterization_example.vcproj", "{E2A5087B-4619-4EDD-A6BA-5655F62BA4FE}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Mesh_cutting_parameterization", "Mesh_cutting_parameterization.vcproj", "{E2A5087B-4619-4EDD-A6BA-5655F62BA4FE}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "polyhedron_ex_parameterization", "polyhedron_ex_parameterization.vcproj", "{E2A5087B-4619-4EDD-A6BA-5655F62BA4FE}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Square_border_parameterization", "Square_border_parameterization.vcproj", "{E2A5087B-4619-4EDD-A6BA-5655F62BA4FE}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Taucs_parameterization", "Taucs_parameterization.vcproj", "{E2A5087B-4619-4EDD-A6BA-5655F62BA4FE}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfiguration) = preSolution
|
||||
Debug = Debug
|
||||
Release = Release
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfiguration) = postSolution
|
||||
{E2A5087B-4619-4EDD-A6BA-5655F62BA4FE}.Debug.ActiveCfg = Debug|Win32
|
||||
{E2A5087B-4619-4EDD-A6BA-5655F62BA4FE}.Debug.Build.0 = Debug|Win32
|
||||
{E2A5087B-4619-4EDD-A6BA-5655F62BA4FE}.Release.ActiveCfg = Release|Win32
|
||||
{E2A5087B-4619-4EDD-A6BA-5655F62BA4FE}.Release.Build.0 = Release|Win32
|
||||
{E2A5087B-4619-4EDD-A6BA-5655F62BA4FE}.Debug.ActiveCfg = Debug|Win32
|
||||
{E2A5087B-4619-4EDD-A6BA-5655F62BA4FE}.Debug.Build.0 = Debug|Win32
|
||||
{E2A5087B-4619-4EDD-A6BA-5655F62BA4FE}.Release.ActiveCfg = Release|Win32
|
||||
{E2A5087B-4619-4EDD-A6BA-5655F62BA4FE}.Release.Build.0 = Release|Win32
|
||||
{E2A5087B-4619-4EDD-A6BA-5655F62BA4FE}.Debug.ActiveCfg = Debug|Win32
|
||||
{E2A5087B-4619-4EDD-A6BA-5655F62BA4FE}.Debug.Build.0 = Debug|Win32
|
||||
{E2A5087B-4619-4EDD-A6BA-5655F62BA4FE}.Release.ActiveCfg = Release|Win32
|
||||
{E2A5087B-4619-4EDD-A6BA-5655F62BA4FE}.Release.Build.0 = Release|Win32
|
||||
{E2A5087B-4619-4EDD-A6BA-5655F62BA4FE}.Debug.ActiveCfg = Debug|Win32
|
||||
{E2A5087B-4619-4EDD-A6BA-5655F62BA4FE}.Debug.Build.0 = Debug|Win32
|
||||
{E2A5087B-4619-4EDD-A6BA-5655F62BA4FE}.Release.ActiveCfg = Release|Win32
|
||||
{E2A5087B-4619-4EDD-A6BA-5655F62BA4FE}.Release.Build.0 = Release|Win32
|
||||
{E2A5087B-4619-4EDD-A6BA-5655F62BA4FE}.Debug.ActiveCfg = Debug|Win32
|
||||
{E2A5087B-4619-4EDD-A6BA-5655F62BA4FE}.Debug.Build.0 = Debug|Win32
|
||||
{E2A5087B-4619-4EDD-A6BA-5655F62BA4FE}.Release.ActiveCfg = Release|Win32
|
||||
{E2A5087B-4619-4EDD-A6BA-5655F62BA4FE}.Release.Build.0 = Release|Win32
|
||||
{E2A5087B-4619-4EDD-A6BA-5655F62BA4FE}.Debug.ActiveCfg = Debug|Win32
|
||||
{E2A5087B-4619-4EDD-A6BA-5655F62BA4FE}.Debug.Build.0 = Debug|Win32
|
||||
{E2A5087B-4619-4EDD-A6BA-5655F62BA4FE}.Release.ActiveCfg = Release|Win32
|
||||
{E2A5087B-4619-4EDD-A6BA-5655F62BA4FE}.Release.Build.0 = Release|Win32
|
||||
{E2A5087B-4619-4EDD-A6BA-5655F62BA4FE}.Debug.ActiveCfg = Debug|Win32
|
||||
{E2A5087B-4619-4EDD-A6BA-5655F62BA4FE}.Debug.Build.0 = Debug|Win32
|
||||
{E2A5087B-4619-4EDD-A6BA-5655F62BA4FE}.Release.ActiveCfg = Release|Win32
|
||||
{E2A5087B-4619-4EDD-A6BA-5655F62BA4FE}.Release.Build.0 = Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityGlobals) = postSolution
|
||||
EndGlobalSection
|
||||
GlobalSection(ExtensibilityAddIns) = postSolution
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
|
|
@ -1,109 +0,0 @@
|
|||
// Simple_parameterization.C
|
||||
|
||||
#include "short_names.h" // must be included first
|
||||
|
||||
#include <CGAL/Cartesian.h>
|
||||
#include <CGAL/Polyhedron_3.h>
|
||||
#include <CGAL/IO/Polyhedron_iostream.h>
|
||||
#include <CGAL/Parameterization_polyhedron_adaptor_3.h>
|
||||
#include <CGAL/parameterize.h>
|
||||
|
||||
#include <iostream>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <fstream>
|
||||
#include <cassert>
|
||||
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Private types
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
typedef CGAL::Cartesian<double> Kernel;
|
||||
typedef CGAL::Polyhedron_3<Kernel> Polyhedron;
|
||||
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// main()
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
int main(int argc,char * argv[])
|
||||
{
|
||||
std::cerr << "PARAMETERIZATION" << std::endl;
|
||||
std::cerr << " Floater parameterization" << std::endl;
|
||||
std::cerr << " Circle border" << std::endl;
|
||||
std::cerr << " OpenNL solver" << std::endl;
|
||||
|
||||
//***************************************
|
||||
// decode parameters
|
||||
//***************************************
|
||||
|
||||
if (argc-1 != 1)
|
||||
{
|
||||
std::cerr << "Usage: " << argv[0] << " input_file.off" << std::endl;
|
||||
return(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
// File name is:
|
||||
const char* input_filename = argv[1];
|
||||
|
||||
//***************************************
|
||||
// Read the mesh
|
||||
//***************************************
|
||||
|
||||
// Read the mesh
|
||||
std::ifstream stream(input_filename);
|
||||
if(!stream)
|
||||
{
|
||||
std::cerr << "FATAL ERROR: cannot open file " << input_filename << std::endl;
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
Polyhedron mesh;
|
||||
stream >> mesh;
|
||||
|
||||
//***************************************
|
||||
// Create mesh adaptor
|
||||
// Note: parameterization methods support only
|
||||
// meshes that are topological disks
|
||||
//***************************************
|
||||
|
||||
// The parameterization package needs an adaptor to handle Polyhedron_3 meshes
|
||||
typedef CGAL::Parameterization_polyhedron_adaptor_3<Polyhedron>
|
||||
Parameterization_polyhedron_adaptor;
|
||||
Parameterization_polyhedron_adaptor mesh_adaptor(&mesh);
|
||||
|
||||
//***************************************
|
||||
// Floater Mean Value Coordinates parameterization
|
||||
//***************************************
|
||||
|
||||
// Type that defines the error codes
|
||||
typedef CGAL::Parameterizer_traits_3<Parameterization_polyhedron_adaptor>
|
||||
Parameterizer;
|
||||
|
||||
Parameterizer::Error_code err = CGAL::parameterize(&mesh_adaptor);
|
||||
if (err != Parameterizer::OK)
|
||||
std::cerr << "FATAL ERROR: " << Parameterizer::get_error_message(err) << std::endl;
|
||||
|
||||
//***************************************
|
||||
// Output
|
||||
//***************************************
|
||||
|
||||
if (err == Parameterizer::OK)
|
||||
{
|
||||
// Raw output: dump (u,v) pairs
|
||||
Polyhedron::Vertex_const_iterator pVertex;
|
||||
for (pVertex = mesh.vertices_begin();
|
||||
pVertex != mesh.vertices_end();
|
||||
pVertex++)
|
||||
{
|
||||
// (u,v) pair is stored in any halfedge
|
||||
double u = mesh_adaptor.info(pVertex->halfedge())->uv().x();
|
||||
double v = mesh_adaptor.info(pVertex->halfedge())->uv().y();
|
||||
std::cout << "(u,v) = (" << u << "," << v << ")" << std::endl;
|
||||
}
|
||||
}
|
||||
|
||||
return (err == Parameterizer::OK) ? EXIT_SUCCESS : EXIT_FAILURE;
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -1 +0,0 @@
|
|||
data/nefertiti.off
|
||||
|
|
@ -1,216 +0,0 @@
|
|||
<?xml version="1.0" encoding="Windows-1252"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="7.10"
|
||||
Name="Simple_parameterization"
|
||||
ProjectGUID="{E2A5087B-4619-4EDD-A6BA-5655F62BA4FE}"
|
||||
Keyword="Win32Proj">
|
||||
<Platforms>
|
||||
<Platform
|
||||
Name="Win32"/>
|
||||
</Platforms>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="Debug|Win32"
|
||||
OutputDirectory="Debug"
|
||||
IntermediateDirectory="Debug"
|
||||
ConfigurationType="1"
|
||||
CharacterSet="0">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
ImproveFloatingPointConsistency="TRUE"
|
||||
AdditionalIncludeDirectories=".\include;..\..\include;..\..\..\OpenNL\include;"$(CGALROOT)\include\CGAL\config\msvc7";"$(CGALROOT)\include""
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;CGAL_PARAMETERIZATION_CHECK_EXPENSIVE;CGAL_USE_GMP"
|
||||
MinimalRebuild="TRUE"
|
||||
BasicRuntimeChecks="0"
|
||||
RuntimeLibrary="5"
|
||||
BufferSecurityCheck="FALSE"
|
||||
DisableLanguageExtensions="FALSE"
|
||||
ForceConformanceInForLoopScope="FALSE"
|
||||
RuntimeTypeInfo="TRUE"
|
||||
UsePrecompiledHeader="0"
|
||||
BrowseInformation="1"
|
||||
WarningLevel="2"
|
||||
Detect64BitPortabilityProblems="FALSE"
|
||||
DebugInformationFormat="4"
|
||||
ShowIncludes="FALSE"/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalOptions="CGAL_debug.lib gmp.lib"
|
||||
OutputFile="$(OutDir)/Simple_parameterization.exe"
|
||||
LinkIncremental="2"
|
||||
AdditionalLibraryDirectories=""$(CGALROOT)\lib\msvc7""
|
||||
GenerateDebugInformation="TRUE"
|
||||
ProgramDatabaseFile="$(OutDir)/$(ProjectName).pdb"
|
||||
SubSystem="1"
|
||||
TargetMachine="1"/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"/>
|
||||
<Tool
|
||||
Name="VCManagedWrapperGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
OutputDirectory="Release"
|
||||
IntermediateDirectory="Release"
|
||||
ConfigurationType="1"
|
||||
CharacterSet="0">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalOptions="/Og-"
|
||||
Optimization="2"
|
||||
GlobalOptimizations="TRUE"
|
||||
EnableIntrinsicFunctions="TRUE"
|
||||
ImproveFloatingPointConsistency="TRUE"
|
||||
FavorSizeOrSpeed="1"
|
||||
OptimizeForProcessor="3"
|
||||
OptimizeForWindowsApplication="TRUE"
|
||||
AdditionalIncludeDirectories=".\include;..\..\include;..\..\..\OpenNL\include;"$(CGALROOT)\include\CGAL\config\msvc7";"$(CGALROOT)\include""
|
||||
PreprocessorDefinitions="WIN32;CGAL_PARAMETERIZATION_CHECK_EXPENSIVE;CGAL_USE_GMP"
|
||||
RuntimeLibrary="4"
|
||||
DisableLanguageExtensions="FALSE"
|
||||
ForceConformanceInForLoopScope="TRUE"
|
||||
RuntimeTypeInfo="TRUE"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="2"
|
||||
Detect64BitPortabilityProblems="FALSE"
|
||||
DebugInformationFormat="0"/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalOptions="CGAL.lib gmp.lib"
|
||||
OutputFile="$(OutDir)/Simple_parameterization.exe"
|
||||
LinkIncremental="1"
|
||||
AdditionalLibraryDirectories=""$(CGALROOT)\lib\msvc7""
|
||||
GenerateDebugInformation="FALSE"
|
||||
SubSystem="1"
|
||||
OptimizeReferences="2"
|
||||
EnableCOMDATFolding="2"
|
||||
TargetMachine="1"/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"/>
|
||||
<Tool
|
||||
Name="VCManagedWrapperGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<References>
|
||||
</References>
|
||||
<Files>
|
||||
<Filter
|
||||
Name="Source Files"
|
||||
Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
|
||||
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}">
|
||||
<File
|
||||
RelativePath=".\Simple_parameterization.C">
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
CompileAs="2"/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
CompileAs="2"/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Header Files"
|
||||
Filter="h;hpp;hxx;hm;inl;inc;xsd"
|
||||
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}">
|
||||
<File
|
||||
RelativePath=".\include\short_names.h">
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Parameterization package"
|
||||
Filter="">
|
||||
<File
|
||||
RelativePath="..\..\include\Cgal\Circular_Border_parameterizer_3.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\include\Cgal\Fixed_border_parameterizer_3.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\include\Cgal\Mean_value_coordinates_parameterizer_3.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\include\Cgal\Parameterization_mesh_feature_extractor.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\include\Cgal\Parameterization_polyhedron_adaptor_3.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\include\Cgal\parameterize.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\include\Cgal\parameterization_assertions.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\include\Cgal\Parameterizer_traits_3.h">
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="OpenNL"
|
||||
Filter="">
|
||||
<File
|
||||
RelativePath="..\..\..\OpenNL\include\OpenNL\bicgstab.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\OpenNL\include\OpenNL\blas.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\OpenNL\include\OpenNL\conjugate_gradient.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\OpenNL\include\OpenNL\full_vector.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\OpenNL\include\OpenNL\linear_solver.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\OpenNL\include\OpenNL\sparse_matrix.h">
|
||||
</File>
|
||||
</Filter>
|
||||
</Files>
|
||||
<Globals>
|
||||
</Globals>
|
||||
</VisualStudioProject>
|
||||
|
|
@ -1,118 +0,0 @@
|
|||
// Square_border_parameterization.C
|
||||
|
||||
#include "short_names.h" // must be included first
|
||||
|
||||
#include <CGAL/Cartesian.h>
|
||||
#include <CGAL/Polyhedron_3.h>
|
||||
#include <CGAL/IO/Polyhedron_iostream.h>
|
||||
#include <CGAL/Parameterization_polyhedron_adaptor_3.h>
|
||||
#include <CGAL/parameterize.h>
|
||||
#include <CGAL/Square_border_parameterizer_3.h>
|
||||
|
||||
#include <iostream>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <fstream>
|
||||
#include <cassert>
|
||||
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Private types
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
typedef CGAL::Cartesian<double> Kernel;
|
||||
typedef CGAL::Polyhedron_3<Kernel> Polyhedron;
|
||||
|
||||
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// main()
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
int main(int argc,char * argv[])
|
||||
{
|
||||
std::cerr << "PARAMETERIZATION" << std::endl;
|
||||
std::cerr << " Floater parameterization" << std::endl;
|
||||
std::cerr << " square border" << std::endl;
|
||||
std::cerr << " OpenNL solver" << std::endl;
|
||||
|
||||
//***************************************
|
||||
// decode parameters
|
||||
//***************************************
|
||||
|
||||
if (argc-1 != 1)
|
||||
{
|
||||
std::cerr << "Usage: " << argv[0] << " input_file.off" << std::endl;
|
||||
return(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
// File name is:
|
||||
const char* input_filename = argv[1];
|
||||
|
||||
//***************************************
|
||||
// Read the mesh
|
||||
//***************************************
|
||||
|
||||
// Read the mesh
|
||||
std::ifstream stream(input_filename);
|
||||
if(!stream)
|
||||
{
|
||||
std::cerr << "FATAL ERROR: cannot open file " << input_filename << std::endl;
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
Polyhedron mesh;
|
||||
stream >> mesh;
|
||||
|
||||
//***************************************
|
||||
// Create mesh adaptor
|
||||
// Note: parameterization methods support only
|
||||
// meshes that are topological disks
|
||||
//***************************************
|
||||
|
||||
// The parameterization package needs an adaptor to handle Polyhedron_3 meshes
|
||||
typedef CGAL::Parameterization_polyhedron_adaptor_3<Polyhedron>
|
||||
Parameterization_polyhedron_adaptor;
|
||||
Parameterization_polyhedron_adaptor mesh_adaptor(&mesh);
|
||||
|
||||
|
||||
//***************************************
|
||||
// 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());
|
||||
if (err != Parameterizer::OK)
|
||||
std::cerr << "FATAL ERROR: " << Parameterizer::get_error_message(err) << std::endl;
|
||||
|
||||
//***************************************
|
||||
// Output
|
||||
//***************************************
|
||||
|
||||
if (err == Parameterizer::OK)
|
||||
{
|
||||
// Raw output: dump (u,v) pairs
|
||||
Polyhedron::Vertex_const_iterator pVertex;
|
||||
for (pVertex = mesh.vertices_begin();
|
||||
pVertex != mesh.vertices_end();
|
||||
pVertex++)
|
||||
{
|
||||
// (u,v) pair is stored in any halfedge
|
||||
double u = mesh_adaptor.info(pVertex->halfedge())->uv().x();
|
||||
double v = mesh_adaptor.info(pVertex->halfedge())->uv().y();
|
||||
std::cout << "(u,v) = (" << u << "," << v << ")" << std::endl;
|
||||
}
|
||||
}
|
||||
|
||||
return (err == Parameterizer::OK) ? EXIT_SUCCESS : EXIT_FAILURE;
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -1 +0,0 @@
|
|||
data/three_peaks.off
|
||||
|
|
@ -1,216 +0,0 @@
|
|||
<?xml version="1.0" encoding="Windows-1252"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="7.10"
|
||||
Name="Square_border_parameterization"
|
||||
ProjectGUID="{E2A5087B-4619-4EDD-A6BA-5655F62BA4FE}"
|
||||
Keyword="Win32Proj">
|
||||
<Platforms>
|
||||
<Platform
|
||||
Name="Win32"/>
|
||||
</Platforms>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="Debug|Win32"
|
||||
OutputDirectory="Debug"
|
||||
IntermediateDirectory="Debug"
|
||||
ConfigurationType="1"
|
||||
CharacterSet="0">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
ImproveFloatingPointConsistency="TRUE"
|
||||
AdditionalIncludeDirectories=".\include;..\..\include;..\..\..\OpenNL\include;"$(CGALROOT)\include\CGAL\config\msvc7";"$(CGALROOT)\include""
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;CGAL_PARAMETERIZATION_CHECK_EXPENSIVE;CGAL_USE_GMP"
|
||||
MinimalRebuild="TRUE"
|
||||
BasicRuntimeChecks="0"
|
||||
RuntimeLibrary="5"
|
||||
BufferSecurityCheck="FALSE"
|
||||
DisableLanguageExtensions="FALSE"
|
||||
ForceConformanceInForLoopScope="FALSE"
|
||||
RuntimeTypeInfo="TRUE"
|
||||
UsePrecompiledHeader="0"
|
||||
BrowseInformation="1"
|
||||
WarningLevel="2"
|
||||
Detect64BitPortabilityProblems="FALSE"
|
||||
DebugInformationFormat="4"
|
||||
ShowIncludes="FALSE"/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalOptions="CGAL_debug.lib gmp.lib"
|
||||
OutputFile="$(OutDir)/Square_border_parameterization.exe"
|
||||
LinkIncremental="2"
|
||||
AdditionalLibraryDirectories=""$(CGALROOT)\lib\msvc7""
|
||||
GenerateDebugInformation="TRUE"
|
||||
ProgramDatabaseFile="$(OutDir)/$(ProjectName).pdb"
|
||||
SubSystem="1"
|
||||
TargetMachine="1"/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"/>
|
||||
<Tool
|
||||
Name="VCManagedWrapperGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
OutputDirectory="Release"
|
||||
IntermediateDirectory="Release"
|
||||
ConfigurationType="1"
|
||||
CharacterSet="0">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalOptions="/Og-"
|
||||
Optimization="2"
|
||||
GlobalOptimizations="TRUE"
|
||||
EnableIntrinsicFunctions="TRUE"
|
||||
ImproveFloatingPointConsistency="TRUE"
|
||||
FavorSizeOrSpeed="1"
|
||||
OptimizeForProcessor="3"
|
||||
OptimizeForWindowsApplication="TRUE"
|
||||
AdditionalIncludeDirectories=".\include;..\..\include;..\..\..\OpenNL\include;"$(CGALROOT)\include\CGAL\config\msvc7";"$(CGALROOT)\include""
|
||||
PreprocessorDefinitions="WIN32;CGAL_PARAMETERIZATION_CHECK_EXPENSIVE;CGAL_USE_GMP"
|
||||
RuntimeLibrary="4"
|
||||
DisableLanguageExtensions="FALSE"
|
||||
ForceConformanceInForLoopScope="TRUE"
|
||||
RuntimeTypeInfo="TRUE"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="2"
|
||||
Detect64BitPortabilityProblems="FALSE"
|
||||
DebugInformationFormat="0"/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalOptions="CGAL.lib gmp.lib"
|
||||
OutputFile="$(OutDir)/Square_border_parameterization.exe"
|
||||
LinkIncremental="1"
|
||||
AdditionalLibraryDirectories=""$(CGALROOT)\lib\msvc7""
|
||||
GenerateDebugInformation="FALSE"
|
||||
SubSystem="1"
|
||||
OptimizeReferences="2"
|
||||
EnableCOMDATFolding="2"
|
||||
TargetMachine="1"/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"/>
|
||||
<Tool
|
||||
Name="VCManagedWrapperGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<References>
|
||||
</References>
|
||||
<Files>
|
||||
<Filter
|
||||
Name="Source Files"
|
||||
Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
|
||||
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}">
|
||||
<File
|
||||
RelativePath=".\Square_border_parameterization.C">
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
CompileAs="2"/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
CompileAs="2"/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Header Files"
|
||||
Filter="h;hpp;hxx;hm;inl;inc;xsd"
|
||||
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}">
|
||||
<File
|
||||
RelativePath=".\include\short_names.h">
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Parameterization package"
|
||||
Filter="">
|
||||
<File
|
||||
RelativePath="..\..\include\Cgal\Fixed_border_parameterizer_3.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\include\Cgal\Mean_value_coordinates_parameterizer_3.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\include\Cgal\Parameterization_mesh_feature_extractor.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\include\Cgal\Parameterization_polyhedron_adaptor_3.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\include\Cgal\parameterize.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\include\Cgal\parameterization_assertions.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\include\Cgal\Parameterizer_traits_3.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\include\Cgal\Square_border_parameterizer_3.h">
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="OpenNL"
|
||||
Filter="">
|
||||
<File
|
||||
RelativePath="..\..\..\OpenNL\include\OpenNL\bicgstab.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\OpenNL\include\OpenNL\blas.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\OpenNL\include\OpenNL\conjugate_gradient.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\OpenNL\include\OpenNL\full_vector.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\OpenNL\include\OpenNL\linear_solver.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\..\OpenNL\include\OpenNL\sparse_matrix.h">
|
||||
</File>
|
||||
</Filter>
|
||||
</Files>
|
||||
<Globals>
|
||||
</Globals>
|
||||
</VisualStudioProject>
|
||||
|
|
@ -1,229 +0,0 @@
|
|||
// Taucs_parameterization.C
|
||||
|
||||
#ifdef CGAL_USE_TAUCS
|
||||
|
||||
|
||||
#include "short_names.h" // must be included first
|
||||
|
||||
#include <CGAL/Cartesian.h>
|
||||
#include <CGAL/Polyhedron_3.h>
|
||||
#include <CGAL/IO/Polyhedron_iostream.h>
|
||||
#include <CGAL/Parameterization_polyhedron_adaptor_3.h>
|
||||
#include <CGAL/parameterize.h>
|
||||
|
||||
#include <CGAL/Taucs_solver_traits.h>
|
||||
|
||||
#include <iostream>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <fstream>
|
||||
#include <cassert>
|
||||
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Private types
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
typedef CGAL::Cartesian<double> Kernel;
|
||||
typedef CGAL::Polyhedron_3<Kernel> Polyhedron;
|
||||
|
||||
// Mesh adaptor
|
||||
typedef CGAL::Parameterization_polyhedron_adaptor_3<Polyhedron>
|
||||
Parameterization_polyhedron_adaptor;
|
||||
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Private functions
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
// Dump parameterized mesh to an eps file
|
||||
static bool write_file_eps(const Parameterization_polyhedron_adaptor& mesh_adaptor,
|
||||
const char *pFilename,
|
||||
double scale = 500.0)
|
||||
{
|
||||
const Polyhedron* mesh = mesh_adaptor.get_adapted_mesh();
|
||||
assert(mesh != NULL);
|
||||
assert(pFilename != NULL);
|
||||
|
||||
std::ofstream out(pFilename);
|
||||
if(!out)
|
||||
return false;
|
||||
CGAL::set_ascii_mode(out);
|
||||
|
||||
// compute bounding box
|
||||
double xmin,xmax,ymin,ymax;
|
||||
xmin = ymin = xmax = ymax = 0;
|
||||
Polyhedron::Halfedge_const_iterator pHalfedge;
|
||||
for (pHalfedge = mesh->halfedges_begin();
|
||||
pHalfedge != mesh->halfedges_end();
|
||||
pHalfedge++)
|
||||
{
|
||||
double x1 = scale * mesh_adaptor.info(pHalfedge->prev())->uv().x();
|
||||
double y1 = scale * mesh_adaptor.info(pHalfedge->prev())->uv().y();
|
||||
double x2 = scale * mesh_adaptor.info(pHalfedge)->uv().x();
|
||||
double y2 = scale * mesh_adaptor.info(pHalfedge)->uv().y();
|
||||
xmin = std::min(xmin,x1);
|
||||
xmin = std::min(xmin,x2);
|
||||
xmax = std::max(xmax,x1);
|
||||
xmax = std::max(xmax,x2);
|
||||
ymax = std::max(ymax,y1);
|
||||
ymax = std::max(ymax,y2);
|
||||
ymin = std::min(ymin,y1);
|
||||
ymin = std::min(ymin,y2);
|
||||
}
|
||||
|
||||
out << "%!PS-Adobe-2.0 EPSF-2.0" << std::endl;
|
||||
out << "%%BoundingBox: " << int(xmin+0.5) << " "
|
||||
<< int(ymin+0.5) << " "
|
||||
<< int(xmax+0.5) << " "
|
||||
<< int(ymax+0.5) << std::endl;
|
||||
out << "%%HiResBoundingBox: " << xmin << " "
|
||||
<< ymin << " "
|
||||
<< xmax << " "
|
||||
<< ymax << std::endl;
|
||||
out << "%%EndComments" << std::endl;
|
||||
out << "gsave" << std::endl;
|
||||
out << "0.1 setlinewidth" << std::endl;
|
||||
|
||||
// color macros
|
||||
out << std::endl;
|
||||
out << "% RGB color command - r g b C" << std::endl;
|
||||
out << "/C { setrgbcolor } bind def" << std::endl;
|
||||
out << "/white { 1 1 1 C } bind def" << std::endl;
|
||||
out << "/black { 0 0 0 C } bind def" << std::endl;
|
||||
|
||||
// edge macro -> E
|
||||
out << std::endl;
|
||||
out << "% Black stroke - x1 y1 x2 y2 E" << std::endl;
|
||||
out << "/E {moveto lineto stroke} bind def" << std::endl;
|
||||
out << "black" << std::endl << std::endl;
|
||||
|
||||
// for each halfedge
|
||||
for (pHalfedge = mesh->halfedges_begin();
|
||||
pHalfedge != mesh->halfedges_end();
|
||||
pHalfedge++)
|
||||
{
|
||||
double x1 = scale * mesh_adaptor.info(pHalfedge->prev())->uv().x();
|
||||
double y1 = scale * mesh_adaptor.info(pHalfedge->prev())->uv().y();
|
||||
double x2 = scale * mesh_adaptor.info(pHalfedge)->uv().x();
|
||||
double y2 = scale * mesh_adaptor.info(pHalfedge)->uv().y();
|
||||
out << x1 << " " << y1 << " " << x2 << " " << y2 << " E" << std::endl;
|
||||
}
|
||||
|
||||
/* Emit EPS trailer. */
|
||||
out << "grestore" << std::endl;
|
||||
out << std::endl;
|
||||
out << "showpage" << std::endl;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// main()
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
int main(int argc,char * argv[])
|
||||
{
|
||||
std::cerr << "PARAMETERIZATION" << std::endl;
|
||||
std::cerr << " Floater parameterization" << std::endl;
|
||||
std::cerr << " Circle border" << std::endl;
|
||||
std::cerr << " TAUCS solver" << std::endl;
|
||||
std::cerr << " Output: EPS" << std::endl;
|
||||
|
||||
//***************************************
|
||||
// decode parameters
|
||||
//***************************************
|
||||
|
||||
if (argc-1 != 2)
|
||||
{
|
||||
std::cerr << "Usage: " << argv[0] << " input_file.off output_file.eps" << std::endl;
|
||||
return(EXIT_FAILURE);
|
||||
}
|
||||
|
||||
// File names are:
|
||||
const char* input_filename = argv[1];
|
||||
const char* output_filename = argv[2];
|
||||
|
||||
//***************************************
|
||||
// Read the mesh
|
||||
//***************************************
|
||||
|
||||
// Read the mesh
|
||||
std::ifstream stream(input_filename);
|
||||
if(!stream)
|
||||
{
|
||||
std::cerr << "FATAL ERROR: cannot open file " << input_filename << std::endl;
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
Polyhedron mesh;
|
||||
stream >> mesh;
|
||||
|
||||
//***************************************
|
||||
// Create mesh adaptor
|
||||
// Note: parameterization methods support only
|
||||
// meshes that are topological disks
|
||||
//***************************************
|
||||
|
||||
// The parameterization package needs an adaptor to handle Polyhedron_3 meshes
|
||||
Parameterization_polyhedron_adaptor mesh_adaptor(&mesh);
|
||||
|
||||
//***************************************
|
||||
// Floater Mean Value Coordinates parameterizer (circular border)
|
||||
// with TAUCS solver
|
||||
//***************************************
|
||||
|
||||
// Circular border parameterizer (the default)
|
||||
typedef CGAL::Circular_border_arc_length_parameterizer_3<Parameterization_polyhedron_adaptor>
|
||||
Border_parameterizer;
|
||||
// TAUCS solver
|
||||
typedef CGAL::Taucs_solver_traits<double> Solver;
|
||||
|
||||
// Floater Mean Value Coordinates parameterizer (circular border)
|
||||
// with TAUCS solver
|
||||
typedef CGAL::Mean_value_coordinates_parameterizer_3<Parameterization_polyhedron_adaptor,
|
||||
Border_parameterizer,
|
||||
Solver>
|
||||
Parameterizer;
|
||||
|
||||
Parameterizer::Error_code err = CGAL::parameterize(&mesh_adaptor, Parameterizer());
|
||||
if (err != Parameterizer::OK)
|
||||
std::cerr << "FATAL ERROR: " << Parameterizer::get_error_message(err) << std::endl;
|
||||
|
||||
//***************************************
|
||||
// Output
|
||||
//***************************************
|
||||
|
||||
// Write Postscript file
|
||||
if (err == Parameterizer::OK)
|
||||
{
|
||||
if ( ! write_file_eps(mesh_adaptor, output_filename) )
|
||||
{
|
||||
std::cerr << "FATAL ERROR: cannot write file " << output_filename << std::endl;
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
}
|
||||
|
||||
return (err == Parameterizer::OK) ? EXIT_SUCCESS : EXIT_FAILURE;
|
||||
}
|
||||
|
||||
|
||||
#else // CGAL_USE_TAUCS
|
||||
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Empty main() if TAUCS is not installed
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
int main(int argc,char * argv[])
|
||||
{
|
||||
std::cerr << "Skip test as TAUCS is not installed" << std::endl;
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
#endif // CGAL_USE_TAUCS
|
||||
|
||||
|
|
@ -1 +0,0 @@
|
|||
data/mannequin-devil.off mannequin-devil_floater_circle_taucs_parameterized.eps
|
||||
|
|
@ -1,208 +0,0 @@
|
|||
<?xml version="1.0" encoding="Windows-1252"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="7.10"
|
||||
Name="Taucs_parameterization"
|
||||
ProjectGUID="{E2A5087B-4619-4EDD-A6BA-5655F62BA4FE}"
|
||||
Keyword="Win32Proj">
|
||||
<Platforms>
|
||||
<Platform
|
||||
Name="Win32"/>
|
||||
</Platforms>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="Debug|Win32"
|
||||
OutputDirectory="Debug"
|
||||
IntermediateDirectory="Debug"
|
||||
ConfigurationType="1"
|
||||
CharacterSet="0">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalOptions="$(TESTSUITE_CXXFLAGS)"
|
||||
Optimization="0"
|
||||
ImproveFloatingPointConsistency="TRUE"
|
||||
AdditionalIncludeDirectories=".\include;..\..\include;..\..\..\OpenNL\include;"$(CGALROOT)\include\CGAL\config\msvc7";"$(CGALROOT)\include""
|
||||
PreprocessorDefinitions="WIN32;_WIN32_WINNT=0x0400;CGAL_PARAMETERIZATION_CHECK_EXPENSIVE;CGAL_USE_GMP"
|
||||
MinimalRebuild="TRUE"
|
||||
BasicRuntimeChecks="0"
|
||||
RuntimeLibrary="4"
|
||||
BufferSecurityCheck="FALSE"
|
||||
DisableLanguageExtensions="FALSE"
|
||||
ForceConformanceInForLoopScope="FALSE"
|
||||
RuntimeTypeInfo="TRUE"
|
||||
UsePrecompiledHeader="0"
|
||||
BrowseInformation="1"
|
||||
WarningLevel="2"
|
||||
Detect64BitPortabilityProblems="FALSE"
|
||||
DebugInformationFormat="4"
|
||||
ShowIncludes="FALSE"/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalOptions="CGAL.lib gmp.lib /NODEFAULTLIB:LIBCMT $(TESTSUITE_LDFLAGS)"
|
||||
OutputFile="$(OutDir)/Taucs_parameterization.exe"
|
||||
LinkIncremental="2"
|
||||
AdditionalLibraryDirectories=""$(CGALROOT)\lib\msvc7""
|
||||
GenerateDebugInformation="TRUE"
|
||||
ProgramDatabaseFile="$(OutDir)/$(ProjectName).pdb"
|
||||
SubSystem="1"
|
||||
TargetMachine="1"/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"/>
|
||||
<Tool
|
||||
Name="VCManagedWrapperGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
OutputDirectory="Release"
|
||||
IntermediateDirectory="Release"
|
||||
ConfigurationType="1"
|
||||
CharacterSet="0">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalOptions="/Og- $(TESTSUITE_CXXFLAGS)"
|
||||
Optimization="2"
|
||||
GlobalOptimizations="TRUE"
|
||||
EnableIntrinsicFunctions="TRUE"
|
||||
ImproveFloatingPointConsistency="TRUE"
|
||||
FavorSizeOrSpeed="1"
|
||||
OptimizeForProcessor="3"
|
||||
OptimizeForWindowsApplication="TRUE"
|
||||
AdditionalIncludeDirectories=".\include;..\..\include;..\..\..\OpenNL\include;"$(CGALROOT)\include\CGAL\config\msvc7";"$(CGALROOT)\include""
|
||||
PreprocessorDefinitions="WIN32;_WIN32_WINNT=0x0400;CGAL_PARAMETERIZATION_CHECK_EXPENSIVE;CGAL_USE_GMP"
|
||||
RuntimeLibrary="4"
|
||||
DisableLanguageExtensions="FALSE"
|
||||
ForceConformanceInForLoopScope="TRUE"
|
||||
RuntimeTypeInfo="TRUE"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="2"
|
||||
Detect64BitPortabilityProblems="FALSE"
|
||||
DebugInformationFormat="0"/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalOptions="CGAL.lib gmp.lib /NODEFAULTLIB:LIBCMT $(TESTSUITE_LDFLAGS)"
|
||||
OutputFile="$(OutDir)/Taucs_parameterization.exe"
|
||||
LinkIncremental="1"
|
||||
AdditionalLibraryDirectories=""$(CGALROOT)\lib\msvc7""
|
||||
GenerateDebugInformation="FALSE"
|
||||
SubSystem="1"
|
||||
OptimizeReferences="2"
|
||||
EnableCOMDATFolding="2"
|
||||
TargetMachine="1"/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCWebDeploymentTool"/>
|
||||
<Tool
|
||||
Name="VCManagedWrapperGeneratorTool"/>
|
||||
<Tool
|
||||
Name="VCAuxiliaryManagedWrapperGeneratorTool"/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<References>
|
||||
</References>
|
||||
<Files>
|
||||
<Filter
|
||||
Name="Source Files"
|
||||
Filter="cpp;c;cxx;def;odl;idl;hpj;bat;asm;asmx"
|
||||
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}">
|
||||
<File
|
||||
RelativePath=".\Taucs_parameterization.C">
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
CompileAs="2"/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32">
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
CompileAs="2"/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Header Files"
|
||||
Filter="h;hpp;hxx;hm;inl;inc;xsd"
|
||||
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}">
|
||||
<File
|
||||
RelativePath=".\include\short_names.h">
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Parameterization package"
|
||||
Filter="">
|
||||
<File
|
||||
RelativePath="..\..\include\Cgal\Circular_Border_parameterizer_3.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\include\Cgal\Fixed_border_parameterizer_3.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\include\Cgal\Mean_value_coordinates_parameterizer_3.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\include\Cgal\Parameterization_mesh_feature_extractor.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\include\Cgal\Parameterization_polyhedron_adaptor_3.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\include\Cgal\parameterize.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\include\Cgal\parameterization_assertions.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\include\Cgal\Parameterizer_traits_3.h">
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="TAUCS"
|
||||
Filter="">
|
||||
<File
|
||||
RelativePath="..\..\include\Cgal\Taucs_matrix.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\include\Cgal\Taucs_solver_traits.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\include\Cgal\Taucs_vector.h">
|
||||
</File>
|
||||
</Filter>
|
||||
</Files>
|
||||
<Globals>
|
||||
</Globals>
|
||||
</VisualStudioProject>
|
||||
|
|
@ -1,103 +0,0 @@
|
|||
#! /bin/sh
|
||||
|
||||
# This is a script for the CGAL test suite. Such a script must obey
|
||||
# the following rules:
|
||||
#
|
||||
# - the name of the script is cgal_test
|
||||
# - for every target two one line messages are written to the file 'error.txt'
|
||||
# the first one indicates if the compilation was successful
|
||||
# the second one indicates if the execution was successful
|
||||
# if one of the two was not successful, the line should start with 'ERROR:'
|
||||
# - running the script should not require any user interaction
|
||||
# - the script should clean up object files and executables
|
||||
|
||||
ERRORFILE=error.txt
|
||||
|
||||
#---------------------------------------------------------------------#
|
||||
# compile_and_run <target>
|
||||
#---------------------------------------------------------------------#
|
||||
|
||||
compile_and_run()
|
||||
{
|
||||
echo "Compiling $1 ... "
|
||||
SUCCES="y"
|
||||
if eval 'make CGAL_MAKEFILE=$CGAL_MAKEFILE \
|
||||
TESTSUITE_CXXFLAGS="$TESTSUITE_CXXFLAGS" \
|
||||
TESTSUITE_LDFLAGS="$TESTSUITE_LDFLAGS" $1' ; then
|
||||
echo " succesful compilation of $1" >> $ERRORFILE
|
||||
else
|
||||
echo " ERROR: compilation of $1" >> $ERRORFILE
|
||||
SUCCES=""
|
||||
fi
|
||||
|
||||
if [ -n "${SUCCES}" ] ; then
|
||||
OUTPUTFILE=ProgramOutput.$1.$PLATFORM
|
||||
rm -f $OUTPUTFILE
|
||||
COMMAND="./$1"
|
||||
if [ -f $1.cmd ] ; then
|
||||
COMMAND="$COMMAND `cat $1.cmd`"
|
||||
fi
|
||||
if [ -f $1.cin ] ; then
|
||||
COMMAND="cat $1.cin | $COMMAND"
|
||||
fi
|
||||
echo "Executing $1 ... "
|
||||
echo
|
||||
ulimit -t 2500
|
||||
if eval $COMMAND > $OUTPUTFILE 2>&1 ; then
|
||||
echo " succesful execution of $1" >> $ERRORFILE
|
||||
else
|
||||
echo " ERROR: execution of $1" >> $ERRORFILE
|
||||
fi
|
||||
else
|
||||
echo " ERROR: not executed $1" >> $ERRORFILE
|
||||
fi
|
||||
|
||||
eval "make CGAL_MAKEFILE=$CGAL_MAKEFILE clean > /dev/null 2>&1 "
|
||||
}
|
||||
|
||||
#---------------------------------------------------------------------#
|
||||
# remove the previous error file
|
||||
#---------------------------------------------------------------------#
|
||||
|
||||
rm -f $ERRORFILE
|
||||
touch $ERRORFILE
|
||||
|
||||
#---------------------------------------------------------------------#
|
||||
# set TAUCS compilation options
|
||||
# (temporary, until set by CGAL installer)
|
||||
#---------------------------------------------------------------------#
|
||||
|
||||
# if TAUCS is installed
|
||||
if [ -n "$TAUCSROOT" ] ; then
|
||||
# Evaluate dynamically TAUCS OSTYPE
|
||||
TAUCS_OSTYPE=`$CGAL/scripts/compute_TAUCS_OSTYPE`
|
||||
|
||||
# add TAUCS compilation options
|
||||
export TESTSUITE_CXXFLAGS="$TESTSUITE_CXXFLAGS \
|
||||
-DCGAL_USE_TAUCS \
|
||||
-I$TAUCSROOT/src \
|
||||
-I$TAUCSROOT/build/$TAUCS_OSTYPE"
|
||||
export TESTSUITE_LDFLAGS="$TESTSUITE_LDFLAGS \
|
||||
-L$TAUCSROOT/lib/$TAUCS_OSTYPE \
|
||||
-L$TAUCSROOT/external/lib/$TAUCS_OSTYPE \
|
||||
-ltaucs -llapack -lf77blas -lcblas -latlas -lmetis -lg2c"
|
||||
fi
|
||||
|
||||
#---------------------------------------------------------------------#
|
||||
# compile and run the tests
|
||||
#---------------------------------------------------------------------#
|
||||
|
||||
if [ $# -ne 0 ] ; then
|
||||
for file in $* ; do
|
||||
compile_and_run $file
|
||||
done
|
||||
else
|
||||
compile_and_run polyhedron_ex_parameterization
|
||||
compile_and_run Simple_parameterization
|
||||
compile_and_run Authalic_parameterization
|
||||
compile_and_run Square_border_parameterization
|
||||
compile_and_run Taucs_parameterization
|
||||
compile_and_run Mesh_cutting_parameterization
|
||||
compile_and_run Complete_parameterization_example
|
||||
fi
|
||||
|
||||
|
Before Width: | Height: | Size: 768 KiB |