#include <plib/ssg.h>
-FG_USING_STD(vector);
+SG_USING_STD(vector);
class FGHitRec {
{
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