1
0
Fork 0

Oops, fixed some 'typo' type bugs I missed in the first go around.

This commit is contained in:
curt 2002-03-13 05:08:21 +00:00
parent a22b83516b
commit 82f409ba67
2 changed files with 14 additions and 2 deletions

View file

@ -886,8 +886,11 @@ void build_airport( string airport_raw, string_list& runways_raw,
strip_v.push_back( uindex );
strip_v.push_back( lindex );
// use 'the' normal. We are pushing on two nodes so we
// need to push on two normals.
index = normals.unique_add( vn );
strip_n.push_back( index );
strip_n.push_back( index );
} else {
cout << "Ooops missing node when building skirt ... dying!"
<< endl;
@ -908,6 +911,7 @@ void build_airport( string airport_raw, string_list& runways_raw,
index = normals.unique_add( vn );
strip_n.push_back( index );
strip_n.push_back( index );
} else {
cout << "Ooops missing node when building skirt ... dying!"
<< endl;
@ -928,6 +932,7 @@ void build_airport( string airport_raw, string_list& runways_raw,
index = normals.unique_add( vn );
strip_n.push_back( index );
strip_n.push_back( index );
} else {
cout << "Ooops missing node when building skirt ... dying!"
<< endl;
@ -977,7 +982,7 @@ void build_airport( string airport_raw, string_list& runways_raw,
pt_v.push_back( index );
geod_nodes.push_back( p );
index = normals.simple_add( rwy_light_normals[i] );
index = normals.unique_add( rwy_light_normals[i] );
pt_n.push_back( index );
}
pts_v.push_back( pt_v );

View file

@ -52,7 +52,8 @@ Point3D gen_runway_light_vector( const FGRunway& rwy_info ) {
// FIXME
// need to angle up (i.e. 3 degrees)
return rwy_vec;
double length = rwy_vec.distance3D( Point3D(0.0) );
return rwy_vec / length;
}
@ -62,6 +63,8 @@ void gen_runway_lights( const FGRunway& rwy_info,
point_list *lights, point_list *normals ) {
int i;
Point3D normal = gen_runway_light_vector( rwy_info );
// using FGPolygon is a bit innefficient, but that's what the
// routine returns.
FGPolygon poly_corners = gen_runway_area_w_expand( rwy_info, 0.0, 0.0 );
@ -77,13 +80,17 @@ void gen_runway_lights( const FGRunway& rwy_info,
Point3D pt1 = corner[0];
Point3D pt2 = corner[1];
lights->push_back( pt1 );
normals->push_back( normal );
lights->push_back( pt2 );
normals->push_back( normal );
for ( i = 0; i < FG_DIVS; ++i ) {
pt1 += inc1;
pt2 += inc2;
lights->push_back( pt1 );
normals->push_back( normal );
lights->push_back( pt2 );
normals->push_back( normal );
}
}