X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FMain%2Fviewer.cxx;h=8dcfb982dbf5f4913eb0c573e2d9e55019293c7d;hb=7cde2e800bccd4883f03eceb5283add24755b377;hp=2e34db687f6b62f2261c8ca57c58a56ccc6e6198;hpb=a6db6d89ff41a619569e6433409e8bf62ff98499;p=flightgear.git diff --git a/src/Main/viewer.cxx b/src/Main/viewer.cxx index 2e34db687..8dcfb982d 100644 --- a/src/Main/viewer.cxx +++ b/src/Main/viewer.cxx @@ -380,7 +380,7 @@ FGViewer::recalcLookFrom () SGQuatd hlToBody = SGQuatd::fromYawPitchRollDeg(head, pitch, roll); // The rotation offset, don't know why heading is negative here ... - SGQuatd viewOffsetOr + mViewOffsetOr = SGQuatd::fromYawPitchRollDeg(-_heading_offset_deg, _pitch_offset_deg, _roll_offset_deg); @@ -396,7 +396,7 @@ FGViewer::recalcLookFrom () SGQuatd q(-0.5, -0.5, 0.5, 0.5); _absolute_view_pos = position + (ec2body*q).backTransform(_offset_m); - mViewOrientation = ec2body*viewOffsetOr*q; + mViewOrientation = ec2body*mViewOffsetOr*q; } void @@ -437,7 +437,7 @@ FGViewer::recalcLookAt () SGQuatd geodEyeHlOr = SGQuatd::fromLonLat(_position); // the rotation offset, don't know why heading is negative here ... - SGQuatd eyeOffsetOr = + mViewOffsetOr = SGQuatd::fromYawPitchRollDeg(-_heading_offset_deg + 180, _pitch_offset_deg, _roll_offset_deg); @@ -445,7 +445,7 @@ FGViewer::recalcLookAt () SGVec3d eyeOff(-_offset_m.z(), _offset_m.x(), -_offset_m.y()); SGQuatd ec2eye = geodEyeHlOr*geodEyeOr; SGVec3d eyeCart = SGVec3d::fromGeod(_position); - eyeCart += (ec2eye*eyeOffsetOr).backTransform(eyeOff); + eyeCart += (ec2eye*mViewOffsetOr).backTransform(eyeOff); SGVec3d atCart = SGVec3d::fromGeod(_target);