Line by Line, HOW do I query my BSP?
dev.to·5h·
Discuss: DEV
Flag this post

Now, if you read my last post (sorry about the length...), you will remember we constructed a BSP tree. The BSP tree we created could hold these entities, but we never actually used this feature. Well, I was sitting and thinking about what someone might want to do with a BSP tree, and then it hit me, read from it! So, that’s exactly what we’re going to do, except, we’re going to do it for a specific use case.

The View Frustum

Imagine you’re playing a 3D game, where the walls are governed by a BSP tree. Now, looking from the top down, what would the player’s view look like? A triangle! This is called the view frustum. What we’re going to do, is apply the view frustum on the BSP tree, and in re…

Similar Posts

Loading similar posts...