Skip to main content
GameDev.net gamedev.net
🔒 Locked

Binary trees again!

Started by Danias Nov 25, 2000 at 6:49 AM 1 replies 350+ views
Original Post
Danias
Danias
I kept fuzzing around with binary trees and there is one thing I don''t get. I want to create a GUI for my game and want to access nodes, in my case windows (WND), and controls (Ctrl). Now, picture this tree: GAME / \ / \ WND WND / \ -------- -------- / | \ | \ Ctrl Ctrl Ctrl Ctrl Ctrl Am I right to presume that the windows would be the nodes and the controls are the childs? If so, are the windows called siblings? I''m a linguistic problem here :-) Thanks! ;-)
iwasbiggs
iwasbiggs
not sure if you''re talking about win32 programming, but from your diagram, the WND''s would be parents of the children, CTRL''s.

You said you wanted to access windows and controls, so just search down the tree for the node (they are all nodes) that you want.
___________________________Freeware development:ruinedsoft.com
Shannon Barber
Shannon Barber
That''s not a binary tree, binary trees only have two children (at most).

The WND are also called branch nodes, and the ctrl are leaf nodes, Game is the root node.
The trade-off between price and quality does not exist in Japan. Rather, the idea that high quality brings on cost reduction is widely accepted.-- Tajima & Matsubara

Topic Locked

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

Sign in to reply to this topic.