- Joined
- Jul 10, 2007
- Messages
- 6,306
So, I need to be able to easily find all position in range of a given position. For this, using something like a Kd-Tree or a Quad Tree seems smart. For example, the KDB-Tree seems like a good bet.
However, I'm curious as to which of all of the possible 2D trees has the lowest add/remove cost while staying balancing.
My idea is to have a tree of all of the units in the map and update it on a timer =P. So is there a good way to resort the nodes based on the new data? The maximum change I'm anticipating is +-64 (.34 interval timer).
However, I'm curious as to which of all of the possible 2D trees has the lowest add/remove cost while staying balancing.
My idea is to have a tree of all of the units in the map and update it on a timer =P. So is there a good way to resort the nodes based on the new data? The maximum change I'm anticipating is +-64 (.34 interval timer).