sirSolarius
01-30-2004, 04:46 AM
Ok, so I understand what a quadtree is, and what it's used for, but here's what I don't know how to do.
If I draw two splitting planes in my scene to create a new node and there is an object that intersects a plane, (so that it would exist in two nodes) what do I do with it? I was thinking that I should just stick it in a linked list connected to the quadtree (so that it is a member of the larger node rather than a subdivision) but I realized that if I have terrain, like one huge height map, then none of that would be put into a tree.
If I try to break the object up, how would that be done? Say that I'm drawing a box with GL_QUADS or something... how do I store the individual planes in different children?
And what if an object is added to the scene? What's the best way to sort it into an already-existing tree?
Thanks!
If I draw two splitting planes in my scene to create a new node and there is an object that intersects a plane, (so that it would exist in two nodes) what do I do with it? I was thinking that I should just stick it in a linked list connected to the quadtree (so that it is a member of the larger node rather than a subdivision) but I realized that if I have terrain, like one huge height map, then none of that would be put into a tree.
If I try to break the object up, how would that be done? Say that I'm drawing a box with GL_QUADS or something... how do I store the individual planes in different children?
And what if an object is added to the scene? What's the best way to sort it into an already-existing tree?
Thanks!