[MOAB-dev] r3744 - in MOAB/trunk/src: . moab

kraftche at cae.wisc.edu kraftche at cae.wisc.edu
Mon Apr 5 17:23:20 CDT 2010


Author: kraftche
Date: 2010-04-05 17:23:20 -0500 (Mon, 05 Apr 2010)
New Revision: 3744

Modified:
   MOAB/trunk/src/OrientedBoxTreeTool.cpp
   MOAB/trunk/src/moab/OrientedBoxTreeTool.hpp
Log:
get all ray/surface intersections

Modified: MOAB/trunk/src/OrientedBoxTreeTool.cpp
===================================================================
--- MOAB/trunk/src/OrientedBoxTreeTool.cpp	2010-04-05 21:29:15 UTC (rev 3743)
+++ MOAB/trunk/src/OrientedBoxTreeTool.cpp	2010-04-05 22:23:20 UTC (rev 3744)
@@ -950,6 +950,14 @@
 
 void RayIntersectSets::add_intersection( double t, EntityHandle facet )
 {
+    // If minTolInt is less than zero, return all intersections
+  if (minTolInt < 0 && t > -tol) {
+    intersections.push_back(t);
+    sets.push_back(lastSet);
+    facets.push_back(facet);
+    return;
+  }
+
     // Check if the 'len' pointer is pointing into the intersection
     // list.  If this is the case, then the list contains, at that
     // location, an intersection greater than the tolerance away from

Modified: MOAB/trunk/src/moab/OrientedBoxTreeTool.hpp
===================================================================
--- MOAB/trunk/src/moab/OrientedBoxTreeTool.hpp	2010-04-05 21:29:15 UTC (rev 3743)
+++ MOAB/trunk/src/moab/OrientedBoxTreeTool.hpp	2010-04-05 22:23:20 UTC (rev 3744)
@@ -233,6 +233,9 @@
      *                     ray start point is less than this number, the next closest
      *                     intersection.  If the desired result is only the closest
      *                     intersection, pass zero for this argument.
+     *                     This function will return all intersections, regardless
+     *                     of distance from the start of the ray, if this value
+     *                     is negative.
      *\param tolerance     The tolerance to use in intersection checks.
      *\param ray_point     The base point of the ray.
      *\param unit_ray_dir  The ray direction vector (must be unit length)



















More information about the moab-dev mailing list