X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=src%2Fquadtree.h;h=4fd4b2d6b8decdfd90ade563871b746d44d7db27;hb=216bf86aee4c7a1f3392051a457e7e5933f40fbd;hp=1c1c0254c6441d289cbdde2daba561ec21057973;hpb=5f600e9c0d22c09bd60ef3c7245dbecc8d35d576;p=ipdf%2Fcode.git diff --git a/src/quadtree.h b/src/quadtree.h index 1c1c025..4fd4b2d 100644 --- a/src/quadtree.h +++ b/src/quadtree.h @@ -13,6 +13,7 @@ namespace IPDF typedef int QuadTreeIndex; static const QuadTreeIndex QUADTREE_EMPTY = -1; + class Document; enum QuadTreeNodeChildren { @@ -41,6 +42,8 @@ namespace IPDF unsigned object_end; // Linked list of "extra" nodes QuadTreeIndex next_overlay; + // First object which has not yet been propagated to extant children/parent. + unsigned object_dirty; }; struct QuadTree @@ -49,7 +52,8 @@ namespace IPDF QuadTreeIndex root_id; std::vector nodes; - QuadTreeIndex GetNeighbour(QuadTreeIndex start, int xdir, int ydir) const; + QuadTreeIndex GetNeighbour(QuadTreeIndex start, int xdir, int ydir, Document *doc) const; + void GetCanonicalCoords(QuadTreeIndex& start, Real& x, Real& y, Document *doc); };