]> git.mxchange.org Git - flightgear.git/commitdiff
Added a View Frustum Culling ratio display to the hud.
authorcurt <curt>
Sun, 17 May 1998 16:58:12 +0000 (16:58 +0000)
committercurt <curt>
Sun, 17 May 1998 16:58:12 +0000 (16:58 +0000)
Cockpit/cockpit.cxx
Cockpit/hud.cxx
Cockpit/hud.hxx

index 10f725d37a699139a8368b707193f102d39d4e7d..9169c2b4065010776c5a5dabf5e6d598c3621ae4 100644 (file)
@@ -41,6 +41,7 @@
 #include <Include/fg_constants.h>
 #include <Include/general.h>
 #include <Main/options.hxx>
+#include <Main/views.hxx>
 #include <Math/fg_random.h>
 #include <Math/mat3.h>
 #include <Math/polar3d.h>
@@ -227,6 +228,15 @@ double get_fov( void )
     return o->fov;                                                      
 }
 
+double get_vfc_ratio( void )
+{
+    fgVIEW *v;                                                               
+    v = &current_view;                     
+    return v->vfc_ratio;                                                      
+}
+
 bool fgCockpitInit( fgAIRCRAFT *cur_aircraft )
 {
        fgPrintf( FG_COCKPIT, FG_INFO, "Initializing cockpit subsystem\n");
@@ -264,9 +274,12 @@ void fgCockpitUpdate( void )
 }
 
 /* $Log$
-/* Revision 1.7  1998/05/16 13:04:13  curt
-/* New updates from Charlie Hotchkiss.
+/* Revision 1.8  1998/05/17 16:58:12  curt
+/* Added a View Frustum Culling ratio display to the hud.
 /*
+ * Revision 1.7  1998/05/16 13:04:13  curt
+ * New updates from Charlie Hotchkiss.
+ *
  * Revision 1.6  1998/05/13 18:27:53  curt
  * Added an fov to hud display.
  *
index 8a3c7c48c426faf25178ad439cd5b5f1698ae902..830065453708ae4fa37a6431e0c312f6d81a1568 100644 (file)
@@ -1473,7 +1473,7 @@ void HudLadder :: draw( void )
 // mustange and the engine readouts of a B36!
 //
 
-#define INSTRDEFS 16
+#define INSTRDEFS 17
 
 int fgHUDInit( fgAIRCRAFT * /* current_aircraft */ )
 {
@@ -1767,6 +1767,22 @@ int fgHUDInit( fgAIRCRAFT * /* current_aircraft */ )
         loc.top    = 100; // Ignore
         loc.right  = 500; // Ignore
         loc.bottom =  25;
+        HIptr = (instr_item *) new instr_label( loc, get_vfc_ratio,
+                                                "%.2f",
+                                                "VFC Ratio = ",
+                                                NULL,
+                                                ReadTOP,
+                                                RIGHT_JUST,
+                                                SMALL,
+                                                0,
+                                                TRUE );
+        break;
+
+      case 17:
+        loc.left   = 10;
+        loc.top    = 100; // Ignore
+        loc.right  = 500; // Ignore
+        loc.bottom =  40;
         HIptr = (instr_item *) new instr_label( loc, get_fov,
                                                 "%.1f",
                                                 "FOV = ",
@@ -1899,9 +1915,12 @@ void fgUpdateHUD( void ) {
 }
 
 /* $Log$
-/* Revision 1.9  1998/05/16 13:04:14  curt
-/* New updates from Charlie Hotchkiss.
+/* Revision 1.10  1998/05/17 16:58:12  curt
+/* Added a View Frustum Culling ratio display to the hud.
 /*
+ * Revision 1.9  1998/05/16 13:04:14  curt
+ * New updates from Charlie Hotchkiss.
+ *
  * Revision 1.8  1998/05/13 18:27:54  curt
  * Added an fov to hud display.
  *
index a3447e397577ee440b08175ac5e49fb5743fbe6b..0e7f186eb3c81f96ef4167dce0486ec19b444205 100644 (file)
@@ -149,6 +149,7 @@ extern double get_lat_min     ( void );
 extern double get_longitude   ( void );
 extern double get_long_min    ( void );
 extern double get_fov         ( void );
+extern double get_vfc_ratio   ( void );
 
 enum  hudinstype{ HUDno_instr,
               HUDscale,
@@ -445,9 +446,12 @@ void fgHUDSetTimeMode( Hptr hud, int time_of_day );
 #endif // _HUD_H
 
 /* $Log$
-/* Revision 1.4  1998/05/16 13:04:15  curt
-/* New updates from Charlie Hotchkiss.
+/* Revision 1.5  1998/05/17 16:58:13  curt
+/* Added a View Frustum Culling ratio display to the hud.
 /*
+ * Revision 1.4  1998/05/16 13:04:15  curt
+ * New updates from Charlie Hotchkiss.
+ *
  * Revision 1.3  1998/05/13 18:27:55  curt
  * Added an fov to hud display.
  *