• Advertisement
Sign in to follow this  

Binary tree leaf edge neighbors

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

I have a 2d area split up using a binary tree (axial aligned, split longest edge), is there any (known) way of determining the neighbor leafs of a given leaf (rect) edge while building the tree or right after the tree is built?

In time the tree may get big, I cant really pre compute much and would like to avoid direct searches for the 4 edges of each leaf (a leaf edge may be connected to many leafs smaller than itself), which is why Id like to create this static list of leaf connections and neighbor leafs as quick as possible.

Edited by NumberXaero

Share this post


Link to post
Share on other sites
Advertisement

If the questoin is you want to know hierarchy neighbors of a node (or leaf), you could just see its parent's childs. You say you have a binary tree, what means a node has only two childs or less. In case you do not store the information af a node's childs, but only a node parent, you will have to profile all nodes, but this is just etremely rare case of a tree aplication.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement