Boost logo

Boost Users :

Subject: Re: [Boost-users] POD 3d vectors
From: Bruno Lalande (bruno.lalande_at_[hidden])
Date: 2009-06-04 04:39:08


Hi,

Sorry for the late but did you try GGL?

http://geometrylibrary.geodan.nl

This library contains geometry algorithms that can handle any type of
point: C arrays, PODs, legacy points, user-defined points... A very
basic use could be (using C arrays here):

double p1[] = { 1.0, 2.0 };
double p2[] = { 3.0, 4.0 };
cout << "Distance: " << ggl::distance(p1, p2) << endl;
cout << "Dot product: " << ggl::dot_product(p1, p2) << endl;

Adapting your own point type is very simple using a few automagic
macros (see c01_custom_point_example in the docs).

Barend Gehrels, Mateusz Loskot and me are the current developers. It
will be proposed to Boost. There's a dedicated mailing list on OSGeo:

http://lists.osgeo.org/mailman/listinfo/ggl

Regards
Bruno


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net