Boost logo

Boost :

Subject: Re: [boost] [Review] GGL review starts today, November 5th
From: Barend Gehrels (barend_at_[hidden])
Date: 2009-11-08 08:56:47


Hi Rutger,

> In GGL, coordinate systems are assigned to points. However, one can compute
> stuff like length, angle, area, etc., with having only a proper inner
> product operator, without necessarily attaching that operator to each
> point.
> It then becomes easy to project some data in different spaces, and still
> being able run a quick hull. Think of geometric interpretations of non-
> coordinate data such as dictionaries, medical images, etc..
>
> So, my question would be: is it that generic to assume that all points
> have a coordinate system?
>

We've implemented the hull as an "agnostic" strategy because it is not
dependant on coordinate system itself. It is however dependant on two
underlying strategies, "side" and "compare". So in cartesian coordinate
systems the "side" is implemented differently from how it would be
implemented in a spherical coordinate system. Same for compare
(spherical compare assumes that the coordinates do not span more than
halve of the sphere).

So yes, for points we need to know in which coordinate system they are
placed, in order to get the calculation strategy. Note that the
point-type does not have to have one, but the Point Concept. So using a
traits class you can bind a coordinate system to a point type.

So if you define a "dictionary coordinate space" where the "side" is
probably still as defined as it is now for cartesian in the library (it
can just register the same calculation class), you can call the convex
hull for it.

If that answers your question...

Regards, Barend


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