f = ¤t_aircraft.flight;
- printf("Flight Gear: prototype code to test OpenGL, LaRCsim, and VRML\n\n");
+ printf("Flight Gear: prototype code to test OpenGL, LaRCsim, and VRML\n\n");
+
+
+ /**********************************************************************
+ * Initialize the Window/Graphics environment.
+ **********************************************************************/
#ifdef GLUT
/* initialize GLUT */
/* setup view parameters, only makes GL calls */
fgInitVisuals();
+
+ /****************************************************************
+ * The following section sets up the flight model EOM parameters and
+ * should really be read in from one or more files.
+ ****************************************************************/
+
/* Globe Aiport, AZ */
FG_Runway_altitude = 3234.5;
FG_Runway_latitude = 120070.41;
printf("Initial position is: (%.4f, %.4f, %.2f)\n", FG_Latitude,
FG_Longitude, FG_Altitude);
-
- /* Initial Velocity */
+ /* Initial Velocity */
FG_V_north = 0.0 /* 7.287719E+00 */;
FG_V_east = 0.0 /* 1.521770E+03 */;
FG_V_down = 0.0 /* -1.265722E-05 */;
/* fgSlewInit(-335340,162540, 15, 4.38); */
/* fgSlewInit(-398673.28,120625.64, 53, 4.38); */
+ /* Initialize the flight model data structures base on above values */
fgFlightModelInit( FG_LARCSIM, f, 1.0 / DEFAULT_MODEL_HZ );
if ( use_signals ) {
fgInitTimeDepCalcs();
}
- /* build all objects */
- /* parse the scenery file, and build the OpenGL call list */
- /* this function will eventually move to the scenery management system */
- if ( strlen(argv[1]) ) {
- parse_scenery(argv[1]);
- }
+ /**********************************************************************
+ * The following section (and the functions elsewhere in this file)
+ * set up the scenery management system. This part is a big hack,
+ * and needs to be moved to it's own area.
+ **********************************************************************/
- /* initialize the scenery */
+ /* Initialize the Scenery Management system */
fgSceneryInit();
+ /* Tell the Scenery Management system where we are so it can load
+ * the correct scenery data */
+ fgSceneryUpdate(FG_Latitude, FG_Longitude, FG_Altitude);
+
+
+ /**********************************************************************
+ * Initialize the Event Handlers.
+ **********************************************************************/
+
#ifdef GLUT
/* call fgReshape() on window resizes */
glutReshapeFunc( fgReshape );
/* $Log$
-/* Revision 1.23 1997/06/26 19:08:33 curt
-/* Restructuring make, adding automatic "make dep" support.
+/* Revision 1.24 1997/06/26 22:14:53 curt
+/* Beginning work on a scenery management system.
/*
+ * Revision 1.23 1997/06/26 19:08:33 curt
+ * Restructuring make, adding automatic "make dep" support.
+ *
* Revision 1.22 1997/06/25 15:39:47 curt
* Minor changes to compile with rsxnt/win32.
*
/**************************************************************************
- * scenery.h -- data structures and routines for processing terrain meshes
+ * scenery.h -- data structures and routines for managing scenery.
*
* Written by Curtis Olson, started May 1997.
*
#define SCENERY_H
-/* parse a scenery file */
-int parse_scenery(char *file);
+/* Initialize the Scenery Management system */
+void fgSceneryInit();
+
+/* Tell the scenery manager where we are so it can load the proper data, and
+ * build the proper structures. */
+void fgSceneryUpdate(double lon, double lat, double elev);
+
+/* Render out the current scene */
+void fgSceneryRender();
#endif SCENERY_H
/* $Log$
-/* Revision 1.4 1997/06/21 17:57:21 curt
-/* directory shuffling ...
+/* Revision 1.5 1997/06/26 22:14:57 curt
+/* Beginning work on a scenery management system.
/*
+ * Revision 1.4 1997/06/21 17:57:21 curt
+ * directory shuffling ...
+ *
* Revision 1.2 1997/05/23 15:40:43 curt
* Added GNU copyright headers.
*