Hi!
I am doing some intersection testing and realized that the intersect method
in FrustumVolume is incorrect.
bool FrustumVolume::intersect(const Pnt3r &point) const
295 {
296 bool retCode = true;
297
298 for(Int32 i = 0; i < 6; i++)
299 {
300 if((_planeVec[i].getNormal().x() * point.x() +
301 _planeVec[i].getNormal().y() * point.y() +
302 _planeVec[i].getNormal().z() * point.z() +
303 _planeVec[i].getDistanceFromOrigin() ) < 0.f)
304 {
305 retCode = false;
306 break;
307 }
308 }
309
310 return retCode;
311 }
The last '+' should be a '-'.
Another thing that I found when I was looking around in the intersection
code was that OSGTransform does not do a check on the bounding volume before
visiting its children.
In DistanceLOD there is no intersection method registered so it uses the
Group method. That means it visits all children regardless of what is drawn.
Shouldn't it only visit the same as the RenderAction?
Regards
Fredrik
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users