which data structure is appropriate to query “all points within distance d from point p”

前端 未结 6 1288
余生分开走
余生分开走 2020-12-08 11:53

I have a 3D pointcloud and I\'d like to efficiently query all points within distance d from an arbitrary point p (which is not necessarily part of the stored pointcloud)

6条回答
  •  醉梦人生
    2020-12-08 12:12

    I don't understand your API, you can round up all points in a PointCloud that lie inside an arbitrary sphere, but you also say that the point-clouds are stored? In that case shouldn't you get a list of PointClouds that is inside the given sphere, otherwise what is the point (excuse the pun) with having the PointClouds stored?

    Instead of trying to define the API in advance, define it when you need it. There is no need to implement something that never will be used, let alone optimize a function that never will be called (unless it's for fun of course :)).

    I think you should implement the bounding-box culling, followed by the more detailed sphere search as a first implementation. Perhaps it's not such a bottleneck as you think, and perhaps you will have far more serious bottlenecks to consider. It's always possible to optimize later when you actually see that you have everything working toghether as you have planned.

提交回复
热议问题