Boost logo

Geometry :

Subject: [ggl] within() to return true if point is on border?
From: Denis Pesotsky (obey)
Date: 2011-04-10 19:17:38

Hi all.

I need to detect if polygon (with holes) intersects box. Intersection
is when they have shared square (e.g. intersection square > 0).

Currently, I do following:

First funcion returns true, if box intersects ring.
Second function (should) return true, if box is fully contained by
ring (if some corner of box is on border, it still can return true).
Third function (should) return true if box intersects (1st function)
outer ring of polygon and is not contained (2nd function) by any inner
ring of polygon.

Second function result is bad for me, I need within() to return true
if point is on border. Any way to do that? Or maybe I need to do
something else?

Geometry list run by mateusz at