On Mon, 2008-01-14 at 14:26 -0800, Ben Jackson wrote:
> On Mon, Jan 14, 2008 at 10:22:33PM +0000, Peter Clifton wrote:
> > 
> > Specifically, a few cases which might be useful to have API for..
> > 
> > Find objects which are _completely_ within a rectangle,
> > Find objects which have _any_ point within a rectangle,
> > Find which objects _contain_ a given x, y point.
> > 
> > Currently we don't have any spatial data-structure to make this fast and
> > efficient. I need to write something like that for the cairo rendering
> > support though.
> 
> You could use the rtree from PCB.

>From later in the email:

"I wasn't sure yet if I could / should re-use PCB's implementation, or
base it on API similar to GTree."

PCB's coding style, naming conventions don't fit entirely with gEDA, so
some adaption would be desirable. I don't want to re-implement the wheel
though, so at the very least will be using the PCB implementation as a
reference.

Having looked at it again (just now), I think just a little alteration
to the interface API, (change BoxType) etc.., and it would be fine.
There is a case for turning asserts into something less fatal though.

-- 
Peter Clifton

Electrical Engineering Division,
Engineering Department,
University of Cambridge,
9, JJ Thomson Avenue,
Cambridge
CB3 0FA

Tel: +44 (0)7729 980173 - (No signal in the lab!)



_______________________________________________
geda-dev mailing list
[email protected]
http://www.seul.org/cgi-bin/mailman/listinfo/geda-dev

Reply via email to