|
QCAD
Open Source 2D CAD
|
Go to the documentation of this file.
20 #ifndef RSPATIALINDEX_H
21 #define RSPATIALINDEX_H
44 double x1,
double y1,
double z1,
45 double x2,
double y2,
double z2);
48 double x1,
double y1,
double z1,
49 double x2,
double y2,
double z2) {
77 static qint64 getSIId(
int id,
int pos);
78 static int getId(qint64 siid);
79 static int getPos(qint64 siid);
84 virtual void bulkLoad(
const QList<int>& ids,
const QList<QList<RBox> >& bbs);
86 virtual void bulkLoadSimple(
const QList<int>& ids,
const QList<RBox>& bbs);
93 double x1,
double y1,
double z1,
94 double x2,
double y2,
double z2
100 virtual void addToIndex(
109 virtual void addToIndex(
111 const QList<RBox>& bbs
125 double x1,
double y1,
double z1,
126 double x2,
double y2,
double z2) = 0;
132 virtual bool removeFromIndex(
int id,
int pos,
const RBox& bb);
138 virtual bool removeFromIndex(
int id,
const QList<RBox>& bb);
155 double x1,
double y1,
double z1,
156 double x2,
double y2,
double z2,
164 virtual QMap<int, QSet<int> > queryIntersected(
183 double x1,
double y1,
double z1,
184 double x2,
double y2,
double z2,
192 virtual QMap<int, QSet<int> > queryContained(
208 double x,
double y,
double z,
212 virtual QPair<int, int> queryNearestNeighbor(
double x,
double y,
double z);
virtual QMap< int, QSet< int > > queryNearestNeighbor(unsigned int k, double x, double y, double z, RSpatialIndexVisitor *dataVisitor=NULL)=0
Queries the index for closest neighbor items.
virtual bool removeFromIndex(int id, int pos, double x1, double y1, double z1, double x2, double y2, double z2)=0
Removes the entry with the given ID from this spatial index.
QDebug dbg
Definition: RSpatialIndex.h:58
RSpatialIndexDebugVisitor(QDebug dbg)
Definition: RSpatialIndex.h:39
QList< QPair< int, int > > matches
Definition: RSpatialIndex.h:59
RSpatialIndex()
Definition: RSpatialIndex.h:71
virtual RSpatialIndex * create()=0
virtual QMap< int, QSet< int > > queryIntersected(double x1, double y1, double z1, double x2, double y2, double z2, RSpatialIndexVisitor *dataVisitor=NULL)=0
Queries the index for all items that are completely inside or intersect with the given box x1,...
Abstract base class for spatial index implementations.
Definition: RSpatialIndex.h:69
Copyright (c) 2011-2018 by Andrew Mustun.
Definition: RSpatialIndex.h:37
virtual void visitNode(double x1, double y1, double z1, double x2, double y2, double z2)
Definition: RSpatialIndex.h:47
Q_DECLARE_METATYPE(RMath *)
virtual ~RSpatialIndexDebugVisitor()
Definition: RSpatialIndex.h:40
virtual ~RSpatialIndex()
Definition: RSpatialIndex.h:74
QCADCORE_EXPORT QDebug operator<<(QDebug dbg, RSpatialIndex &si)
Stream operator for QDebug.
Definition: RSpatialIndex.cpp:144
virtual QMap< int, QSet< int > > queryContained(double x1, double y1, double z1, double x2, double y2, double z2, RSpatialIndexVisitor *dataVisitor=NULL)=0
Queries the index for all items that are completely inside the given box x1,y1,z1,...
virtual void addToIndex(int id, int pos, double x1, double y1, double z1, double x2, double y2, double z2)=0
Adds a new entry into this spatial index.
virtual void visitData(int id, int pos, double x1, double y1, double z1, double x2, double y2, double z2)=0
Copyright (c) 2011-2018 by Andrew Mustun.
Definition: RRequireHeap.h:30
Represents a box e.g.
Definition: RBox.h:43
#define QCADCORE_EXPORT
Definition: core_global.h:10
Copyright (c) 2011-2018 by Andrew Mustun.
Definition: RSpatialIndexVisitor.h:35
int idCounter
Definition: RSpatialIndex.h:215