From 2f46e576dfd02c6b2efd201401914ed7f0b3a0a8 Mon Sep 17 00:00:00 2001 From: Monique Teillaud Date: Tue, 16 Jan 2007 14:25:13 +0000 Subject: [PATCH] cleaning --- .../Circular_kernel_2/demo_line_circle.cpp | 62 +++++++------------ 1 file changed, 23 insertions(+), 39 deletions(-) diff --git a/Circular_kernel_2/demo/Circular_kernel_2/demo_line_circle.cpp b/Circular_kernel_2/demo/Circular_kernel_2/demo_line_circle.cpp index 0483ea826fb..82075b7687d 100644 --- a/Circular_kernel_2/demo/Circular_kernel_2/demo_line_circle.cpp +++ b/Circular_kernel_2/demo/Circular_kernel_2/demo_line_circle.cpp @@ -1,5 +1,4 @@ -// Copyright (c) 2003 INRIA Sophia-Antipolis (France) and -// Max-Planck-Institute Saarbruecken (Germany). +// Copyright (c) 2003 INRIA Sophia-Antipolis (France) // All rights reserved. // // Authors : Monique Teillaud @@ -68,7 +67,6 @@ int main() { #include #include -#include #include #include @@ -86,27 +84,18 @@ typedef CGAL::Circular_kernel_2 Circular_k; typedef Circular_k::Line_arc_2 Line_arc_2; typedef Circular_k::Segment_2 Segment; typedef Circular_k::Circular_arc_2 Circular_arc_2; -typedef boost::variant< Circular_arc_2, Line_arc_2 > Arc_2; -typedef std::vector ArcContainer; -#ifndef CGAL_CURVED_KERNEL_DEBUG -typedef CGAL::Arr_circular_line_arc_traits - Traits; -#else -typedef CGAL::Arr_circular_line_arc_traits - Traits0; -typedef CGAL::Circular_arc_traits_tracer Traits; -#endif +typedef CGAL::Arr_circular_line_arc_traits Traits; typedef Traits::Point_2 Point_2; -typedef Traits::Curve_2 Conic_arc_2; +typedef Traits::Curve_2 Curve_2; +typedef std::vector ArcContainer; + typedef CGAL::Arrangement_2 Pmwx; typedef CGAL::Arr_naive_point_location Point_location; -typedef Traits::X_monotone_curve_2 X_monotone_curve_2; - - - const QString my_title_string("CGAL :: " "Planar Map of Intersecting Circular Arcs"); @@ -138,18 +127,15 @@ public: *widget << CGAL::GREEN; for (Pmwx::Halfedge_const_iterator ei = pm().halfedges_begin(); - ei != pm().halfedges_end (); ++ei){ - if(const Line_arc_2* line = boost::get( &(ei->curve()))){ + ei != pm().halfedges_end (); ++ei) { + if(const Line_arc_2* line = boost::get( &(ei->curve()))) { *widget << Segment(Circular_k::Point_2(to_double(line->source().x()), to_double(line->source().y())), Circular_k::Point_2(to_double(line->target().x()), to_double(line->target().y()))); } - else if (const Circular_arc_2* arc = boost::get( &(ei->curve()))){ - // std::cout << arc->source().x() << std::endl - // << arc->source().y() << std::endl - // << arc->target().x() << std::endl - // << arc->target().y() << std::endl; + else if (const Circular_arc_2* arc + = boost::get( &(ei->curve()))) { *widget << *arc; } } @@ -194,11 +180,8 @@ public: Circular_k::Point_2(to_double(line->target().x()), to_double(line->target().y()))); } - else if (const Circular_arc_2* arc = boost::get( &(*cit))){ -// std::cout << arc->source().x() << std::endl -// << arc->source().y() << std::endl -// << arc->target().x() << std::endl -// << arc->target().y() << std::endl; + else if (const Circular_arc_2* arc + = boost::get( &(*cit))) { *widget << *arc; } } @@ -285,13 +268,13 @@ public: // the button controlling if we show the planar map QToolButton * show_pmwx_button = - new QToolButton(QPixmap((const char**)::planar_map_icon), - "Show Computed Planar Map", - 0, - this, - SLOT(show_pmwx_arcs()), - layers_toolbar, - "Show Computed Planar Map"); + new QToolButton(QPixmap((const char**)::planar_map_icon), + "Show Computed Planar Map", + 0, + this, + SLOT(show_pmwx_arcs()), + layers_toolbar, + "Show Computed Planar Map"); show_pmwx_button->setToggleButton(true); show_pmwx_button->toggle(); @@ -340,7 +323,8 @@ public: get_segment_layer = new CGAL::Qt_widget_get_segment; widget->attach(get_arc_layer); connect(get_arc_layer, SIGNAL(new_object_time()), this, SLOT(get_arc())); - connect(get_segment_layer, SIGNAL(new_object_time()), this, SLOT(get_arc())); + connect(get_segment_layer, SIGNAL(new_object_time()), + this, SLOT(get_arc())); } public slots: @@ -357,7 +341,7 @@ public slots: void get_arc() { - X_monotone_curve_2 v; + Curve_2 v; if (arc_circle){ v = get_arc_layer->get_circular_arc(); }