Subject: CGAL users discussion list
List archive
- From: Bernd Gaertner <>
- To:
- Subject: Re: [cgal-discuss] Line_3 and BBox_3 intersection
- Date: Wed, 22 Aug 2007 16:47:59 +0200
Alejandro M. Aragón wrote:
Hello everyone,
I am trying to intersect a line in three dimensions with a bounding box.
I thought that the best way to do this using the library was to obtain
the 8 points from the bounding box, then create 12 3D triangles and then
use the function DoIntersect_3 between the line and each of those
triangles. Is there a better way to accomplish this?
If you just want to test for the existence of an intersection (and if there is one find ONE intersection point), you may use the linear programming solver. You can e.g. model the situation by a set of two equality constraints (that describe the line) plus upper/lower bounds on the variables (that describe the bounding box). See the manual pages at http://www.cgal.org/Pkg/QPSolver for details.
Best,
Bernd.
- Line_3 and BBox_3 intersection, Alejandro M., 08/22/2007
- Re: [cgal-discuss] Line_3 and BBox_3 intersection, Bernd Gaertner, 08/22/2007
Archive powered by MHonArc 2.6.16.