[osg-submissions] try doubles for math in LineSegment::intersect() methods
Andy Skinner
Andy.Skinner at mathworks.com
Wed Feb 6 13:50:02 PST 2008
This is to address what I've been asking about on the users list. We've
got cases where the float math just isn't enough to do the intersections
properly. I had to convert everything to doubles for it to work.
One optimization is that Vec3d versions of _s, _e, and _s-_e could be
stored in the LineSegment and calculated when needed in an intersection.
The intersect() method is const, so I didn't do it here.
I am a little less sure of the intersect method that takes 3 Vec3s and a
float reference. I saw it did a-b one place and b-a another, and I used
a Vec3d for this and used its operator- for the second occurrence. I'm
not sure how much of this is worth it.
If those who do a lot of these intersections could time this and tell me
how it does, I'd appreciate it.
andy
-------------- next part --------------
A non-text attachment was scrubbed...
Name: file.tar.gz
Type: application/x-gzip
Size: 1921 bytes
Desc: file.tar.gz
Url : http://lists.openscenegraph.org/pipermail/osg-submissions-openscenegraph.org/attachments/20080206/0b10e202/attachment-0001.bin
More information about the osg-submissions
mailing list