<div dir="ltr"><div>Thanks, Looks good to me.<br></div><div>Wojtek</div></div><div class="gmail_extra"><br><div class="gmail_quote">2015-04-27 21:22 GMT+02:00 Robert Osfield <span dir="ltr"><<a href="mailto:robert.osfield@gmail.com" target="_blank">robert.osfield@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Wojtek,<br>
<br>
I have decided I'd rather change the method name and break the build<br>
rather than silently change the behaviour of method in a way that<br>
could break end user code.  What I have gone for is:<br>
<br>
--- include/osg/LineSegment     (revision 14855)<br>
+++ include/osg/LineSegment     (working copy)<br>
@@ -44,45 +44,48 @@<br>
<br>
         inline bool valid() const { return _s.valid() && _e.valid()<br>
&& _s!=_e; }<br>
<br>
+<br>
         /** return true if segment intersects BoundingBox. */<br>
         bool intersect(const BoundingBox& bb) const;<br>
<br>
-        /** return true if segment intersects BoundingBox<br>
-          * and return the intersection ratios.<br>
+        /** return true if segment intersects BoundingBox and<br>
+          * set float ratios for the first and second intersections,<br>
where the ratio is 0.0 at the segment start point, and 1.0 at the<br>
segment end point.<br>
         */<br>
-        bool intersect(const BoundingBox& bb,float& r1,float& r2) const;<br>
+        bool intersectAndComputeRatios(const BoundingBox& bb, float&<br>
ratioFromStartToEnd1, float& ratioFromStartToEnd2) const;<br>
<br>
-        /** return true if segment intersects BoundingBox<br>
-          * and return the intersection ratios.<br>
+        /** return true if segment intersects BoundingBox and<br>
+          * set double ratios for the first and second intersections,<br>
where the ratio is 0.0 at the segment start point, and 1.0 at the<br>
segment end point.<br>
         */<br>
-        bool intersect(const BoundingBox& bb,double& r1,double& r2) const;<br>
+        bool intersectAndComputeRatios(const BoundingBox& bb, double&<br>
ratioFromStartToEnd1, double& ratioFromStartToEnd2) const;<br>
<br>
+<br>
         /** return true if segment intersects BoundingSphere. */<br>
         bool intersect(const BoundingSphere& bs) const;<br>
<br>
-        /** return true if segment intersects BoundingSphere and return the<br>
-          * intersection ratio.<br>
+        /** return true if segment intersects BoundingSphere and<br>
+          * set float ratios for the first and second intersections,<br>
where the ratio is 0.0 at the segment start point, and 1.0 at the<br>
segment end point.<br>
         */<br>
-        bool intersect(const BoundingSphere& bs,float& r1,float& r2) const;<br>
+        bool intersectAndComputeRatios(const BoundingSphere& bs,<br>
float& ratioFromStartToEnd1, float& ratioFromStartToEnd2) const;<br>
<br>
-        /** return true if segment intersects BoundingSphere and return the<br>
-          * intersection ratio.<br>
+        /** return true if segment intersects BoundingSphere and<br>
+          * set double ratios for the first and second intersections,<br>
where the ratio is 0.0 at the segment start point, and 1.0 at the<br>
segment end point.<br>
         */<br>
-        bool intersect(const BoundingSphere& bs,double& r1,double& r2) const;<br>
+        bool intersectAndComputeRatios(const BoundingSphere&<br>
bs,double& ratioFromStartToEnd1, double& ratioFromStartToEnd2) const;<br>
<br>
-        /** return true if segment intersects triangle<br>
-          * and set ratio long segment.<br>
+        /** return true if segment intersects triangle and<br>
+          * set float ratios where the ratio is 0.0 at the segment<br>
start point, and 1.0 at the segment end point.<br>
         */<br>
-        bool intersect(const Vec3f& v1,const Vec3f& v2,const Vec3f&<br>
v3,float& r);<br>
+        bool intersect(const Vec3f& v1,const Vec3f& v2,const Vec3f&<br>
v3,float& ratioFromStartToEnd);<br>
<br>
-        /** return true if segment intersects triangle<br>
-          * and set ratio long segment.<br>
+        /** return true if segment intersects triangle and<br>
+          * set double ratios where the ratio is 0.0 at the segment<br>
start point, and 1.0 at the segment end point.<br>
         */<br>
-        bool intersect(const Vec3d& v1,const Vec3d& v2,const Vec3d&<br>
v3,double& r);<br>
+        bool intersect(const Vec3d& v1,const Vec3d& v2,const Vec3d&<br>
v3,double& ratioFromStartToEnd);<br>
<br>
I hope this make sense.  This change is now checked into svn/trunk.<br>
<br>
Cheers,<br>
<div class="HOEnZb"><div class="h5">Robert.<br>
_______________________________________________<br>
osg-users mailing list<br>
<a href="mailto:osg-users@lists.openscenegraph.org">osg-users@lists.openscenegraph.org</a><br>
<a href="http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org" target="_blank">http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org</a><br>
</div></div></blockquote></div><br></div>