Hello,

i just found a bug in the Volume intersection methods (OSGVolumeFunctions.cpp).

For the intersection with the CylinderVolumes/Sphere and Cyl/Box there is missing this check:

  s1 = (apos        - sphere.getCenter()).length();
  s2 = (apos + adir - sphere.getCenter()).length();

// to be added:
 if ((s1<=DBL_EPSILON) || (s2<=DBL_EPSILON)) return true;

otherwise u might divide by zero.

Also i couldn't find the function which is called for CylinderVolume.intersect(SphereVolume).
In the OSGVolumeFunctions.cpp there is a intersect(CylinderVol, Volume),
but i couldn't find a intersect(CylinderVol, SphereVol) ?
And i dont see why the intersect(SphereVol, CylinderVol) should be called. As far as i saw the intersect(CylinderVol, Volume) should call itself for a Sphere, which is not happening... ???

Thanks,
        Daniel Grest






-------------------------------------------------------
This SF.net email is sponsored by: Perforce Software.
Perforce is the Fast Software Configuration Management System offering
advanced branching capabilities and atomic changes on 50+ platforms.
Free Eval! http://www.perforce.com/perforce/loadprog.html
_______________________________________________
Opensg-users mailing list
Opensg-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/opensg-users

Reply via email to