38 int hitCount = 0, notfound;
110 int top = 0, down = 0;
119 while (s[top].
sn->
level > level) {
148 else if (result == 2) {
152 else if (result == 1) {
199 result = RTreeInsertRect2M(r, child, level, &newnode, t,
200 &reInsertList, overflow);
223 while (reInsertList) {
226 level = reInsertList->
level;
228 reInsertList = reInsertList->
next;
232 RTreeInsertRect2M(&(b->
rect), b->
child, level, &newnode, t,
233 &reInsertList, overflow);
270 int top = 0, down = 0;
281 while (notfound && top >= 0) {
332 if (s[down].
sn->
count >= minfill) {
361 if (!RTreeDeleteRect2M(r, child, t, &reInsertList)) {
365 while (reInsertList) {
367 n = reInsertList->
node;
385 reInsertList = reInsertList->
next;
#define RTreeCopyRect(r1, r2, t)
void RTreeFreeNode(struct RTree_Node *n)
int SearchHitCallback(int id, const struct RTree_Rect *rect, void *arg)
int RTreeSearchM(struct RTree *t, struct RTree_Rect *r, SearchHitCallback *shcb, void *cbarg)
int RTreeInsertRectM(struct RTree_Rect *r, union RTree_Child child, int level, struct RTree *t)
#define MAXLEVEL
Maximum verbosity level.
struct RTree_ListBranch * next
struct RTree_ListNode * next
#define assert(condition)
void RTreeFreeListNode(struct RTree_ListNode *p)
void RTreeDisconnectBranch(struct RTree_Node *, int, struct RTree *)
int RTreeValidChildM(union RTree_Child *child)
struct RTree_Branch * branch
int RTreeExpandRect(struct RTree_Rect *, struct RTree_Rect *, struct RTree *)
void RTreeFreeListBranch(struct RTree_ListBranch *p)
struct RTree_Node * RTreeAllocNode(struct RTree *t, int level)
int RTreeAddBranch(struct RTree_Branch *, struct RTree_Node *, struct RTree_Node **, struct RTree_ListBranch **, struct RTree_Rect *, char *, struct RTree *)
int RTreeDeleteRectM(struct RTree_Rect *r, union RTree_Child child, struct RTree *t)
int RTreePickBranch(struct RTree_Rect *, struct RTree_Node *, struct RTree *)
void RTreeCopyBranch(struct RTree_Branch *, struct RTree_Branch *, struct RTree *)
void RTreeReInsertNode(struct RTree_Node *n, struct RTree_ListNode **ee)
void RTreeNodeCover(struct RTree_Node *, struct RTree_Rect *, struct RTree *)
int RTreeOverlap(struct RTree_Rect *r, struct RTree_Rect *s, struct RTree *t)