|
From: Andreas Z. <am...@gm...> - 2006-02-23 20:14:24
|
Hi Terry, > I noticed that the TrackballNavigator zooms in and out much faster on > my Windows machine than on my Linux machine. Does anybody know why, > and would this be something that is easily fixed? hmm can't believe this one it only depends on the scene size. > Also, if models are very large, it seems to take a long time to zoom > in and out of them. Is there a way to scale the zooming speed? I > spotted a setTranslationScale() function in the deprecated Trackball > class, which sounds similar to what I'm looking for. Translation in X > and Y is handled intelligently in TrackballNavigator and probably > doesn't need to be scaled in most cases, but zooming (translation in > Z) is a different story. The navigator class has a setMotionFactor() method if you use the TrackballNavigator directly you can do something like this: Real32 distance = osgSgn(toY-fromY)* 100.f * osgpow(osgabs(toY-fromY),2.f); _trackball.translateZ(distance * _rMotionFactor); and the _rMotionFactor should depend on your scene bounding box size. Andreas > -- > Terry Welsh - mogumbo 'at' gmail.com > www.reallyslick.com | www.infiscape.com | www.vrsource.org > > > ------------------------------------------------------- > This SF.Net email is sponsored by xPML, a groundbreaking scripting language > that extends applications into web and mobile media. Attend the live webcast > and join the prime developer group breaking into this new coding territory! > http://sel.as-us.falkag.net/sel?cmd=k&kid0944&bid$1720&dat1642 > _______________________________________________ > Opensg-users mailing list > Ope...@li... > https://lists.sourceforge.net/lists/listinfo/opensg-users > > |