]> git.mxchange.org Git - flightgear.git/commitdiff
Removed references to Point3D from FGViewers interface.
authorcurt <curt>
Wed, 25 Oct 2000 19:46:43 +0000 (19:46 +0000)
committercurt <curt>
Wed, 25 Oct 2000 19:46:43 +0000 (19:46 +0000)
src/Main/main.cxx
src/Main/viewer.cxx
src/Main/viewer.hxx

index 7c7b798be2bb2d1b58fd9c595fd55c49e60fa857..1a372b3bf2f16a30f8ba579e82d2f81eff94458a 100644 (file)
@@ -442,12 +442,6 @@ void fgRenderFrame( void ) {
  
        // update the sky dome
        if ( globals->get_options()->get_skyblend() ) {
-           sgVec3 zero_elev;
-           sgSetVec3( zero_elev,
-                      globals->get_current_view()->get_cur_zero_elev().x(),
-                      globals->get_current_view()->get_cur_zero_elev().y(),
-                      globals->get_current_view()->get_cur_zero_elev().z() );
-
            /* cout << "thesky->repaint() sky_color = "
                 << cur_light_params.sky_color[0] << " "
                 << cur_light_params.sky_color[1] << " "
@@ -484,7 +478,7 @@ void fgRenderFrame( void ) {
                 << " moon dec = " << globals->get_ephem()->getMoonDeclination() << endl; */
 
            thesky->reposition( globals->get_current_view()->get_view_pos(),
-                               zero_elev,
+                               globals->get_current_view()->get_zero_elev(),
                                globals->get_current_view()->get_local_up(),
                                cur_fdm_state->get_Longitude(),
                                cur_fdm_state->get_Latitude(),
index 85401aa2985e4542d1e4b5a6116ef177866beaff..731a98f5299eabf0156d592c2756920ea61ebd27 100644 (file)
@@ -170,7 +170,7 @@ static void print_sgMat4( sgMat4 &in) {
 
 // Update the view parameters
 void FGViewer::update() {
-
+    Point3D tmp;
     sgVec3 minus_z, forward;
     sgMat4 VIEWo;
 
@@ -179,7 +179,8 @@ void FGViewer::update() {
                         geod_view_pos[1], 
                         sea_level_radius );
 
-    cur_zero_elev = sgPolarToCart3d(p) - scenery.center;
+    tmp = sgPolarToCart3d(p) - scenery.center;
+    sgSetVec3( zero_elev, tmp[0], tmp[1], tmp[2] );
 
     // calculate view position in current FG view coordinate system
     // p.lon & p.lat are already defined earlier, p.radius was set to
@@ -190,7 +191,7 @@ void FGViewer::update() {
        p.setz( p.radius() + scenery.cur_elev + 0.5 * METER_TO_FEET );
     }
 
-    Point3D tmp = sgPolarToCart3d(p);
+    tmp = sgPolarToCart3d(p);
     sgdSetVec3( abs_view_pos, tmp[0], tmp[1], tmp[2] );
 
     sgdVec3 sc;
index 7bfeb3b6b06b339e2a16dcc54db8ed88bb4c439f..a41c4b27b21bfe4d465577e3b6a4a302a415ffad 100644 (file)
@@ -31,7 +31,6 @@
 #endif                                   
 
 #include <simgear/compiler.h>
-#include <simgear/math/point3d.hxx>
 #include <simgear/timing/sg_time.hxx>
 
 #include <list>
@@ -87,7 +86,7 @@ private:
 
     // cartesion coordinates of current lon/lat if at sea level
     // translated to scenery.center
-    Point3D cur_zero_elev;
+    sgVec3 zero_elev;
 
     // vector in cartesian coordinates from current position to the
     // postion on the earth's surface the sun is directly over
@@ -202,9 +201,9 @@ public:
        if ( dirty ) { update(); }
        return view_pos;
     }
-    inline Point3D get_cur_zero_elev() {
+    inline float *get_zero_elev() {
        if ( dirty ) { update(); }
-       return cur_zero_elev;
+       return zero_elev;
     }
     inline float *get_surface_south() {
        if ( dirty ) { update(); }