Boost logo

Geometry :

Subject: Re: [geometry] registered rings
From: Mateusz Loskot (mateusz_at_[hidden])
Date: 2013-09-03 17:46:23


On 3 September 2013 21:28, Alessandro Ranellucci <alex_at_[hidden]> wrote:
> Hello!
> I have two questions about BOOST_GEOMETRY_REGISTER_RING().
>
> The first one is: how can I specify I want my rings to be counter-clockwise and open? I.e. the two bools that are available when defining a model::ring. I can't see how to set them using the above macro.

AFAIR, the macros haven't been updated to handle that, so you need to
manually specialise point_order for YourCustomType, like this:

namespace boost { namespace geometry {
   template<>
   struct point_order<YourCustomType>
   {
      static const order_selector value = clockwise; // counterclockwise;
   };
}}

> The second one is about using convex_hull() with a registered ring as second argument (output). It failed to compile because my class hasn't got const_reference. How should I do?

Can you paste the compilation error?

Best regards,

-- 
Mateusz  Loskot, http://mateusz.loskot.net
"Participation in this whole process is a form of torture" ~~ Szalony

Geometry list run by mateusz at loskot.net