diff --git a/.gitattributes b/.gitattributes index c2fc1b4a6ba..881a4cc8c37 100644 --- a/.gitattributes +++ b/.gitattributes @@ -2080,6 +2080,8 @@ Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Ed Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Partial_collapse_data.h -text Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Set_full_collapse_data.h -text Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/Set_partial_collapse_data.h -text +Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Polyhedron.h -text +Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Vertex_is_fixed_map_always_false.h -text Surface_mesh_simplification/test/Surface_mesh_simplification/edge_collapse_test.cpp -text Surface_mesh_simplification/test/Surface_mesh_simplification/edge_collapse_test.kdevelop -text Surface_mesher/demo/Surface_mesher/windows/Mesh.suo -text diff --git a/Surface_mesh_simplification/doc_tex/Surface_mesh_simplification/Surface_mesh_simplification.tex b/Surface_mesh_simplification/doc_tex/Surface_mesh_simplification/Surface_mesh_simplification.tex index 48e50a4bae4..2001ba065d7 100644 --- a/Surface_mesh_simplification/doc_tex/Surface_mesh_simplification/Surface_mesh_simplification.tex +++ b/Surface_mesh_simplification/doc_tex/Surface_mesh_simplification/Surface_mesh_simplification.tex @@ -179,48 +179,49 @@ Some lines are marked with \ccc{<==== NOTICE THIS} to drive the attention to an This example illustrates the simplest of the cases using an ordinary polyhedron as surface and all default policies. -\ccIncludeExampleCode{Surface_mesh_simplification/LT_edge_collapse_polyhedron_example.cpp} +\ccIncludeExampleCode{Surface_mesh_simplification/LT_edge_collapse_polyhedron.cpp} \subsubsection{Example Using Enriched Polyhedron} This example shows how to use an enriched polyhedron which stores the extra pointer in the halfedges. -\ccIncludeExampleCode{Surface_mesh_simplification/LT_edge_collapse_enriched_polyhedron_example.cpp} + +\ccIncludeExampleCode{Surface_mesh_simplification/LT_edge_collapse_enriched_polyhedron.cpp} \subsubsection{Example using Non-Default Cost Strategy} This example shows how to use a cost strategy other than the default. -\ccIncludeExampleCode{Surface_mesh_simplification/MP_edge_collapse_polyhedron_example.cpp} +\ccIncludeExampleCode{Surface_mesh_simplification/MP_edge_collapse_polyhedron.cpp} \subsubsection{Example using a full cache for the Collapse Data} This example shows how to use a full collapse-data cache for efficiency. The setup in this case is slightly different for the default cost-strategy (Lindstrom-Turk) than for alternative strategies, so both cases are shown. -\ccIncludeExampleCode{Surface_mesh_simplification/Edge_collapse_fully_cached_polyhedron_example.cpp} +\ccIncludeExampleCode{Surface_mesh_simplification/Edge_collapse_fully_cached_polyhedron.cpp} \subsubsection{Example using a Visitor} This example shows how to use a visitor to track the simplification process. It also shows how to setup the Lindstrom-Turk cost strategy but with a partial case (unlike a full cache as in the previous example). -\ccIncludeExampleCode{Surface_mesh_simplification/LT_edge_collapse_visited_polyhedron_example.cpp} +\ccIncludeExampleCode{Surface_mesh_simplification/LT_edge_collapse_visited_polyhedron.cpp} \subsubsection{Example using Fixed Vertices via an external Property Map} This example shows how to fix vertices to prevent edges from being collapsed, using an ordinary polyhedron and external maps. -\ccIncludeExampleCode{Surface_mesh_simplification/LT_edge_collapse_with_fixed_vertices_polyhedron_example.cpp} +\ccIncludeExampleCode{Surface_mesh_simplification/LT_edge_collapse_with_fixed_vertices_polyhedron.cpp} \subsubsection{Example using Fixed Vertices via an Enriched Polyhedron} This example shows how to fix vertices to prevent edges from being collapsed using an enriched polyhedron. -\ccIncludeExampleCode{Surface_mesh_simplification/LT_edge_collapse_with_fixed_vertices_enriched_polyhedron_example.cpp} +\ccIncludeExampleCode{Surface_mesh_simplification/LT_edge_collapse_with_fixed_vertices_enriched_polyhedron.cpp} % +------------------------------------------------------------------------+ %%RefPage: end of main body, begin of sfsooter diff --git a/Surface_mesh_simplification/doc_tex/Surface_mesh_simplification/main.tex b/Surface_mesh_simplification/doc_tex/Surface_mesh_simplification/main.tex index add327496f3..4dfff201f9b 100644 --- a/Surface_mesh_simplification/doc_tex/Surface_mesh_simplification/main.tex +++ b/Surface_mesh_simplification/doc_tex/Surface_mesh_simplification/main.tex @@ -11,7 +11,7 @@ %\input{Surface_mesh_simplification/PkgDescription.tex} -\minitoc +%\minitoc \input{Surface_mesh_simplification/Surface_mesh_simplification.tex} diff --git a/Surface_mesh_simplification/examples/Surface_mesh_simplification/makefile b/Surface_mesh_simplification/examples/Surface_mesh_simplification/makefile index c386bfcf95c..1b5003af5ec 100644 --- a/Surface_mesh_simplification/examples/Surface_mesh_simplification/makefile +++ b/Surface_mesh_simplification/examples/Surface_mesh_simplification/makefile @@ -31,50 +31,50 @@ LDFLAGS = $(CGAL_LDFLAGS) #---------------------------------------------------------------------# all: \ - LT_edge_collapse_polyhedron_example \ - LT_edge_collapse_enriched_polyhedron_example \ - MP_edge_collapse_polyhedron_example \ - Edge_collapse_fully_cached_polyhedron_example \ - LT_edge_collapse_visited_polyhedron_example \ - LT_edge_collapse_with_fixed_vertices_polyhedron_example \ - LT_edge_collapse_with_fixed_vertices_enriched_polyhedron_example \ + LT_edge_collapse_polyhedron \ + LT_edge_collapse_enriched_polyhedron \ + MP_edge_collapse_polyhedron \ + Edge_collapse_fully_cached_polyhedron \ + LT_edge_collapse_visited_polyhedron \ + LT_edge_collapse_with_fixed_vertices_polyhedron \ + LT_edge_collapse_with_fixed_vertices_enriched_polyhedron \ -LT_edge_collapse_polyhedron_example$(EXE_EXT): LT_edge_collapse_polyhedron_example$(OBJ_EXT) - $(CGAL_CXX) $(LIBPATH) $(EXE_OPT)LT_edge_collapse_polyhedron_example \ - LT_edge_collapse_polyhedron_example$(OBJ_EXT) $(LDFLAGS) +LT_edge_collapse_polyhedron$(EXE_EXT): LT_edge_collapse_polyhedron$(OBJ_EXT) + $(CGAL_CXX) $(LIBPATH) $(EXE_OPT)LT_edge_collapse_polyhedron \ + LT_edge_collapse_polyhedron$(OBJ_EXT) $(LDFLAGS) -LT_edge_collapse_enriched_polyhedron_example$(EXE_EXT): LT_edge_collapse_enriched_polyhedron_example$(OBJ_EXT) - $(CGAL_CXX) $(LIBPATH) $(EXE_OPT)LT_edge_collapse_enriched_polyhedron_example \ - LT_edge_collapse_enriched_polyhedron_example$(OBJ_EXT) $(LDFLAGS) +LT_edge_collapse_enriched_polyhedron$(EXE_EXT): LT_edge_collapse_enriched_polyhedron$(OBJ_EXT) + $(CGAL_CXX) $(LIBPATH) $(EXE_OPT)LT_edge_collapse_enriched_polyhedron \ + LT_edge_collapse_enriched_polyhedron$(OBJ_EXT) $(LDFLAGS) -MP_edge_collapse_polyhedron_example$(EXE_EXT): MP_edge_collapse_polyhedron_example$(OBJ_EXT) - $(CGAL_CXX) $(LIBPATH) $(EXE_OPT)MP_edge_collapse_polyhedron_example \ - MP_edge_collapse_polyhedron_example$(OBJ_EXT) $(LDFLAGS) +MP_edge_collapse_polyhedron$(EXE_EXT): MP_edge_collapse_polyhedron$(OBJ_EXT) + $(CGAL_CXX) $(LIBPATH) $(EXE_OPT)MP_edge_collapse_polyhedron \ + MP_edge_collapse_polyhedron$(OBJ_EXT) $(LDFLAGS) -Edge_collapse_fully_cached_polyhedron_example$(EXE_EXT): Edge_collapse_fully_cached_polyhedron_example$(OBJ_EXT) - $(CGAL_CXX) $(LIBPATH) $(EXE_OPT)Edge_collapse_fully_cached_polyhedron_example \ - Edge_collapse_fully_cached_polyhedron_example$(OBJ_EXT) $(LDFLAGS) +Edge_collapse_fully_cached_polyhedron$(EXE_EXT): Edge_collapse_fully_cached_polyhedron$(OBJ_EXT) + $(CGAL_CXX) $(LIBPATH) $(EXE_OPT)Edge_collapse_fully_cached_polyhedron \ + Edge_collapse_fully_cached_polyhedron$(OBJ_EXT) $(LDFLAGS) -LT_edge_collapse_visited_polyhedron_example$(EXE_EXT): LT_edge_collapse_visited_polyhedron_example$(OBJ_EXT) - $(CGAL_CXX) $(LIBPATH) $(EXE_OPT)LT_edge_collapse_visited_polyhedron_example \ - LT_edge_collapse_visited_polyhedron_example$(OBJ_EXT) $(LDFLAGS) +LT_edge_collapse_visited_polyhedron$(EXE_EXT): LT_edge_collapse_visited_polyhedron$(OBJ_EXT) + $(CGAL_CXX) $(LIBPATH) $(EXE_OPT)LT_edge_collapse_visited_polyhedron \ + LT_edge_collapse_visited_polyhedron$(OBJ_EXT) $(LDFLAGS) -LT_edge_collapse_with_fixed_vertices_polyhedron_example$(EXE_EXT): LT_edge_collapse_with_fixed_vertices_polyhedron_example$(OBJ_EXT) - $(CGAL_CXX) $(LIBPATH) $(EXE_OPT)LT_edge_collapse_with_fixed_vertices_polyhedron_example \ - LT_edge_collapse_with_fixed_vertices_polyhedron_example$(OBJ_EXT) $(LDFLAGS) +LT_edge_collapse_with_fixed_vertices_polyhedron$(EXE_EXT): LT_edge_collapse_with_fixed_vertices_polyhedron$(OBJ_EXT) + $(CGAL_CXX) $(LIBPATH) $(EXE_OPT)LT_edge_collapse_with_fixed_vertices_polyhedron \ + LT_edge_collapse_with_fixed_vertices_polyhedron$(OBJ_EXT) $(LDFLAGS) -LT_edge_collapse_with_fixed_vertices_enriched_polyhedron_example$(EXE_EXT): LT_edge_collapse_with_fixed_vertices_enriched_polyhedron_example$(OBJ_EXT) - $(CGAL_CXX) $(LIBPATH) $(EXE_OPT)LT_edge_collapse_with_fixed_vertices_enriched_polyhedron_example \ - LT_edge_collapse_with_fixed_vertices_enriched_polyhedron_example$(OBJ_EXT) $(LDFLAGS) +LT_edge_collapse_with_fixed_vertices_enriched_polyhedron$(EXE_EXT): LT_edge_collapse_with_fixed_vertices_enriched_polyhedron$(OBJ_EXT) + $(CGAL_CXX) $(LIBPATH) $(EXE_OPT)LT_edge_collapse_with_fixed_vertices_enriched_polyhedron \ + LT_edge_collapse_with_fixed_vertices_enriched_polyhedron$(OBJ_EXT) $(LDFLAGS) clean: \ - LT_edge_collapse_polyhedron_example.clean \ - LT_edge_collapse_enriched_polyhedron_example.clean \ - MP_edge_collapse_polyhedron_example.clean \ - Edge_collapse_fully_cached_polyhedron_example.clean \ - LT_edge_collapse_visited_polyhedron_example.clean \ - LT_edge_collapse_with_fixed_vertices_polyhedron_example.clean \ - LT_edge_collapse_with_fixed_vertices_enriched_polyhedron_example.clean \ + LT_edge_collapse_polyhedron.clean \ + LT_edge_collapse_enriched_polyhedron.clean \ + MP_edge_collapse_polyhedron.clean \ + Edge_collapse_fully_cached_polyhedron.clean \ + LT_edge_collapse_visited_polyhedron.clean \ + LT_edge_collapse_with_fixed_vertices_polyhedron.clean \ + LT_edge_collapse_with_fixed_vertices_enriched_polyhedron.clean \ #---------------------------------------------------------------------# # suffix rules diff --git a/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Polyhedron.h b/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Polyhedron.h new file mode 100644 index 00000000000..8066210da14 --- /dev/null +++ b/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Polyhedron.h @@ -0,0 +1,31 @@ +// Copyright (c) 2005, 2006 Fernando Luis Cacciola Carballal. 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: svn+ssh://fcacciola@scm.gforge.inria.fr/svn/cgal/trunk/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification_edge_collapse.h $ +// $Id: Surface_mesh_simplification_edge_collapse.h 33697 2006-08-24 17:52:41Z fcacciola $ +// +// Author(s) : Fernando Cacciola +// +#ifndef CGAL_SURFACE_MESH_SIMPLIFICATION_POLYHEDRON_H +#define CGAL_SURFACE_MESH_SIMPLIFICATION_POLYHEDRON_H + +#include + +#include +#include +#include + + +#endif // CGAL_SURFACE_MESH_SIMPLIFICATION_POLYHEDRON_H +// EOF // + + diff --git a/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Vertex_is_fixed_map_always_false.h b/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Vertex_is_fixed_map_always_false.h new file mode 100644 index 00000000000..de8884ccc02 --- /dev/null +++ b/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Vertex_is_fixed_map_always_false.h @@ -0,0 +1,48 @@ +// Copyright (c) 2006 Geometry Factory (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: svn+ssh://fcacciola@scm.gforge.inria.fr/svn/cgal/trunk/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Vertex_is_fixed_map_always_false.h $ +// $Id: Vertex_is_fixed_map_always_false.h 33858 2006-08-30 12:18:43Z fcacciola $ +// +// +// Author(s): Fernando Cacciola + +#ifndef CGAL_SURFACE_MESH_SIMPLIFICATION_IS_VERTEX_FIXED_MAP_ALWAYS_FALSE_H +#define CGAL_SURFACE_MESH_SIMPLIFICATION_IS_VERTEX_FIXED_MAP_ALWAYS_FALSE_H + +#include +#include + +CGAL_BEGIN_NAMESPACE + +template +class Vertex_is_fixed_map_always_false : public boost::put_get_helper > +{ +private: + + typedef Graph_ Graph ; + +public: + + typedef boost::readable_property_map_tag category; + typedef bool value_type; + typedef bool reference; + typedef typename boost::graph_traits::vertex_descriptor key_type; + + reference operator[](key_type const& v) const { return false ; } +}; + + +CGAL_END_NAMESPACE + +#endif // CGAL_SURFACE_MESH_SIMPLIFICATION_IS_VERTEX_FIXED_MAP_ALWAYS_FALSE_H