在3d中,如何选取最合适的点?

发布于 2025-01-10 09:22:19 字数 293 浏览 3 评论 0原文

我有一个 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文