Boost logo

Boost :

Subject: Re: [boost] Geometry and spatial indexes, my opinion
From: Barend Gehrels (barend_at_[hidden])
Date: 2008-10-09 16:47:42


Steven Watanabe wrote:
> Simonson, Lucanus J wrote:
>
>> Futhermore, there has to
>> be a teomporary at the interface because as I've just discussed with
>> Brandon, there is the clear need to make things like polar points
>> conform to Cartesian interfaces, which is incompatible with direct
>> access to the data members. Since we already have to make a temporary
>> we should cast at that point instead of having yet another temoporary
>> and cast later on.
>>
>
> Maybe I'm misunderstanding something, but it seems to me that an
> algorithm that works
> with Cartesian coordinates will tend to be very inefficient if it has
> to convert
> to and from polar coordinates on the fly at every access.
I agree, that is too inefficient. And it is not necessary.

We (Bruno and I) are now about to publish the new preview 3 of the
"geometry library" of which preview 2 was last March.

But for now, in short. There is a point concept. The algorithms can take
any point type which fulfils the point concept. Per point type a
strategy can be registered using a traits class. That strategy will do
the primitive calculations, such as distance from point to point, or
distance from point to segment.

An algorithm (e.g. simplify) will use the registered strategy and will
do no casts or conversions, will calculate distances where necessary
and result in a simplied line.

Regards, Barend


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk