Add an option to advance/decrease time from keyboard.
This commit is contained in:
+11
-8
@@ -273,6 +273,10 @@ void fgMoonInit() {
|
|||||||
moonPos.Declination);
|
moonPos.Declination);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
xMoon = 60000.0 * cos(moonPos.RightAscension) * cos(moonPos.Declination);
|
||||||
|
yMoon = 60000.0 * sin(moonPos.RightAscension) * cos(moonPos.Declination);
|
||||||
|
zMoon = 60000.0 * sin(moonPos.Declination);
|
||||||
|
|
||||||
if ( !dl_exists ) {
|
if ( !dl_exists ) {
|
||||||
dl_exists = 1;
|
dl_exists = 1;
|
||||||
|
|
||||||
@@ -285,12 +289,6 @@ void fgMoonInit() {
|
|||||||
xglMaterialfv(GL_FRONT, GL_DIFFUSE, moon_color); */
|
xglMaterialfv(GL_FRONT, GL_DIFFUSE, moon_color); */
|
||||||
|
|
||||||
|
|
||||||
xMoon = 60000.0 * cos(moonPos.RightAscension) *
|
|
||||||
cos(moonPos.Declination);
|
|
||||||
yMoon = 60000.0 * sin(moonPos.RightAscension) *
|
|
||||||
cos(moonPos.Declination);
|
|
||||||
zMoon = 60000.0 * sin(moonPos.Declination);
|
|
||||||
|
|
||||||
glutSolidSphere(1.0, 10, 10);
|
glutSolidSphere(1.0, 10, 10);
|
||||||
|
|
||||||
xglEndList();
|
xglEndList();
|
||||||
@@ -303,6 +301,8 @@ void fgMoonRender() {
|
|||||||
struct fgLIGHT *l;
|
struct fgLIGHT *l;
|
||||||
GLfloat white[4] = { 1.0, 1.0, 1.0, 1.0 };
|
GLfloat white[4] = { 1.0, 1.0, 1.0, 1.0 };
|
||||||
|
|
||||||
|
/* printf("Rendering moon\n"); */
|
||||||
|
|
||||||
l = &cur_light_params;
|
l = &cur_light_params;
|
||||||
|
|
||||||
xglMaterialfv(GL_FRONT, GL_AMBIENT, l->sky_color );
|
xglMaterialfv(GL_FRONT, GL_AMBIENT, l->sky_color );
|
||||||
@@ -319,9 +319,12 @@ void fgMoonRender() {
|
|||||||
|
|
||||||
|
|
||||||
/* $Log$
|
/* $Log$
|
||||||
/* Revision 1.14 1997/12/30 20:47:50 curt
|
/* Revision 1.15 1998/01/05 18:44:35 curt
|
||||||
/* Integrated new event manager with subsystem initializations.
|
/* Add an option to advance/decrease time from keyboard.
|
||||||
/*
|
/*
|
||||||
|
* Revision 1.14 1997/12/30 20:47:50 curt
|
||||||
|
* Integrated new event manager with subsystem initializations.
|
||||||
|
*
|
||||||
* Revision 1.13 1997/12/30 16:41:00 curt
|
* Revision 1.13 1997/12/30 16:41:00 curt
|
||||||
* Added log at end of file.
|
* Added log at end of file.
|
||||||
*
|
*
|
||||||
|
|||||||
+10
-7
@@ -106,6 +106,10 @@ void fgSunInit() {
|
|||||||
sunPos.Declination);
|
sunPos.Declination);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
xSun = 60000.0 * cos(sunPos.RightAscension) * cos(sunPos.Declination);
|
||||||
|
ySun = 60000.0 * sin(sunPos.RightAscension) * cos(sunPos.Declination);
|
||||||
|
zSun = 60000.0 * sin(sunPos.Declination);
|
||||||
|
|
||||||
if ( !dl_exists ) {
|
if ( !dl_exists ) {
|
||||||
dl_exists = 1;
|
dl_exists = 1;
|
||||||
|
|
||||||
@@ -114,10 +118,6 @@ void fgSunInit() {
|
|||||||
sun_obj = xglGenLists(1);
|
sun_obj = xglGenLists(1);
|
||||||
xglNewList(sun_obj, GL_COMPILE );
|
xglNewList(sun_obj, GL_COMPILE );
|
||||||
|
|
||||||
xSun = 60000.0 * cos(sunPos.RightAscension) * cos(sunPos.Declination);
|
|
||||||
ySun = 60000.0 * sin(sunPos.RightAscension) * cos(sunPos.Declination);
|
|
||||||
zSun = 60000.0 * sin(sunPos.Declination);
|
|
||||||
|
|
||||||
glutSolidSphere(1.0, 10, 10);
|
glutSolidSphere(1.0, 10, 10);
|
||||||
|
|
||||||
xglEndList();
|
xglEndList();
|
||||||
@@ -190,10 +190,13 @@ void fgSunRender() {
|
|||||||
|
|
||||||
|
|
||||||
/* $Log$
|
/* $Log$
|
||||||
/* Revision 1.11 1997/12/30 23:09:40 curt
|
/* Revision 1.12 1998/01/05 18:44:36 curt
|
||||||
/* Worked on winding problem without luck, so back to calling glFrontFace()
|
/* Add an option to advance/decrease time from keyboard.
|
||||||
/* 3 times for each scenery area.
|
|
||||||
/*
|
/*
|
||||||
|
* Revision 1.11 1997/12/30 23:09:40 curt
|
||||||
|
* Worked on winding problem without luck, so back to calling glFrontFace()
|
||||||
|
* 3 times for each scenery area.
|
||||||
|
*
|
||||||
* Revision 1.10 1997/12/30 20:47:54 curt
|
* Revision 1.10 1997/12/30 20:47:54 curt
|
||||||
* Integrated new event manager with subsystem initializations.
|
* Integrated new event manager with subsystem initializations.
|
||||||
*
|
*
|
||||||
|
|||||||
Reference in New Issue
Block a user