X-Git-Url: https://git.ucc.asn.au/?p=ipdf%2Fcode.git;a=blobdiff_plain;f=src%2Fquadtree.cpp;h=623bd3893c1b973d5e21d1daf2d073730820c6bc;hp=b84bb78b3071de6fe9bb10a6853def420f7aef48;hb=f0b6c9b6b95fde134927c395afbfbbbc057868e6;hpb=efdd8f483157ceeb1bae535840934ac770126a28 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