Boost logo

Geometry :

Subject: Re: [geometry] Register CCW Polygon
From: Andrew Hundt (athundt_at_[hidden])
Date: 2013-10-25 17:56:28


On Thu, Oct 24, 2013 at 4:56 PM, Mateusz Loskot <mateusz_at_[hidden]> wrote:

> On 23 October 2013 18:36, Andrew Hundt <athundt_at_[hidden]> wrote:
> > On Mon, Oct 21, 2013 at 12:02 PM, Barend Gehrels <barend_at_[hidden]>
> wrote:
> >> Hunk wrote On 21-10-2013 14:05:
> >>
> >>> It is possible to tell boost that my
> >>> polygon is CCW orientated so that i dont have to use correct?
> >>
> >>
> >> You can do that, but not with the macro. The macro's
> >> (BOOST_GEOMETRY_REGISTER*) don't cover all possible situations. But you
> can
> >> still specialize the traits classes to support your Polygon.
> >
> > It would be nice if there was a small explanation and example of how to
> do
> > manual registration in the docs. It was a big source of confusion when I
> was
> > first getting up and running with the library.
>
> Please, take a look at the examples in libs/geometry folder.
> Specifically at
>
> http://svn.boost.org/svn/boost/trunk/libs/geometry/example/c06_custom_polygon_example.cpp

Thanks for pointing that out. I think that people trying to get up and
running quickly with Boost.Geometry may not be deeply familiar with tag
dispatching, a very advanced C++ technique. Therefore, I feel like a bit of
explanation of what is being done and why in the documentation of the
examples would make them a lot more helpful.

Does that make sense?

Cheers!
Andrew Hundt



Geometry list run by mateusz at loskot.net