f537ece404
"I've made a few changes to osgUtil::PolytopeIntersector so that it actually uses double precision floating point numbers everywhere (as long as OSG_USE_FLOAT_PLANE is not defined). I needed double precision intersections in a project I am working on. These changes fixed the problems I was having -- this is all testing I have done. Notice that I have changed osgUtil::PolytopeIntersector::Intersection's members to use doubles (osg::Vec3d, instead of osg::Vec3). I could have added #ifdef's there too, but I think it is better to not change the types of stuff in the public interface depending on some preprocessor definition. The modified files are attached. A diff also follows, for those who like it." With the following changes from Robert Osfield: "I've just reviewed your changes and have just tweaked them a little to streamline them. What I have done in the PolytopeIntersector header is add: typedef osg::Plane::Vec3_type Vec3_type; And then use this typedef in the definition of the vertices rather then Vec3d as you did. Next changes were to PolytopeInteresector.cpp where to the PolytopeIntersectorUtils defintions of the Vec3_type, and value_type which now simply read: typedef osg::Plane::Vec3_type Vec3_type; typedef Vec3_type::value_type value_type; This way I was able to complete avoid any if def's and have essential the same implementation as you achieved. Changes now checked into svn/trunk." |
||
---|---|---|
.. | ||
OpenThreads | ||
osg | ||
osgAnimation | ||
osgDB | ||
osgFX | ||
osgGA | ||
osgManipulator | ||
osgParticle | ||
osgPresentation | ||
osgQt | ||
osgShadow | ||
osgSim | ||
osgTerrain | ||
osgText | ||
osgUtil | ||
osgViewer | ||
osgVolume | ||
osgWidget |