//
-// getapt.cxx -- generate airport scenery from the given definition file
+// genapt.cxx -- generate airport scenery from the given definition file
//
// Written by Curtis Olson, started September 1998.
//
// (Log is kept at end of this file)
-#include <string> // Standard C++ string library
-#include <vector>
-#include "Include/fg_stl_config.h"
+#include <Include/compiler.h>
-#ifdef NEEDNAMESPACESTD
-using namespace std;
-#endif
+#include STL_STRING
+#include <vector>
#ifdef __BORLANDC__
# define exception c_exception
#endif
#include <math.h>
+#ifdef FG_HAVE_NATIVE_SGI_COMPILERS
+# include <strings.h>
+#endif
+
#include <Debug/logstream.hxx>
// #include <Include/fg_types.h>
#include <Math/fg_geodesy.hxx>
#include "genapt.hxx"
+FG_USING_STD(string);
+FG_USING_STD(vector);
+
typedef vector < Point3D > container;
typedef container::iterator iterator;
i = 1;
tex = calc_tex_coords( t->nodes[i], t->center );
- dist = cart.distance3D(average);
+ dist = cart.distance3Dsquared(average);
if ( dist > max_dist ) {
max_dist = dist;
}
fragment.add_face(center_num, i - 1, i);
tex = calc_tex_coords( t->nodes[i], t->center );
- dist = cart.distance3D(average);
+ dist = cart.distance3Dsquared(average);
if ( dist > max_dist ) {
max_dist = dist;
}
xglEnd();
xglEndList();
- fragment.bounding_radius = max_dist;
+ fragment.bounding_radius = sqrt(max_dist);
fragment.display_list = display_list;
t->fragment_list.push_back(fragment);
if ( token == "a" ) {
// airport info record (start of airport)
- if ( apt_id != "" ) {
+ if ( apt_id.length() > 0 ) {
// we have just finished reading and airport record.
// process the info
gen_base(average, perimeter, tile);
in >> skipcomment;
}
- if ( apt_id != "" ) {
+ if ( apt_id.length() > 0 ) {
// we have just finished reading and airport record.
// process the info
size = perimeter.size();
// $Log$
+// Revision 1.14 1999/03/02 01:02:31 curt
+// Tweaks for building with native SGI compilers.
+//
+// Revision 1.13 1999/02/26 22:08:34 curt
+// Added initial support for native SGI compilers.
+//
+// Revision 1.12 1999/02/01 21:08:33 curt
+// Optimizations from Norman Vine.
+//
// Revision 1.11 1998/11/23 21:48:09 curt
// Borland portability tweaks.
//
// Revision 1.1 1998/09/14 02:14:01 curt
// Initial revision of genapt.[ch]xx for generating airport scenery.
//
-//
-