From 40e63c3bde834ca1ecf1d47fd19f031479eefc67 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Sun, 9 Nov 2008 15:56:06 +0000 Subject: [PATCH] Removed textoutput, Edit, and renamed Tools to Algorithms --- GraphicsView/demo/Polygon/Polygon_2.cpp | 35 +------------------------ GraphicsView/demo/Polygon/Polygon_2.ui | 16 +---------- 2 files changed, 2 insertions(+), 49 deletions(-) diff --git a/GraphicsView/demo/Polygon/Polygon_2.cpp b/GraphicsView/demo/Polygon/Polygon_2.cpp index 7b8000c8521..9a4c9c70e95 100644 --- a/GraphicsView/demo/Polygon/Polygon_2.cpp +++ b/GraphicsView/demo/Polygon/Polygon_2.cpp @@ -162,46 +162,13 @@ MainWindow::processInput(CGAL::Object o) std::list points; if(CGAL::assign(points, o)){ if((points.size() == 1)&& poly.size()>0){ - Point_2 p = points.front(); - // make the inside test - CGAL::Bounded_side bside = poly.bounded_side(p); - switch (bside) { - case CGAL::ON_BOUNDED_SIDE: - textEdit->append(" The point is inside the polygon"); break; - case CGAL::ON_BOUNDARY: - textEdit->append(" The point is on the boundary of the polygon"); break; - case CGAL::ON_UNBOUNDED_SIDE: - textEdit->append(" The point is outside the polygon"); break; - } + } else { poly.clear(); if(points.front() == points.back()){ points.pop_back(); } poly.insert(poly.vertices_begin(), points.begin(), points.end()); - textEdit->clear(); - if(poly.is_empty()){ - textEdit->append("P is empty!"); - } else { - if(poly.is_simple()){ - textEdit->append("P is simple"); - CGAL::Orientation o = poly.orientation(); - switch (o) { - case CGAL::CLOCKWISE: - textEdit->append("P.orientation() == CLOCKWISE"); - break; - case CGAL::COUNTERCLOCKWISE: - textEdit->append("P.orientation() == COUNTERCLOCKWISE"); - break; - case CGAL::COLLINEAR: - textEdit->append("P.orientation() == COLLINEAR"); - break; - } - textEdit->append(QString("The area of P is %1").arg(poly.area())); - } else { - textEdit->append("P is not simple"); - } - } } emit(changed()); } diff --git a/GraphicsView/demo/Polygon/Polygon_2.ui b/GraphicsView/demo/Polygon/Polygon_2.ui index ed8ebd75edb..be23f9e9d20 100644 --- a/GraphicsView/demo/Polygon/Polygon_2.ui +++ b/GraphicsView/demo/Polygon/Polygon_2.ui @@ -44,14 +44,6 @@ QGraphicsView::NoAnchor - - - - 1 - 0 - - - @@ -103,14 +95,9 @@ - - - &Edit - - - &Tools + &Algorithms @@ -123,7 +110,6 @@ -