]> git.mxchange.org Git - flightgear.git/commitdiff
First pass at view frustum culling now operational.
authorcurt <curt>
Sun, 17 May 1998 16:59:03 +0000 (16:59 +0000)
committercurt <curt>
Sun, 17 May 1998 16:59:03 +0000 (16:59 +0000)
Main/Makefile.am
Main/views.cxx
Main/views.hxx

index 2497c22c0a9f5761219900cea30e17ba02f992c5..08cc5d65b2b2aea295d539e6ee2eb62ab6424ed1 100644 (file)
@@ -1,6 +1,6 @@
 EXTRA_DIST = runfg.in runfg.bat.in
 
-bin_PROGRAMS = fg ttest
+bin_PROGRAMS = fg
 
 bin_SCRIPTS = runfg runfg.bat
 
@@ -31,10 +31,6 @@ fg_LDADD = \
        $(top_builddir)/Lib/Debug/libDebug.la \
        $(top_builddir)/Lib/zlib/libz.la
 
-ttest_SOURCES = ttest.cxx
-
-ttest_LDADD = $(top_builddir)/Lib/Math/libMath.la \
-
 INCLUDES += \
        -DGLUT \
        -I$(top_builddir) \
index d9ac0d6e6a7ae060b6ec92326bb8609e60f2ef89..803eb4d89aca9570ce01ba734a49af24fa4c8650 100644 (file)
@@ -72,23 +72,23 @@ void fgVIEW::Update( fgFLIGHT *f ) {
     scenery.center.y = scenery.next_center.y;
     scenery.center.z = scenery.next_center.z;
 
-    printf("win_ratio = %.2f\n", win_ratio);
+    // printf("win_ratio = %.2f\n", win_ratio);
 
     // calculate sin() and cos() of fov / 2 in X direction;
-    theta_x = FG_PI_2 - (o->fov * win_ratio * DEG_TO_RAD) / 2.0;
-    printf("theta_x = %.2f\n", theta_x);
+    theta_x = (o->fov * win_ratio * DEG_TO_RAD) / 2.0;
+    // printf("theta_x = %.2f\n", theta_x);
     sin_fov_x = sin(theta_x);
     cos_fov_x = cos(theta_x);
     slope_x = sin_fov_x / cos_fov_x;
-    printf("slope_x = %.2f\n", slope_x);
+    // printf("slope_x = %.2f\n", slope_x);
 
     // calculate sin() and cos() of fov / 2 in Y direction;
-    theta_y = FG_PI_2 - (o->fov * DEG_TO_RAD) / 2.0;
-    printf("theta_y = %.2f\n", theta_y);
+    theta_y = (o->fov * DEG_TO_RAD) / 2.0;
+    // printf("theta_y = %.2f\n", theta_y);
     sin_fov_y = sin(theta_y);
     cos_fov_y = cos(theta_y);
     slope_y = sin_fov_y / cos_fov_y;
-    printf("slope_y = %.2f\n", slope_y);
+    // printf("slope_y = %.2f\n", slope_y);
 
     // calculate the cartesion coords of the current lat/lon/0 elev
     p.lon = FG_Longitude;
@@ -318,6 +318,9 @@ fgVIEW::~fgVIEW( void ) {
 
 
 // $Log$
+// Revision 1.10  1998/05/17 16:59:03  curt
+// First pass at view frustum culling now operational.
+//
 // Revision 1.9  1998/05/16 13:08:37  curt
 // C++ - ified views.[ch]xx
 // Shuffled some additional view parameters into the fgVIEW class.
index a4c0f580d95342101eca4837da4bde1e93c38d60..d95f9945fddfd4ebda559a6ef836df0919934bf9 100644 (file)
@@ -69,6 +69,10 @@ public:
     // slope of view frustum edge in eye space X axis
     double slope_x;
 
+    // View frustum cull ratio (% of tiles culled ... used for
+    // reporting purposes)
+    double vfc_ratio;
+
     // absolute view position
     fgCartesianPoint3d abs_view_pos;
 
@@ -142,6 +146,9 @@ extern fgVIEW current_view;
 
 
 // $Log$
+// Revision 1.7  1998/05/17 16:59:04  curt
+// First pass at view frustum culling now operational.
+//
 // Revision 1.6  1998/05/16 13:08:37  curt
 // C++ - ified views.[ch]xx
 // Shuffled some additional view parameters into the fgVIEW class.