我有一个三维点云,想要高效地查询距离任意点p(不一定是存储的点云中的点)距离为d以内的所有点。
查询操作应该类似于:
Pointcloud getAllPoints(Point p, float d);
对于这种情况,应该选择哪种加速结构呢?Range-Tree 似乎只适用于查询矩形体积,而不适用于球体积(当然我可以查询球体的边界框,然后筛选出距离大于 d 的所有顶点 - 但也许有更好的方法?)
谢谢!
根据 Novelocrat 的建议,我尝试定义了所需结构的功能:
SearchStructure Create(Set<Point> cloud)
Set<Point> Query(SearchStructure S, Point p, float maxDistance)
SearchStructure Remove(Point p)
SearchStructure Insert(Point p)
SearchStructure Displace(Set<Point> displacement) //where each value describes an offsetVector to the currently present points
通常,在进行n次查询后,点会发生位移,并进行少量(不多!)插入和删除操作。与所有点的边界框相比,偏移向量非常小。