added quadtree *-distance functions and support for them