[osg-users] intersect() methods in LineSegment (probably others)

Andy Skinner Andy.Skinner at mathworks.com
Tue Feb 5 05:56:48 PST 2008


I'm not sure what changed (in OSG or our code), but one of our unittests
is failing on Windows as I try to upgrade our software to OSG 2.3.3.
The picking I'm doing isn't hitting anything.  It appears that the use
of floats in the LineSegment::intersect(BoundingSphere) method may be
hurting us.

I've seen mentions on this in the list archives.  Is the calculation
done in this method done in float on purpose?  If some of the
intermediate value in this calculation were done in double, would it
slow things down too much?

We're squaring some large numbers and subtracting them from each other,
and it isn't holding up for us.  I'm going to experiment with doing some
of this in double, but since it seems known that there are precision
problems in this code, I wonder if it has remained in float for a
reason.

I could try to make an example for this, but because there seems to be
an awareness of the issue, I'll raise it now.

Thoughts?

thanks
andy



More information about the osg-users mailing list