1
0
Fork 0

Use the correct number of parameters when calling the gen_runway_area()

functions.
This commit is contained in:
curt 2003-08-20 16:52:43 +00:00
parent 5937926a0b
commit 83ebd1eba7
3 changed files with 25 additions and 18 deletions

View file

@ -302,13 +302,13 @@ static void build_runway( const TGRunway& rwy_info,
TGPolygon base, safe_base;
if ( rwy_info.really_taxiway ) {
base = gen_runway_area_w_extend( rwy_info, 10, 10 );
base = gen_runway_area_w_extend( rwy_info, 0.0, 10.0, 10.0 );
// also clear a safe area around the taxiway
safe_base = gen_runway_area_w_extend( rwy_info, 40, 40 );
safe_base = gen_runway_area_w_extend( rwy_info, 0.0, 40.0, 40.0 );
} else {
base = gen_runway_area_w_extend( rwy_info, 20, 20 );
base = gen_runway_area_w_extend( rwy_info, 0.0, 20.0, 20.0 );
// also clear a safe area around the runway
safe_base = gen_runway_area_w_extend( rwy_info, 300, 60 );
safe_base = gen_runway_area_w_extend( rwy_info, 0.0, 150.0, 60.0 );
}
*apt_clearing = polygon_union(safe_base, *apt_clearing);
@ -699,14 +699,20 @@ void build_airport( string airport_raw, float alt_m,
rwy_polys[k].set_poly( poly );
}
SG_LOG(SG_GENERAL, SG_DEBUG, "add nodes base ");
SG_LOG(SG_GENERAL, SG_INFO, "add nodes base ");
cout << " before: " << base_poly << endl;
cout << " tmp_nodes size = " << tmp_nodes.get_node_list().size() << endl;
base_poly = add_nodes_to_poly( base_poly, tmp_nodes );
cout << " after adding tmp_nodes: " << base_poly << endl;
// write_polygon( base_poly, "base-add" );
SG_LOG(SG_GENERAL, SG_DEBUG, "remove dups base ");
base_poly = remove_dups( base_poly );
SG_LOG(SG_GENERAL, SG_DEBUG, "remove bad contours base");
base_poly = remove_bad_contours( base_poly );
// write_polygon( base_poly, "base-fin" );
cout << " after clean up: " << base_poly << endl;
// tesselate the polygons and prepair them for final output

View file

@ -40,7 +40,7 @@ static Point3D gen_runway_light_vector( const TGRunway& rwy_info,
double length;
// Generate the 4 corners of the runway
TGPolygon poly_corners = gen_runway_area_w_extend( rwy_info, 0.0, 0.0 );
TGPolygon poly_corners = gen_runway_area_w_extend( rwy_info, 0.0, 0.0, 0.0 );
point_list corner;
for ( int i = 0; i < poly_corners.contour_size( 0 ); ++i ) {
corner.push_back( poly_corners.get_pt( 0, i ) );
@ -95,7 +95,7 @@ static superpoly_list gen_runway_edge_lights( const TGRunway& rwy_info,
// using TGPolygon is a bit innefficient, but that's what the
// routine returns.
TGPolygon poly_corners = gen_runway_area_w_extend( rwy_info, 2.0, 2.0 );
TGPolygon poly_corners = gen_runway_area_w_extend( rwy_info, 0.0, 2.0, 2.0 );
point_list corner;
for ( i = 0; i < poly_corners.contour_size( 0 ); ++i ) {
@ -205,7 +205,7 @@ static superpoly_list gen_taxiway_edge_lights( const TGRunway& rwy_info,
// using TGPolygon is a bit innefficient, but that's what the
// routine returns.
TGPolygon poly_corners = gen_runway_area_w_extend( rwy_info, 2.0, 2.0 );
TGPolygon poly_corners = gen_runway_area_w_extend( rwy_info, 0.0, 2.0, 2.0 );
point_list corner;
for ( i = 0; i < poly_corners.contour_size( 0 ); ++i ) {
@ -282,7 +282,7 @@ static superpoly_list gen_runway_threshold_lights( const TGRunway& rwy_info,
// using TGPolygon is a bit innefficient, but that's what the
// routine returns.
TGPolygon poly_corners = gen_runway_area_w_extend( rwy_info, 0.0, 0.0 );
TGPolygon poly_corners = gen_runway_area_w_extend( rwy_info, 0.0, 0.0, 0.0 );
point_list corner;
for ( i = 0; i < poly_corners.contour_size( 0 ); ++i ) {
@ -414,7 +414,7 @@ static superpoly_list gen_runway_center_line_lights( const TGRunway& rwy_info,
// using TGPolygon is a bit innefficient, but that's what the
// routine returns.
TGPolygon poly_corners = gen_runway_area_w_extend( rwy_info, 2.0, 2.0 );
TGPolygon poly_corners = gen_runway_area_w_extend( rwy_info, 0.0, 2.0, 2.0 );
point_list corner;
for ( i = 0; i < poly_corners.contour_size( 0 ); ++i ) {
@ -510,7 +510,7 @@ static TGSuperPoly gen_touchdown_zone_lights( const TGRunway& rwy_info,
// using TGPolygon is a bit innefficient, but that's what the
// routine returns.
TGPolygon poly_corners = gen_runway_area_w_extend( rwy_info, 0.0, 0.0 );
TGPolygon poly_corners = gen_runway_area_w_extend( rwy_info, 0.0, 0.0, 0.0 );
point_list corner;
for ( i = 0; i < poly_corners.contour_size( 0 ); ++i ) {
@ -614,7 +614,7 @@ static TGSuperPoly gen_vasi( const TGRunway& rwy_info, float alt_m,
// using TGPolygon is a bit innefficient, but that's what the
// routine returns.
TGPolygon poly_corners = gen_runway_area_w_extend( rwy_info, 0.0, 0.0 );
TGPolygon poly_corners = gen_runway_area_w_extend( rwy_info, 0.0, 0.0, 0.0 );
point_list corner;
for ( i = 0; i < poly_corners.contour_size( 0 ); ++i ) {
@ -755,7 +755,7 @@ static TGSuperPoly gen_papi( const TGRunway& rwy_info, float alt_m,
// using TGPolygon is a bit innefficient, but that's what the
// routine returns.
TGPolygon poly_corners = gen_runway_area_w_extend( rwy_info, 0.0, 0.0 );
TGPolygon poly_corners = gen_runway_area_w_extend( rwy_info, 0.0, 0.0, 0.0 );
point_list corner;
for ( i = 0; i < poly_corners.contour_size( 0 ); ++i ) {
@ -851,7 +851,7 @@ static TGSuperPoly gen_reil( const TGRunway& rwy_info, float alt_m,
// using TGPolygon is a bit innefficient, but that's what the
// routine returns.
TGPolygon poly_corners = gen_runway_area_w_extend( rwy_info, 0.0, 0.0 );
TGPolygon poly_corners = gen_runway_area_w_extend( rwy_info, 0.0, 0.0, 0.0 );
point_list corner;
for ( i = 0; i < poly_corners.contour_size( 0 ); ++i ) {
@ -948,7 +948,7 @@ static superpoly_list gen_alsf( const TGRunway& rwy_info,
// using TGPolygon is a bit innefficient, but that's what the
// routine returns.
TGPolygon poly_corners = gen_runway_area_w_extend( rwy_info, 2.0, 2.0 );
TGPolygon poly_corners = gen_runway_area_w_extend( rwy_info, 0.0, 2.0, 2.0 );
point_list corner;
for ( i = 0; i < poly_corners.contour_size( 0 ); ++i ) {
@ -1451,7 +1451,7 @@ static TGSuperPoly gen_odals( const TGRunway& rwy_info, float alt_m,
// using TGPolygon is a bit innefficient, but that's what the
// routine returns.
TGPolygon poly_corners = gen_runway_area_w_extend( rwy_info, 0.0, 0.0 );
TGPolygon poly_corners = gen_runway_area_w_extend( rwy_info, 0.0, 0.0, 0.0 );
point_list corner;
for ( i = 0; i < poly_corners.contour_size( 0 ); ++i ) {
@ -1558,7 +1558,7 @@ static superpoly_list gen_ssalx( const TGRunway& rwy_info,
// using TGPolygon is a bit innefficient, but that's what the
// routine returns.
TGPolygon poly_corners = gen_runway_area_w_extend( rwy_info, 2.0, 2.0 );
TGPolygon poly_corners = gen_runway_area_w_extend( rwy_info, 0.0, 2.0, 2.0 );
point_list corner;
for ( i = 0; i < poly_corners.contour_size( 0 ); ++i ) {
@ -1824,7 +1824,7 @@ static superpoly_list gen_malsx( const TGRunway& rwy_info,
// using TGPolygon is a bit innefficient, but that's what the
// routine returns.
TGPolygon poly_corners = gen_runway_area_w_extend( rwy_info, 2.0, 2.0 );
TGPolygon poly_corners = gen_runway_area_w_extend( rwy_info, 0.0, 2.0, 2.0 );
point_list corner;
for ( i = 0; i < poly_corners.contour_size( 0 ); ++i ) {

View file

@ -56,6 +56,7 @@ void add_intermediate_nodes( int contour, const Point3D& start,
result );
result->add_node( contour, new_pt );
cout << " adding = " << new_pt << endl;
add_intermediate_nodes( contour, new_pt, end, tmp_nodes,
result );