]> git.mxchange.org Git - flightgear.git/blobdiff - src/Main/viewer_rph.cxx
Fixed a problem with autodetecting if we need to draw our own mouse cursor
[flightgear.git] / src / Main / viewer_rph.cxx
index 503c2de465c4d964c8e6ab09dbccea611b3821d8..53128e7ff1387b5cc939d6c15663bc194c97b858 100644 (file)
@@ -46,6 +46,7 @@
 // Constructor
 FGViewerRPH::FGViewerRPH( void )
 {
+    set_reverse_view_offset(false);
 #ifndef USE_FAST_VIEWROT
     // This never changes -- NHV
     LARC_TO_SSG[0][0] = 0.0; 
@@ -176,12 +177,12 @@ void FGViewerRPH::update() {
     tmp = sgPolarToCart3d(p);
     sgdSetVec3( abs_view_pos, tmp[0], tmp[1], tmp[2] );
 
+    // view_pos = abs_view_pos - scenery.center;
     sgdVec3 sc;
     sgdSetVec3( sc, scenery.center.x(), scenery.center.y(), scenery.center.z());
     sgdVec3 vp;
     sgdSubVec3( vp, abs_view_pos, sc );
     sgSetVec3( view_pos, vp );
-    // view_pos = abs_view_pos - scenery.center;
 
     FG_LOG( FG_VIEW, FG_DEBUG, "sea level radius = " << sea_level_radius );
     FG_LOG( FG_VIEW, FG_DEBUG, "Polar view pos = " << p );
@@ -189,7 +190,7 @@ void FGViewerRPH::update() {
            << abs_view_pos[0] << ","
            << abs_view_pos[1] << ","
            << abs_view_pos[2] );
-    FG_LOG( FG_VIEW, FG_DEBUG, "Relative view pos = "
+    FG_LOG( FG_VIEW, FG_DEBUG, "(RPH) Relative view pos = "
            << view_pos[0] << "," << view_pos[1] << "," << view_pos[2] );
 
     // code to calculate LOCAL matrix calculated from Phi, Theta, and
@@ -275,8 +276,9 @@ void FGViewerRPH::update() {
     // cout << "VIEW_OFFSET matrix" << endl;
     // print_sgMat4( VIEW_OFFSET );
     sgXformVec3( view_forward, forward, VIEW_OFFSET );
-    // cout << "view_forward = " << view_forward[0] << ","
-    //      << view_forward[1] << "," << view_forward[2] << endl;
+    FG_LOG( FG_VIEW, FG_DEBUG, "(RPH) view forward = "
+           << view_forward[0] << "," << view_forward[1] << ","
+           << view_forward[2] );
        
     // VIEW_ROT = LARC_TO_SSG * ( VIEWo * VIEW_OFFSET )
 #ifdef USE_FAST_VIEWROT
@@ -302,8 +304,8 @@ void FGViewerRPH::update() {
     // THIS IS THE EXPERIMENTAL VIEWING ANGLE SHIFTER
     // THE MAJORITY OF THE WORK IS DONE IN GUI.CXX
     // this in gui.cxx for now just testing
-    extern float quat_mat[4][4];
-    sgPreMultMat4( VIEW, quat_mat);
+    extern float GuiQuat_mat[4][4];
+    sgPreMultMat4( VIEW, GuiQuat_mat);
     // !!!!!!!!!! testing      
 
     // Given a vector pointing straight down (-Z), map into onto the