[prev in list] [next in list] [prev in thread] [next in thread]
List: sqlite-users
Subject: Re: [sqlite] R*Tree / In Memory Database / GUI Object Hit Testing
From: Clemens Ladisch <clemens () ladisch ! de>
Date: 2018-05-20 13:56:02
Message-ID: 3985d5fd-8161-493e-764b-f197d5d1439b () ladisch ! de
[Download RAW message or body]
Robert M. Münch wrote:
> I'm wondering if the R*Tree index of Sqlite could be used to implement
> GUI object hit testing?
Yes, that would be possible.
> We could populate a r*tree table with (runtime-object-memory-pointer,
> x0, y0, x1, y0) pretty easy. Now the user clicks the mouse somewhere,
> and we would like to get back all rectangles that were hit. Since we
> don't have any overlapping we could even sort the rectangles by size
> and get the whole tree-path to the leaf rectangle back.
In general, your object tree already is the equivalent of an R-tree,
i.e., just doing hit-testing in the objects themselves should be just
as efficient.
An (R-tree) index is more useful when you have a bunch of independent
object that are not already organized in a tree.
Regards,
Clemens
_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic