So, the new Symbol tree base class now has a working implementation of a KDTree. (Or as close as the test can tell). What this means is that, should you ever need to edit (not just display) a very large 2D structure, you would do something like:
The best situation would be to dynamically call the "useKDTree" method when the size was above some threshold (100 atoms?). The interface is the same, either way.
SymbolTree tree = createTree(); // get a tree somehowOf course, this is really only useful for a) large trees and b) when doing many "closest symbol" operations. For example, highlighting when moving the mouse.
tree.setHitDistance(minDistance); // the minimum distance from mouse to symbol
tree.useKDTree(true); // essential
tree.highlightClosestSymbol(point); // will now do a fast search for the closest
The best situation would be to dynamically call the "useKDTree" method when the size was above some threshold (100 atoms?). The interface is the same, either way.
Comments