From 2ccc5e5b59e4a9c9f7fed675b3f8fd320e6de6bb Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Mon, 15 Dec 2014 14:11:59 +0100 Subject: [PATCH] clean up example of face_graph.cpp --- .../BGL_triangulation_2/face_graph.cpp | 59 ------------------- 1 file changed, 59 deletions(-) diff --git a/BGL/examples/BGL_triangulation_2/face_graph.cpp b/BGL/examples/BGL_triangulation_2/face_graph.cpp index c5ab4ab0b40..1e84a508914 100644 --- a/BGL/examples/BGL_triangulation_2/face_graph.cpp +++ b/BGL/examples/BGL_triangulation_2/face_graph.cpp @@ -6,10 +6,7 @@ #include #include -#include -#include -#include typedef CGAL::Exact_predicates_inexact_constructions_kernel Epic; typedef CGAL::Projection_traits_xy_3 K; @@ -17,47 +14,7 @@ typedef K::Point_2 Point; typedef CGAL::Triangulation_2 Triangulation; -namespace SMS = CGAL::Surface_mesh_simplification; - -namespace CGAL { - namespace Euler { - - template - typename boost::graph_traits >::vertex_descriptor - collapse_edge(typename boost::graph_traits >::edge_descriptor v0v1, - Triangulation_2& g) - { - return g.collapse_edge(v0v1); - } - } // namespace Euler -} // namespace CGAL - -// As we want to run Dijskra's shortest path algorithm we only -// consider finite vertices and edges. - -template -struct Is_finite { - - const T* t_; - - Is_finite() - : t_(NULL) - {} - - Is_finite(const T& t) - : t_(&t) - { } - - template - bool operator()(const VertexOrEdge& voe) const { - return ! t_->is_infinite(voe); - } -}; - -typedef Is_finite Filter; -//typedef boost::filtered_graph Finite_triangulation; -// TODO: introduce CGAL::Filtered_face_graph, as filtered_graph does not know Halfedge/Face typedef boost::graph_traits::vertex_descriptor vertex_descriptor; typedef boost::graph_traits::halfedge_descriptor halfedge_descriptor; typedef boost::graph_traits::halfedge_iterator halfedge_iterator; @@ -83,8 +40,6 @@ int main(int,char*[]) { Triangulation t; - //Filter is_finite(t); - //Finite_triangulation ft(t, is_finite, is_finite); t.insert(Point(0.1,0,1)); t.insert(Point(1,0,1)); @@ -154,20 +109,6 @@ main(int,char*[]) } - SMS::Count_stop_predicate stop(5); - - // This the actual call to the simplification algorithm. - // The surface and stop conditions are mandatory arguments. - // The index maps are needed because the vertices and edges - // of this surface lack an "id()" field. - SMS::edge_collapse - (t - ,stop - ,CGAL::vertex_index_map(vertex_index_pmap) - .halfedge_index_map (halfedge_index_pmap) - ); - - ppmap[*(++vertices(t).first)] = Point(78,1,2); std::cout << " changed point of vertex " << ppmap[*(++vertices(t).first)] << std::endl;