From ef0c072342b074dc2fea2a138e92354562fa707c Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Thu, 23 Sep 2010 07:52:12 +0000 Subject: [PATCH] Switch to PointsGraphicsItem that uses a kd-tree to quickly determine what points to redraw --- .../demo/Spatial_searching_2/Spatial_searching_2.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/GraphicsView/demo/Spatial_searching_2/Spatial_searching_2.cpp b/GraphicsView/demo/Spatial_searching_2/Spatial_searching_2.cpp index 5fbd3acb476..fe240a5087a 100644 --- a/GraphicsView/demo/Spatial_searching_2/Spatial_searching_2.cpp +++ b/GraphicsView/demo/Spatial_searching_2/Spatial_searching_2.cpp @@ -12,7 +12,7 @@ #include // GraphicsView items and event filters (input classes) -#include +#include #include // the two base classes @@ -44,7 +44,7 @@ private: CGAL::Qt::Converter convert; QGraphicsScene scene; - CGAL::Qt::PointsGraphicsItem * pgi; + CGAL::Qt::PointsInKdTreeGraphicsItem * pgi; NearestNeighbor * nearest_neighbor; public: @@ -128,7 +128,7 @@ MainWindow::MainWindow() points.push_back(Point_2(102,2)); tree.insert(points.begin(), points.end()); // Add a GraphicItem for the point set - pgi = new CGAL::Qt::PointsGraphicsItem(&tree); + pgi = new CGAL::Qt::PointsInKdTreeGraphicsItem(&tree); QObject::connect(this, SIGNAL(changed()), pgi, SLOT(modelChanged()));