1
0
mirror of https://github.com/tumic0/GPXSee.git synced 2025-07-07 16:02:51 +02:00

Code cleanup

This commit is contained in:
2016-02-19 21:34:55 +01:00
parent 2f80e612b5
commit 59d8b3cc77
8 changed files with 29 additions and 29 deletions

View File

@ -6,8 +6,6 @@
#include "poi.h"
#define BOUNDING_RECT_SIZE 0.01
bool POI::loadFile(const QString &fileName)
{
QString error;
@ -122,17 +120,17 @@ static bool cb(size_t data, void* context)
return true;
}
QVector<WayPoint> POI::points(const QVector<QPointF> &path) const
QVector<WayPoint> POI::points(const QVector<QPointF> &path, qreal radius) const
{
QVector<WayPoint> ret;
QSet<int> set;
qreal min[2], max[2];
for (int i = 0; i < path.count(); i++) {
min[0] = path.at(i).x() - BOUNDING_RECT_SIZE;
min[1] = path.at(i).y() - BOUNDING_RECT_SIZE;
max[0] = path.at(i).x() + BOUNDING_RECT_SIZE;
max[1] = path.at(i).y() + BOUNDING_RECT_SIZE;
min[0] = path.at(i).x() - radius;
min[1] = path.at(i).y() - radius;
max[0] = path.at(i).x() + radius;
max[1] = path.at(i).y() + radius;
_tree.Search(min, max, cb, &set);
}