Archived

This topic is now archived and is closed to further replies.

Question about trees...

This topic is 5535 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

hi, well after find information about collisions response, i want to create a B tree for this objetive... but the only way for implement B trees is using recursive functions... now, recursive functions affect the FPS?.... the program colaps if the tree if too big?.. exist other way? PD: other question...what is better...vertex or display list? thank''s.

Share this post


Link to post
Share on other sites
recursive functions are fine as long as you don't overflow your program stack. You may be able to get a speed improvement by creating an iterative version of your function.

Raw vertices(glVertex) incur function call overhead, display lists are fast for static geometry, and vertex arrays are your best bet for dynamic geometry.

If you have the graphics programming black book, there's a great section about changing a recursive BSP tree traversal procedure into an iterative one. Definitely a good interview question.

[edited by - sjelkjd on October 22, 2002 5:50:00 AM]

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
also, look into ''thread binary tree'' or ''binary threaded tree'', search it at google, it''s a binary tree but you don''t recurse......if you understand it, you may extend this on your, say quadtree, octree, etc....

a warning though, the speed increase that you get won''t really be worth the time you spend implementing it though....

------------------------------------
Visit: http://nomad.openglforums.com
------------------------------------

Share this post


Link to post
Share on other sites