From 27cc0c34a2f1b7388bce5bffc8fad5c38c664f26 Mon Sep 17 00:00:00 2001 From: Karsten Rink <karsten.rink@ufz.de> Date: Mon, 4 Aug 2014 11:31:15 +0200 Subject: [PATCH] test code for calling new functionality --- Gui/mainwindow.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/Gui/mainwindow.cpp b/Gui/mainwindow.cpp index 6f93923da37..9d4383f3391 100644 --- a/Gui/mainwindow.cpp +++ b/Gui/mainwindow.cpp @@ -14,6 +14,10 @@ #include "mainwindow.h" +#include <numeric> +#include "quicksort.h" +#include "BoundingSphere.h" + // ThirdParty/logog #include "logog/include/logog.hpp" @@ -1298,6 +1302,15 @@ void MainWindow::showDataExplorerSettingsDialog() void MainWindow::FEMTestStart() { + std::vector<GeoLib::Point*> *pnts = const_cast<std::vector<GeoLib::Point*>*>(this->_project.getGEOObjects()->getPointVec("testgeo")); + //GeoLib::BoundingSphere s(*pnts); + //std::vector<size_t> perm(4); + //std::iota(perm.begin(), perm.end(), 0); + //BaseLib::Quicksort<GeoLib::Point*>(*pnts, 0, pnts->size(), perm); + GeoLib::BoundingSphere s(*(pnts->at(0)), *(pnts->at(1)), *(pnts->at(2)));//, *(pnts->at(3))); + GeoLib::Point c = s.getCenter(); + double r = s.getRadius(); + std::cout << "Center: (" << c[0] << ", " << c[1] << ", " << c[2] << "), Radius: " << r << std::endl; } void MainWindow::showTrackingSettingsDialog() -- GitLab