Boost logo

Boost :

From: Simonson, Lucanus J (lucanus.j.simonson_at_[hidden])
Date: 2008-05-05 16:34:48

I have re-written the GTL polygon type to use the traits/concepts
generic interface, similar to what we've been discussing vis-a-vi point
types. The code compiles on gcc4.2.0 at least. Please see the attached
file (1KLOC) which defines the polygon_traits, polygon_concept and
provides some generic behaviors for the polygon_concept. (getting and
setting polygon contents through iterator range semantics, construction
from a rectangle, getting number of vertices and winding direction,
bounding box/area/perimeter computation, point containment predicate
algorithm, point projection, and translation algorithm.)

While point makes a good conversation piece, because it's interfaces are
trivial, it is the polygon types that are most important to provide a
good generic interface. Once the new polygon interface is settled, I
can port the heavier algorithms in the library to the new interfaces.

Please have a look and let me know what you think. I'm happy with the
interfaces as it stands now, and plan to continue to re-write the rest
of the library in this style unless feedback from the community suggests
a better approach. Fernando in particular should have some insight into
the polygon interfaces.


Boost list run by bdawes at, gregod at, cpdaniel at, john at