From: curt Date: Wed, 9 Dec 1998 18:50:12 +0000 (+0000) Subject: Converted "class fgVIEW" to "class FGView" and updated to make data X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=2487e696b80356f4459f0242d38cc54904b1104c;p=simgear.git Converted "class fgVIEW" to "class FGView" and updated to make data members private and make required accessor functions. --- diff --git a/Astro/sky.cxx b/Astro/sky.cxx index 433ec7ed..2920e874 100644 --- a/Astro/sky.cxx +++ b/Astro/sky.cxx @@ -257,7 +257,6 @@ void fgSkyInit( void ) { void fgSkyRender( void ) { FGState *f; fgLIGHT *l; - fgVIEW *v; float inner_color[4]; float middle_color[4]; float outer_color[4]; @@ -266,7 +265,6 @@ void fgSkyRender( void ) { f = current_aircraft.fdm_state; l = &cur_light_params; - v = ¤t_view; // printf("Rendering the sky.\n"); @@ -286,11 +284,10 @@ void fgSkyRender( void ) { xglPushMatrix(); // Translate to view position - xglTranslatef( v->cur_zero_elev.x(), - v->cur_zero_elev.y(), - v->cur_zero_elev.z() ); + Point3D zero_elev = current_view.get_cur_zero_elev(); + xglTranslatef( zero_elev.x(), zero_elev.y(), zero_elev.z() ); // printf(" Translated to %.2f %.2f %.2f\n", - // v->cur_zero_elev.x, v->cur_zero_elev.y, v->cur_zero_elev.z ); + // zero_elev.x, zero_elev.y, zero_elev.z ); // Rotate to proper orientation // printf(" lon = %.2f lat = %.2f\n", FG_Longitude * RAD_TO_DEG, @@ -365,6 +362,10 @@ void fgSkyRender( void ) { // $Log$ +// Revision 1.17 1998/12/09 18:50:12 curt +// Converted "class fgVIEW" to "class FGView" and updated to make data +// members private and make required accessor functions. +// // Revision 1.16 1998/12/05 15:54:03 curt // Renamed class fgFLIGHT to class FGState as per request by JSB. // diff --git a/Astro/solarsystem.hxx b/Astro/solarsystem.hxx index a782b391..9706f987 100644 --- a/Astro/solarsystem.hxx +++ b/Astro/solarsystem.hxx @@ -41,12 +41,6 @@ #include "pluto.hxx" -extern fgLIGHT cur_light_params; -extern fgTIME cur_time_params; -extern fgVIEW current_view; - - - class SolarSystem { private: diff --git a/Astro/stars.cxx b/Astro/stars.cxx index 35ce9aaf..118f3395 100644 --- a/Astro/stars.cxx +++ b/Astro/stars.cxx @@ -211,7 +211,6 @@ int fgStarsInit( void ) { // Draw the Stars void fgStarsRender( void ) { FGState *f; - fgVIEW *v; fgLIGHT *l; fgTIME *t; int i; @@ -219,7 +218,6 @@ void fgStarsRender( void ) { f = current_aircraft.fdm_state; l = &cur_light_params; t = &cur_time_params; - v = ¤t_view; // FG_PI_2 + 0.1 is about 6 degrees after sundown and before sunrise @@ -256,6 +254,10 @@ void fgStarsRender( void ) { // $Log$ +// Revision 1.25 1998/12/09 18:50:15 curt +// Converted "class fgVIEW" to "class FGView" and updated to make data +// members private and make required accessor functions. +// // Revision 1.24 1998/12/05 15:54:04 curt // Renamed class fgFLIGHT to class FGState as per request by JSB. //