Hello Janna,

Is there particular reason scale is hard-coded and no parameter is exposed to 
be able to modify movement scale for middle and right mouse button? Or is there 
some other way to do it?

There was a large refactoring of camera manipulators about 2 years ago. OrbitManipulator is one of the camera manipulators that were added during that process, so it's relatively recent in OSG. As such, I suspect the reason is simply the standard open-source development one: no one in the past has yet needed to change these values, so they were not exposed.

There are two options worth considering IMHO:

- The methods are virtual, you can subclass OrbitManipulator and do what you want, even add tweakable parameters with setters/getters and use them in the overridden version of the methods. - Modify the OSG sources to expose new parameters, submit the change and use that once it's integrated.

There are a few cases when I was at CM-Labs where I did both: I subclassed to get the behavior I wanted right away (and test that it really worked in our applications) while at the same time submitting a code change to OSG to do the same thing. Once the change was integrated into OSG and we had moved to this new version that included it, I could remove the subclassed version in our code to avoid having to maintain that code in our own code-base. There were more than a few cases where subsequent discussion on this list led to me refactoring or improving my change beyond what I would have done if it had stayed in our code. This kind of collaboration really benefits everyone.

Hope this helps,

J-S

--
______________________________________________________
Jean-Sebastien Guay              jean_...@videotron.ca
                    http://whitestar02.dyndns-web.com/

_______________________________________________
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to