From dea5eec44077c76bce96025118834dc15ef5badc Mon Sep 17 00:00:00 2001 From: curt Date: Fri, 16 Oct 1998 00:51:46 +0000 Subject: [PATCH] Converted to Point3D class. --- Astro/sky.cxx | 11 ++++++++--- Astro/stars.cxx | 19 ++++++++----------- 2 files changed, 16 insertions(+), 14 deletions(-) diff --git a/Astro/sky.cxx b/Astro/sky.cxx index 019447d2..414d9bad 100644 --- a/Astro/sky.cxx +++ b/Astro/sky.cxx @@ -291,7 +291,9 @@ void fgSkyRender( void ) { xglPushMatrix(); /* Translate to view position */ - xglTranslatef( v->cur_zero_elev.x, v->cur_zero_elev.y, v->cur_zero_elev.z ); + xglTranslatef( v->cur_zero_elev.x(), + v->cur_zero_elev.y(), + v->cur_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 ); */ @@ -368,9 +370,12 @@ void fgSkyRender( void ) { /* $Log$ -/* Revision 1.10 1998/08/29 13:07:16 curt -/* Rewrite of event manager thanks to Bernie Bright. +/* Revision 1.11 1998/10/16 00:52:19 curt +/* Converted to Point3D class. /* + * Revision 1.10 1998/08/29 13:07:16 curt + * Rewrite of event manager thanks to Bernie Bright. + * * Revision 1.9 1998/08/22 01:18:59 curt * Minor tweaks to avoid using unitialized memory. * diff --git a/Astro/stars.cxx b/Astro/stars.cxx index 31617488..87bf8c51 100644 --- a/Astro/stars.cxx +++ b/Astro/stars.cxx @@ -43,7 +43,6 @@ #include #include #include -#include #include #include
#include
@@ -63,7 +62,7 @@ static GLint stars[FG_STAR_LEVELS]; // Initialize the Star Management Subsystem int fgStarsInit( void ) { - fgPoint3d starlist[FG_MAX_STARS]; + Point3D starlist[FG_MAX_STARS]; // struct CelestialCoord pltPos; double right_ascension, declination, magnitude; double min_magnitude[FG_STAR_LEVELS]; @@ -97,13 +96,8 @@ int fgStarsInit( void ) { { in.eat_comments(); string name; - char c = 0; getline( in.stream(), name, ',' ); - in.stream() >> starlist[starcount].x >> c; - in.stream() >> starlist[starcount].y >> c; - // in.stream() >> starlist[starcount].x; in.get(c); - // in.stream() >> starlist[starcount].y; in.get(c); - in.stream() >> starlist[starcount].z; + in.stream() >> starlist[starcount]; ++starcount; } @@ -130,12 +124,12 @@ int fgStarsInit( void ) { count = 0; for ( j = 0; j < starcount; j++ ) { - magnitude = starlist[j].z; + magnitude = starlist[j].z(); // printf("magnitude = %.2f\n", magnitude); if ( magnitude < min_magnitude[i] ) { - right_ascension = starlist[j].x; - declination = starlist[j].y; + right_ascension = starlist[j].x(); + declination = starlist[j].y(); count++; @@ -258,6 +252,9 @@ void fgStarsRender( void ) { // $Log$ +// Revision 1.18 1998/10/16 00:52:20 curt +// Converted to Point3D class. +// // Revision 1.17 1998/09/24 15:36:19 curt // Converted to c++ style comments. //