For a point cloud, I am trying to pick points inside a circle(which represent the mouse's position), just like
.
Currently I do this work by:
- cast a ray from the circle center.
- calculate the closest point to the ray.
- calculate the distance between closest point and other points in this point cloud, and then select those points which distance < r(r represent the radius of the circle).
But I found some problem with this method,
- sometimes the closest point to the ray is not what I want, since a point cloud have two side, front side and back side. Just like the following image, what I expect is the blue one, but the closest point to the ray might be the red one.
- this method is so slow.

Is there a better way to do this?