From ef10b37fd3ce23553d0ee2fb4839aa15f490f0ba Mon Sep 17 00:00:00 2001 From: curt Date: Sat, 12 Jun 1999 21:10:09 +0000 Subject: [PATCH] Updates to track changes in Scenery and Object. --- Simulator/Airports/genapt.cxx | 16 +++++++++------- Simulator/Airports/genapt.hxx | 4 ++-- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/Simulator/Airports/genapt.cxx b/Simulator/Airports/genapt.cxx index 9dee13a8e..f4cbec060 100644 --- a/Simulator/Airports/genapt.cxx +++ b/Simulator/Airports/genapt.cxx @@ -61,7 +61,7 @@ typedef container::const_iterator const_iterator; #define FG_APT_BASE_TEX_CONSTANT 2000.0 // Calculate texture coordinates for a given point. -static Point3D calc_tex_coords(double *node, const Point3D& ref) { +static Point3D calc_tex_coords(const Point3D& node, const Point3D& ref) { Point3D cp; Point3D pp; @@ -86,7 +86,7 @@ static Point3D calc_tex_coords(double *node, const Point3D& ref) { // generate the actual base area for the airport static void -gen_base( const Point3D& average, const container& perimeter, fgTILE *t) +gen_base( const Point3D& average, const container& perimeter, FGTileEntry *t) { GLint display_list; Point3D cart, cart_trans, tex; @@ -139,7 +139,9 @@ gen_base( const Point3D& average, const container& perimeter, fgTILE *t) tex = calc_tex_coords( t->nodes[t->ncount-1], t->center ); xglTexCoord2f(tex.x(), tex.y()); xglNormal3dv(normal); - xglVertex3dv(t->nodes[t->ncount-1]); + xglVertex3d(t->nodes[t->ncount-1][0], + t->nodes[t->ncount-1][1], + t->nodes[t->ncount-1][2]); // first point on perimeter const_iterator current = perimeter.begin(); @@ -157,7 +159,7 @@ gen_base( const Point3D& average, const container& perimeter, fgTILE *t) max_dist = dist; } xglTexCoord2f(tex.x(), tex.y()); - xglVertex3dv(t->nodes[i]); + xglVertex3dv(t->nodes[i].get_n()); ++current; ++i; @@ -177,7 +179,7 @@ gen_base( const Point3D& average, const container& perimeter, fgTILE *t) max_dist = dist; } xglTexCoord2f(tex.x(), tex.y()); - xglVertex3dv(t->nodes[i]); + xglVertex3dv(t->nodes[i].get_n()); i++; } @@ -189,7 +191,7 @@ gen_base( const Point3D& average, const container& perimeter, fgTILE *t) tex = calc_tex_coords( t->nodes[1], t->center ); xglTexCoord2f(tex.x(), tex.y()); - xglVertex3dv(t->nodes[1]); + xglVertex3dv(t->nodes[1].get_n()); xglEnd(); xglEndList(); @@ -204,7 +206,7 @@ gen_base( const Point3D& average, const container& perimeter, fgTILE *t) // Load a .apt file and register the GL fragments with the // corresponding tile int -fgAptGenerate(const string& path, fgTILE *tile) +fgAptGenerate(const string& path, FGTileEntry *tile) { string token; string apt_id, apt_name; diff --git a/Simulator/Airports/genapt.hxx b/Simulator/Airports/genapt.hxx index 5ec18e2be..911b547c2 100644 --- a/Simulator/Airports/genapt.hxx +++ b/Simulator/Airports/genapt.hxx @@ -40,7 +40,7 @@ # define exception c_exception #endif -#include +#include FG_USING_STD(string); FG_USING_STD(set); @@ -57,7 +57,7 @@ FG_USING_STD(set); // Load a .apt file and register the GL fragments with the // corresponding tile int -fgAptGenerate(const string& path, fgTILE *tile); +fgAptGenerate(const string& path, FGTileEntry *tile); #endif /* _AIRPORTS_HXX */