从预构建的 BSP 树渲染?
嘿伙计们。我正在将预构建的 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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您的 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.