File indexing completed on 2024-05-12 04:06:21

0001 /*
0002     SPDX-FileCopyrightText: 2010 Johannes Loehnert <loehnert.kde@gmx.de>
0003 
0004     SPDX-License-Identifier: GPL-2.0-or-later
0005 */
0006 
0007 #ifndef POINTFINDER_H
0008 #define POINTFINDER_H
0009 
0010 #include <QPointF>
0011 #include <QList>
0012 
0013 class PointFinder {
0014     public:
0015         PointFinder(int width, int height, qreal radius);
0016         ~PointFinder();
0017         void append(QPointF point);
0018 
0019         QList<QPointF> points();
0020         QList<QPointF> find_neighbours(QPointF point);
0021     protected:
0022         QList<QPointF> **m_boxes;
0023         QList<QPointF> m_points;
0024         int m_radius;
0025         int m_xbins;
0026         int m_ybins;
0027         int m_width;
0028         int m_height;
0029 };
0030 
0031 #endif