Quadtree collapsing
- by Caius Eugene
Okay so i've spent a few days learning what a quadtree is and how to implement one. So far I have a quadtree that when I click inside a leaf it subdivides, I wondering how do I get the previous subdivisions to collapse back up, so that only one area is subdivided at a time?
This is what mine looks like: (1. initial mouse click) (2. another mouse click)
The aim to to eventually track the position of my mouse and subdivide the area it is in dynamically.
THE OVERALL aim it to use this to create a terrain mesh and subdivide based on the camera. But I've gone right back to basics to get an understanding of how this will work.
Any advice would be grand! - Caius