从预构建的 BSP 树渲染?

发布于 2024-11-10 00:02:47 字数 109 浏览 5 评论 0原文

嘿伙计们。我正在将预构建的 BSP 树加载到内存中,但我很困惑。它被用于第一人称探索程序。你建议我如何使用已经制作好的 BSP 树?我知道我遍历了这棵树,但我要寻找什么?

对不起我的英语。

Hey guys. I am loading into memory a prebuilt BSP tree and I am very confused. It is being used in a first person exploring program. How does you recommend I use a BSP tree that is already made. I know I traverse the tree but what do I look for?

Sorry about my english.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

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

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

凤舞天涯 2024-11-17 00:02:48

您的 BSP 保存(您的)空间的分区版本,该 BSP 树包含位于您的空间中的特定对象。

您将问题标记为“渲染”,您想渲染可见对象吗?在这种情况下,您正在寻找 BSP 树中与渲染视锥体相交的部分。从根节点沿着树向下测试部分将避免许多交叉测试,这就是 BSP 树的目标。最后,您应该拥有包含要渲染的对象(如果有)的 BSP 树节点。

Your BSP hold a partitioned version of the (your) space, this BSP tree contains certainly objects located in your space.

Your tagged your question 'render', do you want to render visible objects ? In this case your are looking for parts of your BSP tree that intersect with the render frustum. Testing parts from the root node walking down the tree will avoid many intersection test, that's the goal of the BSP tree. At the end your should have the BSP tree node containing objects to render if there is any.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文