Jump to content
  • Advertisement
Sign in to follow this  
CProgrammer

QuadTree structure

This topic is 5001 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

How do you build up your quadtree? Do you have objects in any node or just the leaves? Do you use one quadtree for the entire scene or a couple for different uses? Ive noticed collision detection and alphasorting having slightly different requirements. Should I have one quadtree instance for collision detection and another for alphasorting? -CProgrammer

Share this post


Link to post
Share on other sites
Advertisement
-The points are only in the leaves
-uses reccursion until it gets an acceptable number of triangles per node
-if a node is empty skip it

Share this post


Link to post
Share on other sites
I use all nodes as containers for objects since some objects will not easily be contained by just one node. There are ways around that, but it's just my way.

Share this post


Link to post
Share on other sites
My approach for now is to use two octrees, one for the "graphical" level and one for collision detection, using a simplified mesh. Probably i'm gonna store objects in the second octree, too.

I store triangles in every node, this way if a node is fully visible i can draw it without losing time checking its children.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!