Hi David, If you haven't tried out the osg in SVN, you should. It should have a DOFTransform fix that prevents DOFTransforms from being visited when they are not even switched on or LOD'd in. This prevents your Update times from being high when you have a lot of DOFs.
Zach _____ From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of David Spilling Sent: Monday, March 12, 2007 15:43 To: osg users Subject: Re: [osg-users] Linux vs. Windows file system For what it's worth, we found that since all DOFTransforms (coming from OpenFlight files) were in the same order, namely heading, roll, pitch (or was it the other way around - I always have to go back to the maths to remember) we saved a lot of time by implementing our own "replacement", firstly with fixed axis order, and secondly along the lines of: double sx = sin(roll); double cx = cos(roll); double sy = sin(pitch); double cy = cos(pitch); double sz = sin(yaw); double cz = cos(yaw); double sxsy = sx*sy; double cxsy = cx*sy; return osg::Matrix( cy*cz, cy*sz, -sy, 0.0, sxsy*cz-cx*sz, sxsy*sz+cx*cz, sx*cy, 0.0, cxsy*cz+sx*sz, cxsy*sz-sx*cz, cx*cy, 0.0, 0.0, 0.0, 0.0, 1.0 ); as this also avoided the quaternion conversions embedded in DOFTransform's use of osg::Matrix::rotate(-getCurrentHPR()[0], 0.0, 0.0, 1.0) We got a 2-4x reduction in time spend in DOFTransform, from profiling, so it seemed like a good idea. David
_______________________________________________ osg-users mailing list [email protected] http://openscenegraph.net/mailman/listinfo/osg-users http://www.openscenegraph.org/
