Subject: CGAL users discussion list
List archive
- From: eduriol <>
- To:
- Subject: Re: [cgal-discuss] Testing a point inside or outside a polygon
- Date: Fri, 15 Jan 2010 10:50:20 -0800 (PST)
Hi, Kuong, you can try with something like this:
CGAL::Bounded_side bside = polygon.bounded_side(point);
if (bside == CGAL::ON_BOUNDED_SIDE) {
// point inside
} else if (bside == CGAL::ON_BOUNDARY) {
// point on the border
} else if (bside == CGAL::ON_UNBOUNDED_SIDE) {
// point outside
}
Vu, Khuong wrote:
>
> Hi everyone,
>
> Would you please help me out with a problem? I have a closed 2D polygon,
> whose boundary is constructed by line segments. Given a point, I'd like to
> test if it lies in the interior of the boundary or not. Does CGAL have a
> library to do the job? Thanks so much!
>
> Cheers,
> Khuong
> --
> You are currently subscribed to cgal-discuss.
> To unsubscribe or access the archives, go to
> https://lists-sop.inria.fr/wws/info/cgal-discuss
>
>
>
--
View this message in context:
http://n4.nabble.com/Testing-a-point-inside-or-outside-a-polygon-tp1015063p1015174.html
Sent from the cgal-discuss mailing list archive at Nabble.com.
- [cgal-discuss] Testing a point inside or outside a polygon, Vu, Khuong, 01/15/2010
- Re: [cgal-discuss] Testing a point inside or outside a polygon, eduriol, 01/15/2010
Archive powered by MHonArc 2.6.16.