Hi Moji, I don't think this would be sufficient as the SphericalManipualtor has four states, only three of which are representable via your suggested bit mask approach. The exception would be the MAP rotation mode.
I would like to keep the RotationMode enum consistent in naming and usage between SphericalManipulator and TerrainManipulator so sticking to the current enum scheme suits this better. Robert. On Thu, May 21, 2009 at 3:58 PM, Mojtaba Fathi <[email protected]> wrote: > Hi Robert > > Maybe this is late to note, but could it be better to use code like the > following? > > //================================== > enum RotationMode > { > HEADING=1, > ELEVATION=2, > }; > int _allowedRotation; // could be any combination of RotationMode members or > 0 to lock any rotation > void setAllowedRotation(int mode) {_allowedRotation=mode;} > //================================== > > Could it be simpler to use? > > > Thank you! > > Regards, Moji > > ------------------ > Read this topic online here: > http://forum.openscenegraph.org/viewtopic.php?p=12673#12673 > > > > > > _______________________________________________ > osg-submissions mailing list > [email protected] > http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org > _______________________________________________ osg-submissions mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org
