From dd5b37d97cfaf40c557fcd6fd15bbd1b4255da5f Mon Sep 17 00:00:00 2001 From: Fernando Cacciola Date: Thu, 7 Sep 2006 23:55:58 +0000 Subject: [PATCH] Additions to the manual --- .gitattributes | 4 ++ .../Cached_cost.tex | 63 +++++++++++++++++++ .../Cached_placement.tex | 61 ++++++++++++++++++ .../Edge_length_cost.tex | 58 +++++++++++++++++ .../GetCost.tex | 5 +- .../GetPlacement.tex | 2 +- .../Midpoint_placement.tex | 58 +++++++++++++++++ .../Surface_mesh_simplification_ref/intro.tex | 4 ++ .../Surface_mesh_simplification_ref/main.tex | 4 ++ 9 files changed, 256 insertions(+), 3 deletions(-) create mode 100644 Surface_mesh_simplification/doc_tex/Surface_mesh_simplification_ref/Cached_cost.tex create mode 100644 Surface_mesh_simplification/doc_tex/Surface_mesh_simplification_ref/Cached_placement.tex create mode 100644 Surface_mesh_simplification/doc_tex/Surface_mesh_simplification_ref/Edge_length_cost.tex create mode 100644 Surface_mesh_simplification/doc_tex/Surface_mesh_simplification_ref/Midpoint_placement.tex diff --git a/.gitattributes b/.gitattributes index fa49ae28c71..e9ca9597ac5 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1981,13 +1981,17 @@ Surface_mesh_simplification/doc_tex/Surface_mesh_simplification.tex -text Surface_mesh_simplification/doc_tex/Surface_mesh_simplification/PkgDescription.tex -text Surface_mesh_simplification/doc_tex/Surface_mesh_simplification/Surface_mesh_simplification.tex -text Surface_mesh_simplification/doc_tex/Surface_mesh_simplification/main.tex -text +Surface_mesh_simplification/doc_tex/Surface_mesh_simplification_ref/Cached_cost.tex -text +Surface_mesh_simplification/doc_tex/Surface_mesh_simplification_ref/Cached_placement.tex -text Surface_mesh_simplification/doc_tex/Surface_mesh_simplification_ref/CollapseData.tex -text +Surface_mesh_simplification/doc_tex/Surface_mesh_simplification_ref/Edge_length_cost.tex -text Surface_mesh_simplification/doc_tex/Surface_mesh_simplification_ref/EmptyCollapseData.tex -text Surface_mesh_simplification/doc_tex/Surface_mesh_simplification_ref/Empty_collapse_data.tex -text Surface_mesh_simplification/doc_tex/Surface_mesh_simplification_ref/FullCollapseData.tex -text Surface_mesh_simplification/doc_tex/Surface_mesh_simplification_ref/Full_collapse_data.tex -text Surface_mesh_simplification/doc_tex/Surface_mesh_simplification_ref/GetCost.tex -text Surface_mesh_simplification/doc_tex/Surface_mesh_simplification_ref/GetPlacement.tex -text +Surface_mesh_simplification/doc_tex/Surface_mesh_simplification_ref/Midpoint_placement.tex -text Surface_mesh_simplification/doc_tex/Surface_mesh_simplification_ref/PartialCollapseData.tex -text Surface_mesh_simplification/doc_tex/Surface_mesh_simplification_ref/Partial_collapse_data.tex -text Surface_mesh_simplification/doc_tex/Surface_mesh_simplification_ref/intro.tex -text diff --git a/Surface_mesh_simplification/doc_tex/Surface_mesh_simplification_ref/Cached_cost.tex b/Surface_mesh_simplification/doc_tex/Surface_mesh_simplification_ref/Cached_cost.tex new file mode 100644 index 00000000000..e2b658f4fff --- /dev/null +++ b/Surface_mesh_simplification/doc_tex/Surface_mesh_simplification_ref/Cached_cost.tex @@ -0,0 +1,63 @@ +%% Copyright (c) 2004 SciSoft. 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. +%% +%% +%% +%% Author(s) : Fernando Cacciola + + +\begin{ccRefClass}{CGAL::Surface_mesh_simplification::Edge_collapse::Cached_cost} + +%% add template arg's if necessary + +%% \ccHtmlCrossLink{} %% add further rules for cross referencing links +%% \ccHtmlIndexC[class]{} %% add further index entries +\ccCreationVariable{d} +\ccDefinition + +The class \ccRefName\ provides a model for the \ccc{GetCost} concept. +It directly returns the cost stored in the {\em collapse-data}. + +\ccInclude{CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Cached_cost.h} + +\ccIsModel +\ccc{GetCost} + +\ccCreation +\ccCreationVariable{gc} %% choose variable name +\ccConstructor{Cached_cost();}{Default constructor} + +\ccHeading{Methods} + \ccMethod{template + result_type operator()( edge_descriptor const& edge + , TSM& surface + , Collapse_data const& data + , Params const* params + ) const; + } + {Returns the {\em cost} stored in \ccc{data}, whose type must be a model of + \ccc{PartialCollapseData} or \ccc{FullCollapseData}. All arguments + except \ccc{data} are ignored. + } + +\ccSeeAlso +\ccc{PartialCollapseData}\\ +\ccc{FullCollapseData}\\ +\ccc{SetCollapseData} + +\end{ccRefClass} + +% +------------------------------------------------------------------------+ +%%RefPage: end of main body, begin of footer +% EOF +% +------------------------------------------------------------------------+ + diff --git a/Surface_mesh_simplification/doc_tex/Surface_mesh_simplification_ref/Cached_placement.tex b/Surface_mesh_simplification/doc_tex/Surface_mesh_simplification_ref/Cached_placement.tex new file mode 100644 index 00000000000..10d32da5808 --- /dev/null +++ b/Surface_mesh_simplification/doc_tex/Surface_mesh_simplification_ref/Cached_placement.tex @@ -0,0 +1,61 @@ +%% Copyright (c) 2004 SciSoft. 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. +%% +%% +%% +%% Author(s) : Fernando Cacciola + + +\begin{ccRefClass}{CGAL::Surface_mesh_simplification::Edge_collapse::Cached_placement} + +%% add template arg's if necessary + +%% \ccHtmlCrossLink{} %% add further rules for cross referencing links +%% \ccHtmlIndexC[class]{} %% add further index entries +\ccCreationVariable{d} +\ccDefinition + +The class \ccRefName\ provides a model for the \ccc{GetPlacement} concept. +It directly returns the placement stored in the {\em collapse-data}. + +\ccInclude{CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Cached_placement.h} + +\ccIsModel +\ccc{GetPlacement} + +\ccCreation +\ccCreationVariable{gc} %% choose variable name +\ccConstructor{Cached_cost();}{Default constructor} + +\ccHeading{Methods} + \ccMethod{template + result_type operator()( edge_descriptor const& edge + , TSM& surface + , Collapse_data const& data + , Params const* params + ) const; + } + {Returns the {\em placement} (vertex position) stored in \ccc{data}, whose type must be + a model of \ccc{FullCollapseData}. All arguments except \ccc{data} are ignored. + } + +\ccSeeAlso +\ccc{FullCollapseData}\\ +\ccc{SetCollapseData} + +\end{ccRefClass} + +% +------------------------------------------------------------------------+ +%%RefPage: end of main body, begin of footer +% EOF +% +------------------------------------------------------------------------+ + diff --git a/Surface_mesh_simplification/doc_tex/Surface_mesh_simplification_ref/Edge_length_cost.tex b/Surface_mesh_simplification/doc_tex/Surface_mesh_simplification_ref/Edge_length_cost.tex new file mode 100644 index 00000000000..609581dd429 --- /dev/null +++ b/Surface_mesh_simplification/doc_tex/Surface_mesh_simplification_ref/Edge_length_cost.tex @@ -0,0 +1,58 @@ +%% Copyright (c) 2004 SciSoft. 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. +%% +%% +%% +%% Author(s) : Fernando Cacciola + + +\begin{ccRefClass}{CGAL::Surface_mesh_simplification::Edge_collapse::Edge_length_cost} + +%% add template arg's if necessary + +%% \ccHtmlCrossLink{} %% add further rules for cross referencing links +%% \ccHtmlIndexC[class]{} %% add further index entries +\ccCreationVariable{d} +\ccDefinition + +The class \ccRefName\ provides a model for the \ccc{GetCost} concept. +It computes the collapse cost as the squared length of the edge. + +\ccInclude{CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Edge_length_cost.h} + +\ccIsModel +\ccc{GetCost} + +\ccCreation +\ccCreationVariable{gc} %% choose variable name +\ccConstructor{Edge_length_cost();}{Default constructor} + +\ccHeading{Methods} + \ccMethod{template + result_type operator()( edge_descriptor const& edge + , TSM& surface + , Collapse_data const& data + , Params const* params + ) const; + } + {Returns the {\em collaspe cost} as the squared distance between the points + of the source and target vertices of \ccc{edge}. All arguments + except \ccc{edge} and \ccc{surface} are ignored. + } + +\end{ccRefClass} + +% +------------------------------------------------------------------------+ +%%RefPage: end of main body, begin of footer +% EOF +% +------------------------------------------------------------------------+ + diff --git a/Surface_mesh_simplification/doc_tex/Surface_mesh_simplification_ref/GetCost.tex b/Surface_mesh_simplification/doc_tex/Surface_mesh_simplification_ref/GetCost.tex index 1f4795dce9a..12e0a34bf26 100644 --- a/Surface_mesh_simplification/doc_tex/Surface_mesh_simplification_ref/GetCost.tex +++ b/Surface_mesh_simplification/doc_tex/Surface_mesh_simplification_ref/GetCost.tex @@ -43,8 +43,9 @@ The cost returned is an \ccc{boost::optional} value (i.e. it can be absent). An \ccCreation \ccCreationVariable{gc} %% choose variable name -\ccConstructor{GetCost();}{Default constructor} -\ccAccessFunctions +\ccConstructor{GetCost();}{Default constructor} + +\ccHeading{Methods} \ccMethod{template result_type operator()( edge_descriptor const& edge , TSM& surface diff --git a/Surface_mesh_simplification/doc_tex/Surface_mesh_simplification_ref/GetPlacement.tex b/Surface_mesh_simplification/doc_tex/Surface_mesh_simplification_ref/GetPlacement.tex index 01c003d9bd1..9b3dc80883b 100644 --- a/Surface_mesh_simplification/doc_tex/Surface_mesh_simplification_ref/GetPlacement.tex +++ b/Surface_mesh_simplification/doc_tex/Surface_mesh_simplification_ref/GetPlacement.tex @@ -47,7 +47,7 @@ A model of this concept can simply return the placement stored in the passed col \ccConstructor{GetCost();}{Default constructor} -\ccAccessFunctions +\ccHeading{Methods} \ccMethod{template result_type operator()( edge_descriptor const& edge , TSM& surface diff --git a/Surface_mesh_simplification/doc_tex/Surface_mesh_simplification_ref/Midpoint_placement.tex b/Surface_mesh_simplification/doc_tex/Surface_mesh_simplification_ref/Midpoint_placement.tex new file mode 100644 index 00000000000..0c861829d58 --- /dev/null +++ b/Surface_mesh_simplification/doc_tex/Surface_mesh_simplification_ref/Midpoint_placement.tex @@ -0,0 +1,58 @@ +%% Copyright (c) 2004 SciSoft. 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. +%% +%% +%% +%% Author(s) : Fernando Cacciola + + +\begin{ccRefClass}{CGAL::Surface_mesh_simplification::Edge_collapse::Midpoint_placement} + +%% add template arg's if necessary + +%% \ccHtmlCrossLink{} %% add further rules for cross referencing links +%% \ccHtmlIndexC[class]{} %% add further index entries +\ccCreationVariable{d} +\ccDefinition + +The class \ccRefName\ provides a model for the \ccc{GetPlacement} concept. +It computes the placement as the midpoint position along the edge. + +\ccInclude{CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Midpoint_placement.h} + +\ccIsModel +\ccc{GetPlacement} + +\ccCreation +\ccCreationVariable{gp} %% choose variable name +\ccConstructor{Midpoint_placement();}{Default constructor} + +\ccHeading{Methods} + \ccMethod{template + result_type operator()( edge_descriptor const& edge + , TSM& surface + , Collapse_data const& data + , Params const* params + ) const; + } + {Returns the {\em placement} (vertex position) as the midpoint between + the points of the source and target vertices of \ccc{edge}. All arguments + except \ccc{edge} and \ccc{surface} are ignored. + } + +\end{ccRefClass} + +% +------------------------------------------------------------------------+ +%%RefPage: end of main body, begin of footer +% EOF +% +------------------------------------------------------------------------+ + diff --git a/Surface_mesh_simplification/doc_tex/Surface_mesh_simplification_ref/intro.tex b/Surface_mesh_simplification/doc_tex/Surface_mesh_simplification_ref/intro.tex index c8247baaafc..80990b39c59 100644 --- a/Surface_mesh_simplification/doc_tex/Surface_mesh_simplification_ref/intro.tex +++ b/Surface_mesh_simplification/doc_tex/Surface_mesh_simplification_ref/intro.tex @@ -36,6 +36,10 @@ by iterative edge-collapsing. \ccRefIdfierPage{CGAL::Triangulated_surface_mesh::Simplification::Edge_collapse::Empty_collapse_data}\\ \ccRefIdfierPage{CGAL::Triangulated_surface_mesh::Simplification::Edge_collapse::Partial_collapse_data}\\ \ccRefIdfierPage{CGAL::Triangulated_surface_mesh::Simplification::Edge_collapse::Full_collapse_data}\\ +\ccRefIdfierPage{CGAL::Triangulated_surface_mesh::Simplification::Edge_collapse::Cached_cost}\\ +\ccRefIdfierPage{CGAL::Triangulated_surface_mesh::Simplification::Edge_collapse::Cached_placement}\\ +\ccRefIdfierPage{CGAL::Triangulated_surface_mesh::Simplification::Edge_collapse::Edge_length_cost}\\ +\ccRefIdfierPage{CGAL::Triangulated_surface_mesh::Simplification::Edge_collapse::Midpoint_placement}\\ % +------------------------------------------------------------------------+ %%RefPage: end of main body, begin of footer diff --git a/Surface_mesh_simplification/doc_tex/Surface_mesh_simplification_ref/main.tex b/Surface_mesh_simplification/doc_tex/Surface_mesh_simplification_ref/main.tex index 954d36a4d37..77e398ef936 100644 --- a/Surface_mesh_simplification/doc_tex/Surface_mesh_simplification_ref/main.tex +++ b/Surface_mesh_simplification/doc_tex/Surface_mesh_simplification_ref/main.tex @@ -15,5 +15,9 @@ \input{Surface_mesh_simplification_ref/Empty_collapse_data.tex} \input{Surface_mesh_simplification_ref/Partial_collapse_data.tex} \input{Surface_mesh_simplification_ref/Full_collapse_data.tex} +\input{Surface_mesh_simplification_ref/Cached_cost.tex} +\input{Surface_mesh_simplification_ref/Cached_placement.tex} +\input{Surface_mesh_simplification_ref/Edge_length_cost.tex} +\input{Surface_mesh_simplification_ref/Midpoint_placement.tex} %% EOF