]> git.mxchange.org Git - flightgear.git/commitdiff
Beginning work on a scenery management system.
authorcurt <curt>
Thu, 26 Jun 1997 22:14:53 +0000 (22:14 +0000)
committercurt <curt>
Thu, 26 Jun 1997 22:14:53 +0000 (22:14 +0000)
Main/GLmain.c
Main/Makefile
Scenery/Makefile
Scenery/scenery.h

index 02cbcb70850d654f503c8908dd120d3e4676e8e7..cbda0ae578aad9c430589f6cc1a630df51bc05ed 100644 (file)
@@ -420,7 +420,12 @@ int main( int argc, char *argv[] ) {
 
     f = &current_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 */
@@ -450,6 +455,12 @@ int main( int argc, char *argv[] ) {
     /* 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;
@@ -464,8 +475,7 @@ int main( int argc, char *argv[] ) {
     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 */;
@@ -499,6 +509,7 @@ int main( int argc, char *argv[] ) {
     /* 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 ) {
@@ -507,17 +518,25 @@ int main( int argc, char *argv[] ) {
        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 );
@@ -559,9 +578,12 @@ int main( int argc, char *argv[] ) {
 
 
 /* $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.
  *
index a682d7a655908e5fb4cdd86ab5b4f01fb823dd99..2abde6fc1deea8c28b6b52f087d6aa551e37b68b 100644 (file)
@@ -66,7 +66,7 @@ OFILES = $(CFILES:.c=.o)
 AFILES = ../Aircraft/libAircraft.a ../Controls/libControls.a \
        ../Flight/libFlight.a ../Flight/LaRCsim/libLaRCsim.a \
        ../Flight/Slew/libSlew.a ../mat3/libmat3.a \
-       ../Scenery/ParseScn/libParseScn.a ../Scenery/libScenery.a \
+       ../Scenery/ParseVRML/libParseVRML.a ../Scenery/libScenery.a \
        ../Timer/libTimer.a
 
 
@@ -107,6 +107,9 @@ mesh2GL.o:
 
 #---------------------------------------------------------------------------
 # $Log$
+# Revision 1.17  1997/06/26 22:14:54  curt
+# Beginning work on a scenery management system.
+#
 # Revision 1.16  1997/06/26 19:08:33  curt
 # Restructuring make, adding automatic "make dep" support.
 #
index 93cc63f2e0efc8144abf2dbf6a5e8b9198a352ca..65625edf65fca2f25d42968fe9f13f2509c0d34f 100644 (file)
@@ -26,7 +26,7 @@
 
 TARGET = libScenery.a
 
-CFILES = common.c mesh.c
+CFILES = common.c mesh.c scenery.c
 HFILES = 
 OFILES = $(CFILES:.c=.o)
 
@@ -66,9 +66,15 @@ common.o:
 mesh.o:
        $(CC) $(CFLAGS) -c mesh.c
 
+scenery.o:
+       $(CC) $(CFLAGS) -c scenery.c
+
 
 #---------------------------------------------------------------------------
 # $Log$
+# Revision 1.11  1997/06/26 22:14:57  curt
+# Beginning work on a scenery management system.
+#
 # Revision 1.10  1997/06/26 19:08:34  curt
 # Restructuring make, adding automatic "make dep" support.
 #
index a79c888cb9d843a93a122ae846b485aa2c6659d3..2acf6472fc8d12b0ed26dc97c0817d5fb09c021e 100644 (file)
@@ -1,5 +1,5 @@
 /**************************************************************************
- * 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.
  *