X-Git-Url: https://git.ucc.asn.au/?p=ipdf%2Fcode.git;a=blobdiff_plain;f=src%2Fquadtree.cpp;h=623bd3893c1b973d5e21d1daf2d073730820c6bc;hp=b84bb78b3071de6fe9bb10a6853def420f7aef48;hb=f28146cf72fc68c8d3690814b1f89d47b8c4e7b9;hpb=54cbdc5600ed4280f1e33f9f1f4780e48713c352;ds=sidebyside diff --git a/src/quadtree.cpp b/src/quadtree.cpp index b84bb78..623bd38 100644 --- a/src/quadtree.cpp +++ b/src/quadtree.cpp @@ -297,6 +297,15 @@ QuadTreeIndex QuadTree::GetNeighbour(QuadTreeIndex start, int xdir, int ydir, Do return -1; } +void QuadTree::GetCanonicalCoords(QuadTreeIndex& start, Real& x, Real& y, Document *doc) +{ + int _x = (int)x; + int _y = (int)y; + start = GetNeighbour(start, _x, _y, doc); + x -= _x; + y -= _y; +} + } #endif