Hi Majtaba, I'll distill down your descriptions to so we can start working towards more appropriate naming.
On Tue, May 19, 2009 at 3:24 PM, Mojtaba Fathi <[email protected]> wrote: > The first one is MODE_3D, which is the default rotation mode. In this mode, > user can use mouse to rotate scene around the center freely. Horizontal > movement of mouse changes the azimuth angle and vertical movement changes the > zenith angle. So in this rotation mode you can alter AZIMUTH and ZENITH (or HEADING and ELEVATION) > The second mode is MODE_3D_HORIZONTAL. In this mode, it is only possible to > change the value of azimuth angle, so vertical movement of mouse has no > effect and zenith angle remains unchanged. Rotation is just AZIMUTH/HEADING. ZENITH is fixed, but can take any value > The third mode is MODE_3D_VERTICAL. In this mode, it is only possible to > change the value of zenith angle, so horizontal movement of mouse has no > effect and azimuth angle remains unchanged. Rotation is just ZENITH/ELEVATION. > The fourth mode is MODE_2D. In this mode, we watch the scene towards the -Z > direction. So the zenith angle is always zero and it is only possible to > change the value of azimuth angle. In this mode rotating mouse around the > center of view changes zimuth angle. Same as AZIMUTH/HEADING only rotation, except zenith is 0. MAP_View perhaps? In terms of prior art the osgGA::TerrrainManipulator has the RotationMode enum value of: ELEVATION_AZIM_ROLL, ELEVATION_AZIM Which in keeping with this should ZENITH become ELEVATION? If so should SphericalManipualtor use Elevation rather than Zenith? Elevation is typically measure up from the horizontal axis, which Zenith is measure down from the up axis. TerrainManipulator doesn't have an explicit Elevation or Zenith variable so it's enum doesn't need to match any internal variable or other methods. For SphericalManipualor there is a direct mapping. The possible new SphericalManipualtor::RotationMode naming might be: enum RotationMode { ZENITH_AZIM (replaces MODE_3D) AZIM (replaces MODE_3D_HORIZONTAL) ZENITH (replaces MODE_3D_VERTICAL) MAP(replaces MODE_2D) } Or enum RotationMode { ELEVATION_HEADING (replaces MODE_3D) HEADING (replaces MODE_3D_HORIZONTAL) ELEVATION (replaces MODE_3D_VERTICAL) MAP(replaces MODE_2D) } In hindsight mixing of ELEVATION and AZIM in TerrainManipuilator is not ideal, personally I find ELEVATION and HEADING more human readable/relatable than AZIMUTH and ZENITH which are do require a bit more knowledge about spherical coordinates. We could always add an extra enum value with TerrainManipulator if we do decide to settle upon a certain consistent naming. Robert. _______________________________________________ osg-submissions mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org
