$include_dir="/home/hyper-archives/geometry/include"; include("$include_dir/msg-header.inc") ?>
Subject: [ggl] Polyhedra Intersection in Boost.Geometry
From: Robert Wilkerson (rwilkerson)
Date: 2011-06-10 22:03:37
Hi,
First, I apologize if this question has already been asked.  The 
archives of this mailing list don't seem to be search-able.
I'm working on a project for which I need to know if two polyhedra 
intersect.  I realize this is a challenging problem in general and was 
hoping there was a C++ package available that at least implemented this 
for square pyramids (http://en.wikipedia.org/wiki/Square_pyramid).  I 
discovered Boost.Geometry and have been poking around for a few days. 
However, it doesn't seem like the models and algorithms in 
Boost.Geometry extend to polyhedra.  Is this true?  If yes, is there a 
plan for implementing such functionality?  If no, can someone please 
point me in the right direction?
I'm hoping for a capability such as:
<Code>
int main()
{
   boost::geometry::model::polyhedron<boost::tuple<double, double, 
double> > polyhedron1;
   boost::geometry::model::polyhedron<boost::tuple<double, double, 
double> > polyhedron2;
   // Fill polyhedron1.
   // Fill polyhedron2.
   bool b = boost::geometry::intersects(polyhedron1, polyhedron2);
   std::cout << "Intersects: " << (b ? "YES" : "NO") << std::endl;
   return 0;
}
</Code>
Thanks in advance,
Robert