With the latest version of the libnurbs++, the include file extension has
changed from .hh -> .h Generate a complete enclosing area around the airport including taxiways, not just runways.
This commit is contained in:
parent
1bfc2da8ee
commit
ea58728f5c
5 changed files with 16 additions and 16 deletions
|
@ -23,8 +23,8 @@
|
||||||
//
|
//
|
||||||
|
|
||||||
|
|
||||||
#include <nurbs++/nurbsS.hh>
|
#include <nurbs++/nurbsS.h>
|
||||||
#include <nurbs++/nurbsSub.hh>
|
#include <nurbs++/nurbsSub.h>
|
||||||
|
|
||||||
#include <simgear/constants.h>
|
#include <simgear/constants.h>
|
||||||
#include <simgear/math/sg_types.hxx>
|
#include <simgear/math/sg_types.hxx>
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
#include <nurbs++/nurbsS.hh>
|
#include <nurbs++/nurbsS.h>
|
||||||
|
|
||||||
#include <simgear/math/point3d.hxx>
|
#include <simgear/math/point3d.hxx>
|
||||||
|
|
||||||
|
|
|
@ -370,16 +370,17 @@ static void build_runway( const TGRunway& rwy_info,
|
||||||
throw sg_exception("Unknown runway code in build.cxx:build_airport()");
|
throw sg_exception("Unknown runway code in build.cxx:build_airport()");
|
||||||
}
|
}
|
||||||
|
|
||||||
TGPolygon base;
|
TGPolygon base, safe_base;
|
||||||
if ( rwy_info.really_taxiway ) {
|
if ( rwy_info.really_taxiway ) {
|
||||||
base = gen_runway_area_w_extend( rwy_info, 10, 10 );
|
base = gen_runway_area_w_extend( rwy_info, 10, 10 );
|
||||||
|
// also clear a safe area around the taxiway
|
||||||
|
safe_base = gen_runway_area_w_extend( rwy_info, 40, 40 );
|
||||||
} else {
|
} else {
|
||||||
base = gen_runway_area_w_extend( rwy_info, 20, 20 );
|
base = gen_runway_area_w_extend( rwy_info, 20, 20 );
|
||||||
|
|
||||||
// also clear a safe area around the runway
|
// also clear a safe area around the runway
|
||||||
TGPolygon safe_base = gen_runway_area_w_extend( rwy_info, 300, 120 );
|
safe_base = gen_runway_area_w_extend( rwy_info, 300, 120 );
|
||||||
*apt_clearing = polygon_union(safe_base, *apt_clearing);
|
|
||||||
}
|
}
|
||||||
|
*apt_clearing = polygon_union(safe_base, *apt_clearing);
|
||||||
|
|
||||||
// add base to apt_base
|
// add base to apt_base
|
||||||
*apt_base = polygon_union( base, *apt_base );
|
*apt_base = polygon_union( base, *apt_base );
|
||||||
|
@ -985,10 +986,10 @@ void build_airport( string airport_raw, float alt_m,
|
||||||
// Extend the area a bit so we don't have wierd things on the edges
|
// Extend the area a bit so we don't have wierd things on the edges
|
||||||
double dlon = max_deg.lon() - min_deg.lon();
|
double dlon = max_deg.lon() - min_deg.lon();
|
||||||
double dlat = max_deg.lat() - min_deg.lat();
|
double dlat = max_deg.lat() - min_deg.lat();
|
||||||
min_deg.setlon( min_deg.lon() - 0.5 * dlon );
|
min_deg.setlon( min_deg.lon() - 0.25 * dlon );
|
||||||
max_deg.setlon( max_deg.lon() + 0.5 * dlon );
|
max_deg.setlon( max_deg.lon() + 0.25 * dlon );
|
||||||
min_deg.setlat( min_deg.lat() - 0.5 * dlat );
|
min_deg.setlat( min_deg.lat() - 0.25 * dlat );
|
||||||
max_deg.setlat( max_deg.lat() + 0.5 * dlat );
|
max_deg.setlat( max_deg.lat() + 0.25 * dlat );
|
||||||
|
|
||||||
TGAptSurface apt_surf( root, min_deg, max_deg );
|
TGAptSurface apt_surf( root, min_deg, max_deg );
|
||||||
cout << "Surface created" << endl;
|
cout << "Surface created" << endl;
|
||||||
|
@ -1220,7 +1221,6 @@ void build_airport( string airport_raw, float alt_m,
|
||||||
obj.set_fan_materials( fan_materials );
|
obj.set_fan_materials( fan_materials );
|
||||||
|
|
||||||
bool result;
|
bool result;
|
||||||
/* result = obj.write_ascii( objpath, name, b ); */
|
|
||||||
result = obj.write_bin( objpath, name, b );
|
result = obj.write_bin( objpath, name, b );
|
||||||
if ( !result ) {
|
if ( !result ) {
|
||||||
throw sg_exception("error writing file. :-(");
|
throw sg_exception("error writing file. :-(");
|
||||||
|
|
|
@ -23,10 +23,10 @@
|
||||||
|
|
||||||
# Edit the following values to set up your preferences:
|
# Edit the following values to set up your preferences:
|
||||||
|
|
||||||
$workdir = "/stage/fgfs01/curt/Work";
|
$workdir = "/stage/fgfs04/curt/Work";
|
||||||
$inputfile = "./default.apt";
|
$inputfile = "./default.apt";
|
||||||
$binary = "./genapts";
|
$binary = "./genapts";
|
||||||
$startid = "EGLL";
|
$startid = "";
|
||||||
|
|
||||||
# end of user configurable section
|
# end of user configurable section
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
|
|
||||||
#include <nurbs++/nurbsS.hh>
|
#include <nurbs++/nurbsS.h>
|
||||||
#include <nurbs++/nurbsSub.hh>
|
#include <nurbs++/nurbsSub.h>
|
||||||
|
|
||||||
|
|
||||||
int main(){
|
int main(){
|
||||||
|
|
Loading…
Add table
Reference in a new issue