]> git.mxchange.org Git - flightgear.git/commitdiff
Added a view record field for absolute x, y, z position.
authorcurt <curt>
Thu, 29 Jan 1998 00:50:28 +0000 (00:50 +0000)
committercurt <curt>
Thu, 29 Jan 1998 00:50:28 +0000 (00:50 +0000)
Main/depend
Main/views.c
Main/views.h

index 3ddf5d8e34660aeb943d319900d8788ff89c1266..b6102bab21aaf75d173ea96ecd2b4d38cfac3311 100644 (file)
@@ -1,5 +1,7 @@
 GLUTkey.o: GLUTkey.c
 GLUTmain.o: GLUTmain.c
+fg_configvars.o: fg_configvars.c
+fg_debug.o: fg_debug.c
 fg_init.o: fg_init.c
 probdemo.o: probdemo.c
 views.o: views.c
index 1d8fd35199d936e65cd76fd8bf66c2c32e7b4596..ddee4460e1f62130636367ba0d837d6a33606796 100644 (file)
@@ -63,12 +63,14 @@ void fgViewUpdate(struct fgFLIGHT *f, struct fgVIEW *v, struct fgLIGHT *l) {
     v->cur_zero_elev.z -= scenery.center.z;
 
     /* calculate view position in current FG view coordinate system */
-    v->view_pos = fgPolarToCart(FG_Longitude, FG_Lat_geocentric, 
+    v->abs_view_pos = fgPolarToCart(FG_Longitude, FG_Lat_geocentric, 
                             FG_Radius_to_vehicle * FEET_TO_METER + 1.0);
-    v->view_pos.x -= scenery.center.x;
-    v->view_pos.y -= scenery.center.y;
-    v->view_pos.z -= scenery.center.z;
+    v->view_pos.x = v->abs_view_pos.x - scenery.center.x;
+    v->view_pos.y = v->abs_view_pos.y - scenery.center.y;
+    v->view_pos.z = v->abs_view_pos.z - scenery.center.z;
 
+    printf( "View pos = %.4f, %.4f, %.4f\n", 
+          v->abs_view_pos.x, v->abs_view_pos.y, v->abs_view_pos.z);
     fgPrintf( FG_VIEW, FG_DEBUG, "View pos = %.4f, %.4f, %.4f\n", 
           v->view_pos.x, v->view_pos.y, v->view_pos.z);
 
@@ -182,10 +184,13 @@ void fgViewUpdate(struct fgFLIGHT *f, struct fgVIEW *v, struct fgLIGHT *l) {
 
 
 /* $Log$
-/* Revision 1.11  1998/01/27 00:47:58  curt
-/* Incorporated Paul Bleisch's <bleisch@chromatic.com> new debug message
-/* system and commandline/config file processing code.
+/* Revision 1.12  1998/01/29 00:50:28  curt
+/* Added a view record field for absolute x, y, z position.
 /*
+ * Revision 1.11  1998/01/27 00:47:58  curt
+ * Incorporated Paul Bleisch's <bleisch@chromatic.com> new debug message
+ * system and commandline/config file processing code.
+ *
  * Revision 1.10  1998/01/19 19:27:09  curt
  * Merged in make system changes from Bob Kuehne <rpk@sgi.com>
  * This should simplify things tremendously.
index a7b4bdfb9b9078e032d76d0c70ecc771ee8d17cc..11b0c9208df6c15f2b2ab194547213eb93efcf51 100644 (file)
@@ -36,6 +36,9 @@
 
 /* Define a structure containing view information */
 struct fgVIEW {
+    /* absolute view position */
+    struct fgCartesianPoint abs_view_pos;
+
     /* view position translated to scenery.center */
     struct fgCartesianPoint view_pos;
 
@@ -89,10 +92,13 @@ void fgViewUpdate(struct fgFLIGHT *f, struct fgVIEW *v, struct fgLIGHT *l);
 
 
 /* $Log$
-/* Revision 1.8  1998/01/27 00:47:58  curt
-/* Incorporated Paul Bleisch's <bleisch@chromatic.com> new debug message
-/* system and commandline/config file processing code.
+/* Revision 1.9  1998/01/29 00:50:29  curt
+/* Added a view record field for absolute x, y, z position.
 /*
+ * Revision 1.8  1998/01/27 00:47:58  curt
+ * Incorporated Paul Bleisch's <bleisch@chromatic.com> new debug message
+ * system and commandline/config file processing code.
+ *
  * Revision 1.7  1998/01/22 02:59:38  curt
  * Changed #ifdef FILE_H to #ifdef _FILE_H
  *