Nick
2005.07.17, 03:48 PM
I've been scowering the web for a while trying to figure out how to implement a quadtree into my engine for all the reasons one would wish to use a quadtree. Unfortunately all I'm finding is "each node requires four children nodes" following by a pretty diagram. I understand that each node has four children nodes but I'm having a hard time really understanding the quadtree. Is a node any single object? Do the children nodes each have four children nodes? How do you get all the squares in their diagrams of the "world"? Obviously it's a quadtree but I just don't see how the nodes relate to land. Also, partly because of these questions, I do not know how one would code such a feature. If anyone knows of any tutorials that are very in depth to the logic and possibly code samples of quadtree classes, could you please post the link?