X-Git-Url: https://git.ucc.asn.au/?p=ipdf%2Fcode.git;a=blobdiff_plain;f=src%2Fquadtree.h;h=9a7b8f97673dd7b3c4a45b09fd59981727236d08;hp=4b752696022408e09a8e0da547b260a3233cdaeb;hb=d68c91a7a2a3a4b3a312a50cbab5a7539d4cd7d5;hpb=7bd1c291a120559e209996a572f437cbe6f3e4a4 diff --git a/src/quadtree.h b/src/quadtree.h index 4b75269..9a7b8f9 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,11 @@ 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; + bool render_dirty; }; struct QuadTree @@ -47,7 +53,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); };