1 /**************************************************************************
2 * GLUTmain.c -- top level sim routines
4 * Written by Curtis Olson for OpenGL, started May 1997.
6 * Copyright (C) 1997 Curtis L. Olson - curt@infoplane.com
8 * This program is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU General Public License as
10 * published by the Free Software Foundation; either version 2 of the
11 * License, or (at your option) any later version.
13 * This program is distributed in the hope that it will be useful, but
14 * WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * General Public License for more details.
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
23 * (Log is kept at end of this file)
24 **************************************************************************/
32 #include "../XGL/xgl.h"
39 #include "../Include/constants.h"
40 #include "../Include/general.h"
42 #include "../Aircraft/aircraft.h"
43 #include "../Astro/moon.h"
44 #include "../Astro/sky.h"
45 #include "../Astro/stars.h"
46 #include "../Astro/sun.h"
47 #include "../Cockpit/cockpit.h"
48 #include "../Joystick/joystick.h"
49 #include "../Math/fg_geodesy.h"
50 #include "../Math/mat3.h"
51 #include "../Math/polar.h"
52 #include "../Scenery/mesh.h"
53 #include "../Scenery/scenery.h"
54 #include "../Scenery/tilemgr.h"
55 #include "../Time/event.h"
56 #include "../Time/fg_time.h"
57 #include "../Time/fg_timer.h"
58 #include "../Time/sunpos.h"
59 #include "../Weather/weather.h"
62 /* This is a record containing global housekeeping information */
63 struct fgGENERAL general;
66 static GLfloat win_ratio = 1.0;
67 static GLint winWidth, winHeight;
70 /* pointer to scenery structure */
71 /* static GLint scenery, runway; */
78 /* Yet another hack. This one used by the HUD code. Michele */
81 /* Yet another other hack. Used for my prototype instrument code. (Durk) */
82 int displayInstruments;
85 /**************************************************************************
86 * fgInitVisuals() -- Initialize various GL/view parameters
87 **************************************************************************/
89 static void fgInitVisuals() {
94 l = &cur_light_params;
99 /* xglDisable( GL_DITHER ); */
101 /* If enabled, normal vectors specified with glNormal are scaled
102 to unit length after transformation. See glNormal. */
103 xglEnable( GL_NORMALIZE );
105 xglEnable( GL_LIGHTING );
106 xglEnable( GL_LIGHT0 );
107 xglLightfv( GL_LIGHT0, GL_POSITION, l->sun_vec );
109 xglFogi (GL_FOG_MODE, GL_LINEAR);
110 /* xglFogf (GL_FOG_START, 1.0); */
111 xglFogf (GL_FOG_END, w->visibility);
112 /* xglFogf (GL_FOG_DENSITY, w->visibility); */
113 xglHint (GL_FOG_HINT, GL_NICEST /* GL_FASTEST */ );
117 /**************************************************************************
118 * Update the view volume, position, and orientation
119 **************************************************************************/
121 static void fgUpdateViewParams() {
127 f = ¤t_aircraft.flight;
128 l = &cur_light_params;
129 t = &cur_time_params;
132 fgViewUpdate(f, v, l);
134 if (displayInstruments)
136 xglViewport(0, (GLint)(winHeight / 2 ) , (GLint)winWidth, (GLint)winHeight / 2);
137 /* Tell GL we are about to modify the projection parameters */
138 xglMatrixMode(GL_PROJECTION);
140 gluPerspective(55.0, 2.0/win_ratio, 1.0, 100000.0);
144 xglViewport(0, 0 , (GLint)winWidth, (GLint) winHeight);
145 /* Tell GL we are about to modify the projection parameters */
146 xglMatrixMode(GL_PROJECTION);
148 gluPerspective(55.0, 1.0/win_ratio, 1.0, 100000.0);
151 xglMatrixMode(GL_MODELVIEW);
154 /* set up our view volume (default) */
155 gluLookAt(v->view_pos.x, v->view_pos.y, v->view_pos.z,
156 v->view_pos.x + v->view_forward[0],
157 v->view_pos.y + v->view_forward[1],
158 v->view_pos.z + v->view_forward[2],
159 v->view_up[0], v->view_up[1], v->view_up[2]);
161 /* lock view horizontally towards sun (testing) */
162 /* gluLookAt(v->view_pos.x, v->view_pos.y, v->view_pos.z,
163 v->view_pos.x + v->surface_to_sun[0],
164 v->view_pos.y + v->surface_to_sun[1],
165 v->view_pos.z + v->surface_to_sun[2],
166 v->view_up[0], v->view_up[1], v->view_up[2]); */
168 /* lock view horizontally towards south (testing) */
169 /* gluLookAt(v->view_pos.x, v->view_pos.y, v->view_pos.z,
170 v->view_pos.x + v->surface_south[0],
171 v->view_pos.y + v->surface_south[1],
172 v->view_pos.z + v->surface_south[2],
173 v->view_up[0], v->view_up[1], v->view_up[2]); */
175 /* set the sun position */
176 xglLightfv( GL_LIGHT0, GL_POSITION, l->sun_vec );
180 /*************************************************************************
181 * Draw a basic instrument panel
182 ************************************************************************/
183 static void fgUpdateInstrViewParams() {
184 xglViewport(0, 0 , (GLint)winWidth, (GLint)winHeight / 2);
186 xglMatrixMode(GL_PROJECTION);
190 gluOrtho2D(0, 640, 0, 480);
191 xglMatrixMode(GL_MODELVIEW);
195 xglColor3f(1.0, 1.0, 1.0);
198 xglDisable(GL_DEPTH_TEST);
199 xglDisable(GL_LIGHTING);
202 xglColor3f (0.5, 0.5, 0.5);
205 xglVertex2f(0.0, 0.00);
206 xglVertex2f(0.0, 480.0);
207 xglVertex2f(640.0,480.0);
208 xglVertex2f(640.0, 0.0);
211 xglRectf(0.0,0.0, 640, 480);
212 xglEnable(GL_DEPTH_TEST);
213 xglEnable(GL_LIGHTING);
214 xglMatrixMode(GL_PROJECTION);
216 xglMatrixMode(GL_MODELVIEW);
221 /**************************************************************************
222 * Update all Visuals (redraws anything graphics related)
223 **************************************************************************/
225 static void fgRenderFrame( void ) {
230 GLfloat white[4] = { 1.0, 1.0, 1.0, 1.0 };
232 l = &cur_light_params;
233 t = &cur_time_params;
236 /* update view volume parameters */
237 fgUpdateViewParams();
239 xglClear( GL_DEPTH_BUFFER_BIT /* | GL_COLOR_BUFFER_BIT */ );
241 /* Tell GL we are switching to model view parameters */
242 xglMatrixMode(GL_MODELVIEW);
243 /* xglLoadIdentity(); */
246 xglDisable( GL_DEPTH_TEST );
247 xglDisable( GL_LIGHTING );
248 xglDisable( GL_CULL_FACE );
249 xglDisable( GL_FOG );
250 xglShadeModel( GL_SMOOTH );
253 /* setup transformation for drawing astronomical objects */
255 /* Translate to view position */
256 xglTranslatef( v->view_pos.x, v->view_pos.y, v->view_pos.z );
257 /* Rotate based on gst (side real time) */
258 angle = t->gst * 15.041085; /* should be 15.041085, Curt thought it was 15*/
259 /* printf("Rotating astro objects by %.2f degrees\n",angle); */
260 xglRotatef( angle, 0.0, 0.0, -1.0 );
262 /* draw stars and planets */
268 /* render the moon */
269 xglEnable( GL_LIGHTING );
270 /* set lighting parameters */
271 xglLightfv(GL_LIGHT0, GL_AMBIENT, white );
272 xglLightfv(GL_LIGHT0, GL_DIFFUSE, white );
273 xglEnable( GL_CULL_FACE );
279 xglShadeModel( GL_SMOOTH );
280 xglEnable( GL_DEPTH_TEST );
282 xglFogfv (GL_FOG_COLOR, l->fog_color);
283 /* set lighting parameters */
284 xglLightfv(GL_LIGHT0, GL_AMBIENT, l->scene_ambient );
285 xglLightfv(GL_LIGHT0, GL_DIFFUSE, l->scene_diffuse );
287 /* fgSceneryRender(); */
294 /* display instruments */
295 if (displayInstruments) {
296 fgUpdateInstrViewParams();
305 /**************************************************************************
306 * Update internal time dependent calculations (i.e. flight model)
307 **************************************************************************/
309 void fgUpdateTimeDepCalcs(int multi_loop) {
315 f = ¤t_aircraft.flight;
316 t = &cur_time_params;
319 /* update the flight model */
320 if ( multi_loop < 0 ) {
321 multi_loop = DEFAULT_MULTILOOP;
324 /* printf("updating flight model x %d\n", multi_loop); */
325 fgFlightModelUpdate(FG_LARCSIM, f, multi_loop);
327 /* update the view angle */
328 for ( i = 0; i < multi_loop; i++ ) {
329 if ( fabs(v->goal_view_offset - v->view_offset) < 0.05 ) {
330 v->view_offset = v->goal_view_offset;
333 /* move v->view_offset towards v->goal_view_offset */
334 if ( v->goal_view_offset > v->view_offset ) {
335 if ( v->goal_view_offset - v->view_offset < FG_PI ) {
336 v->view_offset += 0.01;
338 v->view_offset -= 0.01;
341 if ( v->view_offset - v->goal_view_offset < FG_PI ) {
342 v->view_offset -= 0.01;
344 v->view_offset += 0.01;
347 if ( v->view_offset > FG_2PI ) {
348 v->view_offset -= FG_2PI;
349 } else if ( v->view_offset < 0 ) {
350 v->view_offset += FG_2PI;
357 void fgInitTimeDepCalcs() {
358 /* initialize timer */
361 fgTimerInit( 1.0 / DEFAULT_TIMER_HZ, fgUpdateTimeDepCalcs );
367 /**************************************************************************
368 * Scenery management routines
369 **************************************************************************/
371 /* static void fgSceneryInit_OLD() { */
373 /* scenery = fgSceneryCompile_OLD();
374 runway = fgRunwayHack_OLD(0.69, 53.07);
378 /* create the scenery */
379 /* GLint fgSceneryCompile_OLD() {
382 scenery = mesh2GL(mesh_ptr_OLD);
388 /* hack in a runway */
389 /* GLint fgRunwayHack_OLD(double width, double length) {
390 static GLfloat concrete[4] = { 0.5, 0.5, 0.5, 1.0 };
391 static GLfloat line[4] = { 0.9, 0.9, 0.9, 1.0 };
394 float line_len, line_width_2, cur_pos;
396 runway = xglGenLists(1);
397 xglNewList(runway, GL_COMPILE);
400 /* xglBegin(GL_POLYGON);
401 xglMaterialfv( GL_FRONT, GL_AMBIENT_AND_DIFFUSE, concrete );
402 xglNormal3f(0.0, 0.0, 1.0);
404 xglVertex3d( 0.0, -width/2.0, 0.0);
405 xglVertex3d( 0.0, width/2.0, 0.0);
406 xglVertex3d(length, width/2.0, 0.0);
407 xglVertex3d(length, -width/2.0, 0.0);
410 /* draw center line */
411 /* xglMaterialfv( GL_FRONT, GL_AMBIENT_AND_DIFFUSE, line );
412 line_len = length / ( 2 * num_lines + 1);
413 printf("line_len = %.3f\n", line_len);
416 for ( i = 0; i < num_lines; i++ ) {
417 xglBegin(GL_POLYGON);
418 xglVertex3d( cur_pos, -line_width_2, 0.005);
419 xglVertex3d( cur_pos, line_width_2, 0.005);
421 xglVertex3d( cur_pos, line_width_2, 0.005);
422 xglVertex3d( cur_pos, -line_width_2, 0.005);
433 /* draw the scenery */
434 /*static void fgSceneryDraw_OLD() {
435 static float z = 32.35;
439 xglCallList(scenery);
441 printf("*** Drawing runway at %.2f\n", z);
443 xglTranslatef( -398391.28, 120070.41, 32.35);
444 xglRotatef(170.0, 0.0, 0.0, 1.0);
452 /* What should we do when we have nothing else to do? How about get
453 * ready for the next move and update the display? */
454 static void fgMainLoop( void ) {
455 static int remainder = 0;
456 int elapsed, multi_loop;
460 struct fgAIRCRAFT *a;
464 printf("Running Main Loop\n");
465 printf("======= ==== ====\n");
467 a = ¤t_aircraft;
469 t = &cur_time_params;
475 /* fgJoystickRead( &joy_x, &joy_y, &joy_b1, &joy_b2 );
476 printf( "Joystick X %f Y %f B1 %d B2 %d\n",
477 joy_x, joy_y, joy_b1, joy_b2 );
479 fgAileronSet( joy_x ); */
481 /* Calculate model iterations needed */
482 elapsed = fgGetTimeInterval();
483 printf("Time interval is = %d, previous remainder is = %d\n", elapsed,
485 printf("--> Frame rate is = %.2f\n", 1000.0 / (float)elapsed);
486 elapsed += remainder;
488 multi_loop = ((float)elapsed * 0.001) * DEFAULT_MODEL_HZ;
489 remainder = elapsed - ((multi_loop*1000) / DEFAULT_MODEL_HZ);
490 printf("Model iterations needed = %d, new remainder = %d\n", multi_loop,
493 /* Run flight model */
494 if ( ! use_signals ) {
496 fgUpdateTimeDepCalcs(multi_loop);
499 /* I'm just sticking this here for now, it should probably move
501 cur_elev = mesh_altitude(FG_Longitude * RAD_TO_ARCSEC,
502 FG_Latitude * RAD_TO_ARCSEC);
503 /* printf("Ground elevation is %.2f meters here.\n", cur_elev); */
504 /* FG_Runway_altitude = cur_elev * METER_TO_FEET; */
506 if ( FG_Altitude * FEET_TO_METER < cur_elev + 3.758099) {
507 /* set this here, otherwise if we set runway height above our
508 current height we get a really nasty bounce. */
509 FG_Runway_altitude = FG_Altitude - 3.758099;
511 /* now set aircraft altitude above ground */
512 FG_Altitude = cur_elev * METER_TO_FEET + 3.758099;
513 printf("<*> resetting altitude to %.0f meters\n",
514 FG_Altitude * FEET_TO_METER);
517 /* fgAircraftOutputCurrent(a); */
519 /* see if we need to load any new scenery tiles */
520 /* fgTileMgrUpdate(); */
522 /* Process/manage pending events */
532 /**************************************************************************
533 * Handle new window size or exposure
534 **************************************************************************/
536 static void fgReshape( int width, int height ) {
537 /* Do this so we can call fgReshape(0,0) ourselves without having to know
538 * what the values of width & height are. */
539 if ( (height > 0) && (width > 0) ) {
540 win_ratio = (GLfloat) height / (GLfloat) width;
546 /* Inform gl of our view window size (now handled elsewhere) */
547 /* xglViewport(0, 0, (GLint)width, (GLint)height); */
549 fgUpdateViewParams();
551 /* xglClear( GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT ); */
555 /**************************************************************************
557 **************************************************************************/
559 int main( int argc, char *argv[] ) {
562 f = ¤t_aircraft.flight;
564 printf("Flight Gear: Version %s\n\n", VERSION);
566 /**********************************************************************
567 * Initialize the Window/Graphics environment.
568 **********************************************************************/
571 /* initialize GLUT */
572 xglutInit(&argc, argv);
574 /* Define Display Parameters */
575 xglutInitDisplayMode( GLUT_RGB | GLUT_DEPTH | GLUT_DOUBLE );
577 /* Define initial window size */
578 xglutInitWindowSize(640, 480);
580 /* Initialize windows */
581 xglutCreateWindow("Flight Gear");
584 /* This is the general house keeping init routine */
587 /* This is the top level init routine which calls all the other
588 * subsystem initialization routines. If you are adding a
589 * subsystem to flight gear, its initialization call should
590 * located in this routine.*/
593 /* setup view parameters, only makes GL calls */
597 /* init timer routines, signals, etc. Arrange for an alarm
598 signal to be generated, etc. */
599 fgInitTimeDepCalcs();
602 /**********************************************************************
603 * Initialize the Event Handlers.
604 **********************************************************************/
607 /* call fgReshape() on window resizes */
608 xglutReshapeFunc( fgReshape );
610 /* call key() on keyboard event */
611 xglutKeyboardFunc( GLUTkey );
612 glutSpecialFunc( GLUTspecialkey );
614 /* call fgMainLoop() whenever there is nothing else to do */
615 xglutIdleFunc( fgMainLoop );
618 xglutDisplayFunc( fgRenderFrame );
620 /* pass control off to the GLUT event handler */
630 int printf (const char *format, ...) {
636 /* Revision 1.47 1998/01/13 00:23:08 curt
637 /* Initial changes to support loading and management of scenery tiles. Note,
638 /* there's still a fair amount of work left to be done.
640 * Revision 1.46 1998/01/08 02:22:06 curt
641 * Beginning to integrate Tile management subsystem.
643 * Revision 1.45 1998/01/07 03:18:55 curt
644 * Moved astronomical stuff from .../Src/Scenery to .../Src/Astro/
646 * Revision 1.44 1997/12/30 22:22:31 curt
647 * Further integration of event manager.
649 * Revision 1.43 1997/12/30 20:47:43 curt
650 * Integrated new event manager with subsystem initializations.
652 * Revision 1.42 1997/12/30 16:36:47 curt
653 * Merged in Durk's changes ...
655 * Revision 1.41 1997/12/30 13:06:56 curt
656 * A couple lighting tweaks ...
658 * Revision 1.40 1997/12/30 01:38:37 curt
659 * Switched back to per vertex normals and smooth shading for terrain.
661 * Revision 1.39 1997/12/22 23:45:45 curt
662 * First stab at sunset/sunrise sky glow effects.
664 * Revision 1.38 1997/12/22 04:14:28 curt
665 * Aligned sky with sun so dusk/dawn effects can be correct relative to the sun.
667 * Revision 1.37 1997/12/19 23:34:03 curt
668 * Lot's of tweaking with sky rendering and lighting.
670 * Revision 1.36 1997/12/19 16:44:57 curt
671 * Working on scene rendering order and options.
673 * Revision 1.35 1997/12/18 23:32:32 curt
674 * First stab at sky dome actually starting to look reasonable. :-)
676 * Revision 1.34 1997/12/17 23:13:34 curt
677 * Began working on rendering a sky.
679 * Revision 1.33 1997/12/15 23:54:45 curt
680 * Add xgl wrappers for debugging.
681 * Generate terrain normals on the fly.
683 * Revision 1.32 1997/12/15 20:59:08 curt
686 * Revision 1.31 1997/12/12 21:41:25 curt
687 * More light/material property tweaking ... still a ways off.
689 * Revision 1.30 1997/12/12 19:52:47 curt
690 * Working on lightling and material properties.
692 * Revision 1.29 1997/12/11 04:43:54 curt
693 * Fixed sun vector and lighting problems. I thing the moon is now lit
696 * Revision 1.28 1997/12/10 22:37:45 curt
697 * Prepended "fg" on the name of all global structures that didn't have it yet.
698 * i.e. "struct WEATHER {}" became "struct fgWEATHER {}"
700 * Revision 1.27 1997/12/09 05:11:54 curt
701 * Working on tweaking lighting.
703 * Revision 1.26 1997/12/09 04:25:29 curt
704 * Working on adding a global lighting params structure.
706 * Revision 1.25 1997/12/08 22:54:09 curt
707 * Enabled GL_CULL_FACE.
709 * Revision 1.24 1997/11/25 19:25:32 curt
710 * Changes to integrate Durk's moon/sun code updates + clean up.
712 * Revision 1.23 1997/11/15 18:16:34 curt
715 * Revision 1.22 1997/10/30 12:38:41 curt
716 * Working on new scenery subsystem.
718 * Revision 1.21 1997/09/23 00:29:38 curt
719 * Tweaks to get things to compile with gcc-win32.
721 * Revision 1.20 1997/09/22 14:44:19 curt
722 * Continuing to try to align stars correctly.
724 * Revision 1.19 1997/09/18 16:20:08 curt
725 * At dusk/dawn add/remove stars in stages.
727 * Revision 1.18 1997/09/16 22:14:51 curt
728 * Tweaked time of day lighting equations. Don't draw stars during the day.
730 * Revision 1.17 1997/09/16 15:50:29 curt
731 * Working on star alignment and time issues.
733 * Revision 1.16 1997/09/13 02:00:06 curt
734 * Mostly working on stars and generating sidereal time for accurate star
737 * Revision 1.15 1997/09/05 14:17:27 curt
738 * More tweaking with stars.
740 * Revision 1.14 1997/09/05 01:35:53 curt
741 * Working on getting stars right.
743 * Revision 1.13 1997/09/04 02:17:34 curt
746 * Revision 1.12 1997/08/27 21:32:24 curt
747 * Restructured view calculation code. Added stars.
749 * Revision 1.11 1997/08/27 03:30:16 curt
750 * Changed naming scheme of basic shared structures.
752 * Revision 1.10 1997/08/25 20:27:22 curt
753 * Merged in initial HUD and Joystick code.
755 * Revision 1.9 1997/08/22 21:34:39 curt
756 * Doing a bit of reorganizing and house cleaning.
758 * Revision 1.8 1997/08/19 23:55:03 curt
759 * Worked on better simulating real lighting.
761 * Revision 1.7 1997/08/16 12:22:38 curt
762 * Working on improving the lighting/shading.
764 * Revision 1.6 1997/08/13 20:24:56 curt
765 * Changes due to changing sunpos interface.
767 * Revision 1.5 1997/08/06 21:08:32 curt
768 * Sun position now *really* works (I think) ... I still have sun time warping
769 * code in place, probably should remove it soon.
771 * Revision 1.4 1997/08/06 15:41:26 curt
772 * Working on correct sun position.
774 * Revision 1.3 1997/08/06 00:24:22 curt
775 * Working on correct real time sun lighting.
777 * Revision 1.2 1997/08/04 20:25:15 curt
778 * Organizational tweaking.
780 * Revision 1.1 1997/08/02 18:45:00 curt
781 * Renamed GLmain.c GLUTmain.c
783 * Revision 1.43 1997/08/02 16:23:47 curt
786 * Revision 1.42 1997/08/01 19:43:33 curt
787 * Making progress with coordinate system overhaul.
789 * Revision 1.41 1997/07/31 22:52:37 curt
790 * Working on redoing internal coordinate systems & scenery transformations.
792 * Revision 1.40 1997/07/30 16:12:42 curt
793 * Moved fg_random routines from Util/ to Math/
795 * Revision 1.39 1997/07/21 14:45:01 curt
798 * Revision 1.38 1997/07/19 23:04:47 curt
799 * Added an initial weather section.
801 * Revision 1.37 1997/07/19 22:34:02 curt
802 * Moved PI definitions to ../constants.h
803 * Moved random() stuff to ../Utils/ and renamed fg_random()
805 * Revision 1.36 1997/07/18 23:41:25 curt
806 * Tweaks for building with Cygnus Win32 compiler.
808 * Revision 1.35 1997/07/18 14:28:34 curt
809 * Hacked in some support for wind/turbulence.
811 * Revision 1.34 1997/07/16 20:04:48 curt
812 * Minor tweaks to aid Win32 port.
814 * Revision 1.33 1997/07/12 03:50:20 curt
815 * Added an #include <Windows32/Base.h> to help compiling for Win32
817 * Revision 1.32 1997/07/11 03:23:18 curt
818 * Solved some scenery display/orientation problems. Still have a positioning
819 * (or transformation?) problem.
821 * Revision 1.31 1997/07/11 01:29:58 curt
822 * More tweaking of terrian floor.
824 * Revision 1.30 1997/07/10 04:26:37 curt
825 * We now can interpolated ground elevation for any position in the grid. We
826 * can use this to enforce a "hard" ground. We still need to enforce some
827 * bounds checking so that we don't try to lookup data points outside the
830 * Revision 1.29 1997/07/09 21:31:12 curt
831 * Working on making the ground "hard."
833 * Revision 1.28 1997/07/08 18:20:12 curt
834 * Working on establishing a hard ground.
836 * Revision 1.27 1997/07/07 20:59:49 curt
837 * Working on scenery transformations to enable us to fly fluidly over the
838 * poles with no discontinuity/distortion in scenery.
840 * Revision 1.26 1997/07/05 20:43:34 curt
841 * renamed mat3 directory to Math so we could add other math related routines.
843 * Revision 1.25 1997/06/29 21:19:17 curt
844 * Working on scenery management system.
846 * Revision 1.24 1997/06/26 22:14:53 curt
847 * Beginning work on a scenery management system.
849 * Revision 1.23 1997/06/26 19:08:33 curt
850 * Restructuring make, adding automatic "make dep" support.
852 * Revision 1.22 1997/06/25 15:39:47 curt
853 * Minor changes to compile with rsxnt/win32.
855 * Revision 1.21 1997/06/22 21:44:41 curt
856 * Working on intergrating the VRML (subset) parser.
858 * Revision 1.20 1997/06/21 17:12:53 curt
859 * Capitalized subdirectory names.
861 * Revision 1.19 1997/06/18 04:10:31 curt
862 * A couple more runway tweaks ...
864 * Revision 1.18 1997/06/18 02:21:24 curt
867 * Revision 1.17 1997/06/17 16:51:58 curt
868 * Timer interval stuff now uses gettimeofday() instead of ftime()
870 * Revision 1.16 1997/06/17 04:19:16 curt
871 * More timer related tweaks with respect to view direction changes.
873 * Revision 1.15 1997/06/17 03:41:10 curt
874 * Nonsignal based interval timing is now working.
875 * This would be a good time to look at cleaning up the code structure a bit.
877 * Revision 1.14 1997/06/16 19:32:51 curt
878 * Starting to add general timer support.
880 * Revision 1.13 1997/06/02 03:40:06 curt
881 * A tiny bit more view tweaking.
883 * Revision 1.12 1997/06/02 03:01:38 curt
884 * Working on views (side, front, back, transitions, etc.)
886 * Revision 1.11 1997/05/31 19:16:25 curt
887 * Elevator trim added.
889 * Revision 1.10 1997/05/31 04:13:52 curt
892 * Continuing work on the LaRCsim flight model integration.
893 * Added some MSFS-like keyboard input handling.
895 * Revision 1.9 1997/05/30 19:27:01 curt
896 * The LaRCsim flight model is starting to look like it is working.
898 * Revision 1.8 1997/05/30 03:54:10 curt
899 * Made a bit more progress towards integrating the LaRCsim flight model.
901 * Revision 1.7 1997/05/29 22:39:49 curt
902 * Working on incorporating the LaRCsim flight model.
904 * Revision 1.6 1997/05/29 12:31:39 curt
905 * Minor tweaks, moving towards general flight model integration.
907 * Revision 1.5 1997/05/29 02:33:23 curt
908 * Updated to reflect changing interfaces in other "modules."
910 * Revision 1.4 1997/05/27 17:44:31 curt
911 * Renamed & rearranged variables and routines. Added some initial simple
912 * timer/alarm routines so the flight model can be updated on a regular
915 * Revision 1.3 1997/05/23 15:40:25 curt
916 * Added GNU copyright headers.
919 * Revision 1.2 1997/05/23 00:35:12 curt
920 * Trying to get fog to work ...
922 * Revision 1.1 1997/05/21 15:57:51 curt
923 * Renamed due to added GLUT support.
925 * Revision 1.3 1997/05/19 18:22:42 curt
926 * Parameter tweaking ... starting to stub in fog support.
928 * Revision 1.2 1997/05/17 00:17:34 curt
929 * Trying to stub in support for standard OpenGL.
931 * Revision 1.1 1997/05/16 16:05:52 curt