Boost logo

Geometry :

Subject: Re: [geometry] Non-axis aligned bounding box collision in 3D
From: Sybren A. Stüvel (sybren_at_[hidden])
Date: 2014-03-27 16:45:07

Hi David,

On 27 March 2014 19:45, David Sauter <delwin_at_[hidden]> wrote:

> I've got a current implementation that works using BG and r-tree but it's
> using an AABB that completely encompass the query area so I've got a lot of
> false positives to weed through. I'm looking for a cleaner way to query a
> large data set.
> The data set consists of X/Y plane squares of various sizes and at
> various coordinates within a known range. The tricky part is that I need
> to cull all but those that touch a small square area projected along a
> non-axis aligned vector.
> Is there any way to query the r-tree with a non-axis aligned bounding
> box? If not is there a known way to do this query that I'm just
> overlooking?

I can't give you a Boost::Geometry answer, but I do know that the RAPID
library implements a very efficient Oriented Bounding Box (OBB) tree
implementation. You can find it at


Sybren A. Stüvel

Geometry list run by mateusz at