Hi all

Once again, here is a discussion about LineSegmentIntersector and precision 
(float vs. double).

Attached is a small program showing my problem. The geometry is a 
TRIANGLE_STRIP consisting of five vertices, all with the same rather high 
Z-value. If the intersection calculation uses KdTree it fails. When I changed 
osg::Vec3 to osg::Vec3d for two parameters (s and e) in the IntersectKdTree 
constructor it finds the correct intersection point.

Another way to solve the problem was to increase the expansion of the 
bounding-box in osgUtil::LineSegmentIntersector::intersectAndClip.

The version of OSG that I use is 2.9.6.

I have not enough knowledge in KdTree to understand what other implications 
these changes may have, but if either of these fixes seems to be reasonable, I 
will be glad to post it to the submissions mailing list.

Regards,
Lars Nilsson

Attachment: test.cc
Description: test.cc

_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to