Rendering from a prebuilt BSP tree?
Hey guys. I am loading into memory a prebui开发者_如何学编程lt 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.
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.
精彩评论