Skip to main content
gamedev.net
🔒 Locked

SOAR data structuring?

Started by Funkymunky Jan 21, 2004 at 5:21 PM 2 replies 600+ views
Original Post
Funkymunky
Funkymunky
Alright, I think I''ve finally got a grasp on the SOAR algorithm. What I need to do is make a tree starting from the top level. The top level is one triangle, it''s two children are the two created by bisecting the hypotenuse, then each of these children get 2 apiece by a further bisection... What I''d like to know is, how does the guy do it without declaring a bunch of new children each time? He recursively creates this tree without a lot of new and delete calls...how is that possible?
Funkymunky
Funkymunky
Anyone?......Anyone?......Bueller......?
Silex
Silex
Not that familiar with SOAR, but I''m guessing there''s a static array of nodes a la nodes m_nodes[25000] where 25000 is your max amount of children. I believe this is much more efficient that allocating and deallocating them every frame.
psykr
psykr
I believe that the idea of recursively subdividing a triangle comes initially from the ROAM algorithm. The paper used a static array of nodes, and used one to represent each node in the triangle tree.

I''ve read his papers on the SOAR algorithm (thanks to your recommendations), but I''m afraid I haven''t had time to fully understand the concepts. IIRC, this method of creating a tree of triangle nodes pushed all the work onto the CPU, letting the GPU idle.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.