Boost logo

Geometry :

Subject: [ggl] Point in triangle test available?
From: Hartmut Kaiser (hartmut.kaiser)
Date: 2010-12-02 09:21:41


Thanks!

Regards Hartmut
---------------
http://boost-spirit.com

> -----Original Message-----
> From: Mateusz Loskot [mailto:mateusz_at_[hidden]]
> Sent: Thursday, December 02, 2010 7:48 AM
> To: Generic Geometry Library Discussion
> Cc: Hartmut Kaiser
> Subject: Re: [ggl] Point in triangle test available?
>
> On 02/12/10 02:44, Hartmut Kaiser wrote:
> >>> Does Boost.Geometry have a pre-canned 'point in triangle' test
> >>> available? I could come up with one myself easily, but asking might
> >>> allow me to stay lazy :-P
> >>
> >> There is point in polygon, of course. I'm not sure of the syntax
> >> required, however.
> >
> > For the sake of simplicity, I implemented this function for my use case:
> >[...]
>
> Yesterday, I tried the barycentric approach I mentioned and it seems to
> work, though not with the boundary cases. It does not use the within
> algorithm, thus may perform slightly faster. I've attached my version.
>
> Best regards,
> --
> Mateusz Loskot, http://mateusz.loskot.net Charter Member of OSGeo,
> http://osgeo.org Member of ACCU, http://accu.org


Geometry list run by mateusz at loskot.net