Flutter Engine
The Flutter Engine
|
#include <SkRTree.h>
Public Member Functions | |
SkRTree () | |
void | insert (const SkRect[], int N) override |
void | search (const SkRect &query, std::vector< int > *results) const override |
size_t | bytesUsed () const override |
int | getDepth () const |
int | getCount () const |
Public Member Functions inherited from SkBBoxHierarchy | |
virtual void | insert (const SkRect[], int N)=0 |
virtual void | insert (const SkRect[], const Metadata[], int N) |
virtual void | search (const SkRect &query, std::vector< int > *results) const =0 |
virtual size_t | bytesUsed () const =0 |
Public Member Functions inherited from SkRefCntBase | |
SkRefCntBase () | |
virtual | ~SkRefCntBase () |
bool | unique () const |
void | ref () const |
void | unref () const |
Static Public Attributes | |
static const int | kMinChildren = 6 |
static const int | kMaxChildren = 11 |
Additional Inherited Members | |
Protected Member Functions inherited from SkBBoxHierarchy | |
SkBBoxHierarchy ()=default | |
SkBBoxHierarchy (const SkBBoxHierarchy &)=delete | |
SkBBoxHierarchy & | operator= (const SkBBoxHierarchy &)=delete |
An R-Tree implementation. In short, it is a balanced n-ary tree containing a hierarchy of bounding rectangles.
It only supports bulk-loading, i.e. creation from a batch of bounding rectangles. This performs a bottom-up bulk load using the STR (sort-tile-recursive) algorithm.
TODO: Experiment with other bulk-load algorithms (in particular the Hilbert pack variant, which groups rects by position on the Hilbert curve, is probably worth a look). There also exist top-down bulk load variants (VAMSplit, TopDownGreedy, etc).
For more details see:
Beckmann, N.; Kriegel, H. P.; Schneider, R.; Seeger, B. (1990). "The R*-tree: an efficient and robust access method for points and rectangles"
SkRTree::SkRTree | ( | ) |
Definition at line 13 of file SkRTree.cpp.
|
overridevirtual |
Return approximate size in memory of *this.
Implements SkBBoxHierarchy.
Definition at line 165 of file SkRTree.cpp.
|
inline |
|
inline |
|
overridevirtual |
Insert N bounding boxes into the hierarchy.
Implements SkBBoxHierarchy.
Definition at line 15 of file SkRTree.cpp.
Populate results with the indices of bounding boxes intersecting that query.
Implements SkBBoxHierarchy.
Definition at line 147 of file SkRTree.cpp.