32#include <geometry/rtree.h>
54 VIEW_RTREE_BASE::Insert( mmin, mmax, aItem );
70 VIEW_RTREE_BASE::Remove( mmin, mmax, aItem );
75 const int mmin[2] = { INT_MIN, INT_MIN };
76 const int mmax[2] = { INT_MAX, INT_MAX };
78 VIEW_RTREE_BASE::Remove( mmin, mmax, aItem );
85 template <
class Visitor>
86 void Query(
const BOX2I& aBounds, Visitor& aVisitor )
const
98 if( aBounds == max_box )
100 mmin[0] = mmin[1] = INT_MIN;
101 mmax[0] = mmax[1] = INT_MAX;
104 VIEW_RTREE_BASE::Search( mmin, mmax, aVisitor );
constexpr void SetMaximum()
constexpr coord_type GetY() const
constexpr coord_type GetX() const
constexpr coord_type GetRight() const
constexpr coord_type GetBottom() const
An abstract base class for deriving all objects that can be added to a VIEW.
Implement an non-owning R-tree for fast spatial indexing of VIEW items.
void Insert(VIEW_ITEM *aItem, const BOX2I &bbox)
Insert an item into the tree.
void Query(const BOX2I &aBounds, Visitor &aVisitor) const
Execute a function object aVisitor for each item whose bounding box intersects with aBounds.
void Remove(VIEW_ITEM *aItem, const BOX2I *aBbox)
Remove an item from the tree.
The Cairo implementation of the graphics abstraction layer.
RTree< VIEW_ITEM *, int, 2, double > VIEW_RTREE_BASE