Boost logo

Geometry :

Subject: [ggl] Point/Box in Box Test (Border Cases - 3D)
From: Barend Gehrels (barend)
Date: 2011-06-29 15:58:05

Hi Frank,

> thank you very much for the quick response and for the GGL library! :)

You are welcome on behalve of the team ;-)

> I am searching a predicate slightly different than 'within' (don't
> know the common term) such that expressions like:
> withinX(Box(Point(0,0,0), Point(1,1,1)),Box(Point(0,0,0), Point(2,2,2))
> would be true. So using < or > for the comparisons of the boxes' edges
> instead of <= or >= (in within.hpp:117). That wouldn't be equivalent to
> "within(Box, Box) || onBorder(Box, Box)" in my understanding.

I see.

> I had a look into the 'within_util.hpp' file with the within_code
> function and it would be sufficient for point-in-box or point-in-ring
> tests (although it is currently only prepared to work with 2D
> points!?). But what about box-in-box or ring-in-ring use cases?

Right, point-in-box and box-in-box is indeed not yet supported by the
current within_code detail function, but that can be helped. I'll look
soon into this.

Regards, Barend

Geometry list run by mateusz at