在3d中,如何选取最合适的点?
我有一个 3d 场景(带有点云和一些其他对象)。我实现了算法来为点云选择距离鼠标最近的点。但我的问题是:我的场景中有多个对象,因此当我尝试选择一个对象(或点云内的点)时,我会遍历场景中的所有对象,为每个对象寻找更合适的点它们(根据到光线投射的距离或角度(哪个更好))。在这个阶段,我不知道如何找到哪个对象在所有情况下最合适的点。
说明:我想找到一个非常接近光线投射但也非常接近我的相机的点,以仅拾取可见对象(点)。
所以我需要找到一种混合方法:距离光线投射最近的点和距离相机最近的点。您在 3d 方面有一些想法或广泛的解决方案吗?感谢您的帮助。
I have a 3d scene (with pointclouds and some other objects). I implemented algorithm to pick the closest point to the mouse for a pointclouds. But my problem is : I have several objects in my scene, so when I try to pick an object (or a point inside a pointcloud), I go through all the objects on my scene, I look for the more suitable point for each of them (accordingly to distance to the raycast or angle (which is better)). At this stage, I don't know how to find the point of which object is the most suitable in all situations.
Explanation : I want to find a point very close to the raycast but also quite close to my camera to pick visible objects (points) only.
So I need to find a way to mix : closest point to the raycast and closest point to the camera. Do you have some ideas or widespread solution in 3d ? Thanks for your help.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论