#include "common.h"
+#include "ipdf.h"
namespace IPDF
{
struct QuadTree
{
+ QuadTree() : root_id(QUADTREE_EMPTY) {}
QuadTreeIndex root_id;
std::vector<QuadTreeNode> nodes;
+
+ QuadTreeIndex GetNeighbour(QuadTreeIndex start, int xdir, int ydir) const;
+
};
+
+ Rect TransformToQuadChild(const Rect& src, QuadTreeNodeChildren child_type);
+ Rect TransformFromQuadChild(const Rect& src, QuadTreeNodeChildren child_type);
+ bool IntersectsQuadChild(const Rect& src, QuadTreeNodeChildren child_type);
+ bool ContainedInQuadChild(const Rect& src, QuadTreeNodeChildren child_type);
}
#else