Boost logo

Boost :

From: Phil Endecott (spam_from_boost_dev_at_[hidden])
Date: 2008-05-10 12:46:26


Simonson, Lucanus J wrote:
> Given my proposed operator syntax for so-called Boolean operations I
> could fold the arbitrary angle geometry provided by Berend's library
> into mine (or visa-vera.)
>
> manhattan + manhattan => manhattan result type by way of manhattan
> algorithm
> manhattan + 45-degree => 45-degree result type by way of 45 degree
> algorithm
> manhattan/45-degree + arbitrary angle => arbitrary angle result by way
> of arbitrary angle algorithm

As I recall, with Barend's library if you ask for the intersection of
two unit-squares (0,0,1,1) and (1,0,2,1) you'll get a line (1,0,1,1),
since it considers all points on the perimeter of a polygon to be
included in the polygon:

+-+-+
| | |
+-+-+

Luke, what does your library do in this case? I mention this because,
as well as the C++ language style issues which I'm pleased to see are
being discussed by smarter people than me, there are no doubt very many
geometry-related design choices here. If your library were
stand-alone, your choices wouldn't matter much; but if as you suggest
it can integrate with other (future) libraries, then consistent choices
are needed.

Phil.


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