X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=src%2Fquadtree.h;h=15fd8a9225fd25cb818ae83e227a90f4761b2107;hb=a9883b166454c794e342ccc262ca97e0394af980;hp=1443650e2373f423a198137cdbff39d529350bf9;hpb=5f25f354c33142215147b1fa3d18445bd0d7a6ee;p=ipdf%2Fcode.git diff --git a/src/quadtree.h b/src/quadtree.h index 1443650..15fd8a9 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 { @@ -39,6 +40,10 @@ namespace IPDF unsigned object_begin; // Last object in the node. 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 @@ -46,6 +51,9 @@ namespace IPDF QuadTree() : root_id(QUADTREE_EMPTY) {} QuadTreeIndex root_id; std::vector nodes; + + QuadTreeIndex GetNeighbour(QuadTreeIndex start, int xdir, int ydir, Document *doc) const; + }; Rect TransformToQuadChild(const Rect& src, QuadTreeNodeChildren child_type);