Hi Greg,
Kudos on taking the initiative to debug into the OSG source yourself. I
don't think many would have been able to answer your question of why the
intersection test was failing, so that was the good thing to do.
The last test ( line 16 ) is failing. From reading the web I understand that
if the test on line 11 fails then there is no intersection but if it passes
then the line segment intersects the sphere at two points. I don't understand
what the last two tests ( lines 15 and 16 ) are testing for. Could someone
explain it to me?
The LineSegmentIntersector tests a line segment for intersection, not a
ray. So the tests on lines 15 and 16 are there to make sure any
intersection that was detected happened between the start of the line
segment and its end (normalized to 0.0 - 1.0).
Seems to me that your line segment's second point (end) is before the
geometry you're testing, if it fails at line 16. The geometry is further
than the furthest point of the line.
As to why, I don't know... Perhaps you calculate the endpoints of your
line segment wrong? Or there's a mixup in coordinate systems somewhere
along the line (geez, forgive the pun).
Hope this helps,
J-S
--
______________________________________________________
Jean-Sebastien Guay jean-sebastien.g...@cm-labs.com
http://www.cm-labs.com/
http://whitestar02.webhop.org/
_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org