Changed TerrainManipulator to use HEADING rather than AZIM to keep it consistent with SphericalManipulator

This commit is contained in:
Robert Osfield 2009-05-20 11:08:57 +00:00
parent cd18dc01da
commit 56c32eb131
2 changed files with 6 additions and 6 deletions

View File

@ -30,10 +30,10 @@ class OSGGA_EXPORT TerrainManipulator : public MatrixManipulator
enum RotationMode enum RotationMode
{ {
ELEVATION_AZIM_ROLL, ELEVATION_HEADING_ROLL,
ELEVATION_AZIM ELEVATION_HEADING
}; };
void setRotationMode(RotationMode mode); void setRotationMode(RotationMode mode);
RotationMode getRotationMode() const { return _rotationMode; } RotationMode getRotationMode() const { return _rotationMode; }

View File

@ -22,7 +22,7 @@ using namespace osgGA;
TerrainManipulator::TerrainManipulator() TerrainManipulator::TerrainManipulator()
{ {
_rotationMode =ELEVATION_AZIM; _rotationMode =ELEVATION_HEADING;
_distance = 1.0; _distance = 1.0;
_thrown = false; _thrown = false;
@ -380,7 +380,7 @@ bool TerrainManipulator::calcMovement()
if (buttonMask==GUIEventAdapter::LEFT_MOUSE_BUTTON) if (buttonMask==GUIEventAdapter::LEFT_MOUSE_BUTTON)
{ {
if (_rotationMode==ELEVATION_AZIM_ROLL) if (_rotationMode==ELEVATION_HEADING_ROLL)
{ {
// rotate camera. // rotate camera.
osg::Vec3 axis; osg::Vec3 axis;
@ -557,7 +557,7 @@ bool TerrainManipulator::calcMovement()
void TerrainManipulator::clampOrientation() void TerrainManipulator::clampOrientation()
{ {
if (_rotationMode==ELEVATION_AZIM) if (_rotationMode==ELEVATION_HEADING)
{ {
osg::Matrixd rotation_matrix; osg::Matrixd rotation_matrix;
rotation_matrix.makeRotate(_rotation); rotation_matrix.makeRotate(_rotation);