]> git.mxchange.org Git - flightgear.git/blobdiff - src/Scenery/hitlist.hxx
Updates to allow weather system and atis to interact better.
[flightgear.git] / src / Scenery / hitlist.hxx
index 0fa5d74651a2074f91f80c56770a8c0e90bdac2d..b734897002d389897b816150911179c4e9ec69da 100644 (file)
@@ -80,17 +80,32 @@ inline void FGHitList::Intersect( ssgBranch *scene,
 {
     sgdMat4 m;
 
+#ifdef USE_CACHED_HIT
+       // This optimization gives a slight speedup
+       // but it precludes using the hitlist for dynamic
+       // objects  NHV
     init();
-
     if( last_hit() ) {
        sgdMakeIdentMat4 ( m ) ;
        IntersectCachedLeaf(m, orig, dir);
     }
     if( ! num_hits() ) {
+#endif
        clear();
        sgdMakeIdentMat4 ( m ) ;
        IntersectBranch( scene, m, orig, dir);
+#ifdef USE_CACHED_HIT
     }
+#endif
 }
 
+
+// Associated function, assuming a wgs84 world with 0,0,0 at the
+// center, find the current terrain intersection elevation for the
+// point specified.
+bool fgCurrentElev( sgdVec3 abs_view_pos, sgdVec3 scenery_center,
+                   FGHitList *hit_list,
+                   double *terrain_elev, double *radius, double *normal );
+
+
 #endif // _HITLIST_HXX