So would you say that doing bounding box collision tests on a culled tree would in generally be faster than unique ID tests on an unculled tree? Just thinking about a 2d bounding box test vs a simple comparison. and the culled tree vs the unculled tree On 7/13/07, Matthew Weigel <unique@xxxxxxxxxxx> wrote:
Alan Wolfe wrote: > Heya, > > I have a quad tree which stores objects in it from a 2d world. > > I was wondering, in general if i wanted to find a node in a quad tree > where i had both the bounding box and a unique id#, would it be more > efficient to just recursively search the tree for the id#? Or would it > be more efficient to do the bounding box search to "cull some branches" > of the recursive ID search? Quad trees excel at improving the performance of "finding things in a bounding box." It doesn't really matter what it is, as long as you have the bounding box and the individual nodes possess the data you are looking for. If the tree were ordered with respect to id#s, that would be different, though. -- Matthew Weigel hacker unique@xxxxxxxxxxx --------------------- To unsubscribe go to http://gameprogrammer.com/mailinglist.html