X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=src%2FMain%2Fviewer.hxx;h=7005e661ff6b029f44e08a70b48855a058d4b872;hb=571f7301f2b0b493f90769baa0728f82fa8ea731;hp=455f8f1fd4fd9f9b7bd10b28d9aee612f7057ec1;hpb=2fa160d41a92b3ca1b574d3cb39dc7a823fc89dd;p=flightgear.git diff --git a/src/Main/viewer.hxx b/src/Main/viewer.hxx index 455f8f1fd..7005e661f 100644 --- a/src/Main/viewer.hxx +++ b/src/Main/viewer.hxx @@ -25,12 +25,7 @@ #ifndef _VIEWER_HXX -#define _VIEWER_HXX - - -#ifndef __cplusplus -# error This library requires C++ -#endif +#define _VIEWER_HXX namespace flightgear { @@ -103,13 +98,9 @@ public: // pilot view, model in model view). // FIXME: the model view position (ie target positions) // should be in the model class. - virtual double getLongitude_deg () const { return _position.getLongitudeDeg(); } - virtual double getLatitude_deg () const { return _position.getLatitudeDeg(); } - virtual void setPosition (double lon_deg, double lat_deg, double alt_ft); const SGGeod& getPosition() const { return _position; } - // Reference geodetic target position... virtual void setTargetPosition (double lon_deg, double lat_deg, double alt_ft); const SGGeod& getTargetPosition() const { return _target; } @@ -128,6 +119,7 @@ public: // orientation rotations listed below. This has the effect of the // eye moving around and "looking at" the object (model) from // different angles. + virtual SGVec3d getOffset_m () const { return _offset_m; } virtual double getXOffset_m () const { return _offset_m.x(); } virtual double getYOffset_m () const { return _offset_m.y(); } virtual double getZOffset_m () const { return _offset_m.z(); } @@ -210,6 +202,7 @@ public: const SGVec3d& get_view_pos() { if ( _dirty ) { recalc(); } return _absolute_view_pos; } const SGVec3d& getViewPosition() { if ( _dirty ) { recalc(); } return _absolute_view_pos; } const SGQuatd& getViewOrientation() { if ( _dirty ) { recalc(); } return mViewOrientation; } + const SGQuatd& getViewOrientationOffset() { if ( _dirty ) { recalc(); } return mViewOffsetOr; } ////////////////////////////////////////////////////////////////////// // Part 4: View and frustrum data setters and getters @@ -256,6 +249,7 @@ private: bool _dirty; SGQuatd mViewOrientation; + SGQuatd mViewOffsetOr; SGVec3d _absolute_view_pos; SGGeod _position;