From 56c32eb13104b77b2a92ac6d399b1970558baa07 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Wed, 20 May 2009 11:08:57 +0000 Subject: [PATCH] Changed TerrainManipulator to use HEADING rather than AZIM to keep it consistent with SphericalManipulator --- include/osgGA/TerrainManipulator | 6 +++--- src/osgGA/TerrainManipulator.cpp | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/include/osgGA/TerrainManipulator b/include/osgGA/TerrainManipulator index 6f77e0122..c64df4a74 100644 --- a/include/osgGA/TerrainManipulator +++ b/include/osgGA/TerrainManipulator @@ -30,10 +30,10 @@ class OSGGA_EXPORT TerrainManipulator : public MatrixManipulator enum RotationMode { - ELEVATION_AZIM_ROLL, - ELEVATION_AZIM + ELEVATION_HEADING_ROLL, + ELEVATION_HEADING }; - + void setRotationMode(RotationMode mode); RotationMode getRotationMode() const { return _rotationMode; } diff --git a/src/osgGA/TerrainManipulator.cpp b/src/osgGA/TerrainManipulator.cpp index 25acb7954..aaabac543 100644 --- a/src/osgGA/TerrainManipulator.cpp +++ b/src/osgGA/TerrainManipulator.cpp @@ -22,7 +22,7 @@ using namespace osgGA; TerrainManipulator::TerrainManipulator() { - _rotationMode =ELEVATION_AZIM; + _rotationMode =ELEVATION_HEADING; _distance = 1.0; _thrown = false; @@ -380,7 +380,7 @@ bool TerrainManipulator::calcMovement() if (buttonMask==GUIEventAdapter::LEFT_MOUSE_BUTTON) { - if (_rotationMode==ELEVATION_AZIM_ROLL) + if (_rotationMode==ELEVATION_HEADING_ROLL) { // rotate camera. osg::Vec3 axis; @@ -557,7 +557,7 @@ bool TerrainManipulator::calcMovement() void TerrainManipulator::clampOrientation() { - if (_rotationMode==ELEVATION_AZIM) + if (_rotationMode==ELEVATION_HEADING) { osg::Matrixd rotation_matrix; rotation_matrix.makeRotate(_rotation);