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