Revision: 55955
http://sourceforge.net/p/brlcad/code/55955
Author: phoenixyjll
Date: 2013-07-04 05:17:06 +0000 (Thu, 04 Jul 2013)
Log Message:
-----------
Add intersection bounding box output support to the other two Intersect()
functions.
Modified Paths:
--------------
brlcad/trunk/src/libbrep/intersect.cpp
Modified: brlcad/trunk/src/libbrep/intersect.cpp
===================================================================
--- brlcad/trunk/src/libbrep/intersect.cpp 2013-07-04 05:11:26 UTC (rev
55954)
+++ brlcad/trunk/src/libbrep/intersect.cpp 2013-07-04 05:17:06 UTC (rev
55955)
@@ -110,12 +110,15 @@
ON_BoundingBox new_bbox(m_node.m_min-vtol, m_node.m_max+vtol);
return new_bbox.IsPointIn(pt);
}
- bool Intersect(const Subcurve& other, double tolerance = 0.0) const
+ bool Intersect(const Subcurve& other, double tolerance = 0.0,
ON_BoundingBox* intersection = NULL) const
{
ON_3dVector vtol(tolerance, tolerance, tolerance);
ON_BoundingBox new_bbox(m_node.m_min-vtol, m_node.m_max+vtol);
- ON_BoundingBox intersection;
- return intersection.Intersection(new_bbox, other.m_node);
+ ON_BoundingBox box;
+ bool ret = box.Intersection(new_bbox, other.m_node);
+ if (intersection != NULL)
+ *intersection = box;
+ return ret;
}
};
@@ -221,12 +224,15 @@
}
}
}
- bool Intersect(const Subcurve& curve, double tolerance = 0.0) const
+ bool Intersect(const Subcurve& curve, double tolerance = 0.0,
ON_BoundingBox* intersection = NULL) const
{
ON_3dVector vtol(tolerance, tolerance, tolerance);
ON_BoundingBox new_bbox(m_node.m_min-vtol, m_node.m_max+vtol);
- ON_BoundingBox intersection;
- return intersection.Intersection(new_bbox, curve.m_node);
+ ON_BoundingBox box;
+ bool ret = box.Intersection(new_bbox, curve.m_node);
+ if (intersection != NULL)
+ *intersection = box;
+ return ret;
}
bool Intersect(const Subsurface& surf, double tolerance = 0.0,
ON_BoundingBox* intersection = NULL) const
{
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:
Build for Windows Store.
http://p.sf.net/sfu/windows-dev2dev
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits