Subject: Re: [geometry] Register CCW Polygon
From: Mateusz Loskot (mateusz_at_[hidden])
Date: 2013-10-25 18:10:23
On 25 October 2013 22:56, Andrew Hundt <athundt_at_[hidden]> wrote:
> 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
> 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.
I'm afraid, that get up and run quickly in case of C++ library heavily
based on metaprogramming requires quite a bit of knowledge
of idioms far beyond the C++ OOP.
Boost provides some overview:
but it does not 'teach' everything.
> 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?
Yes, it does, but I personally think Boost.Geometry documentation is not the
right place to explain general C++ techniques and idioms. It tries to mention
names of well-known techniques and users are supposed to seek help
on C++ discussion groups, books, etc.
However, if you think there are BG specifics missing in the docs,
please point it out and suggest what needs to be clarified.
Certainly, there is lots of room for improvements in the documentation.
Regarding the tag dispatching, Barend Gehrels gives a very good overview
of those C++ techniques on his blog:
-- Mateusz Loskot, http://mateusz.loskot.net
Geometry list run by mateusz at loskot.net