1
0
Fork 0

Implement omnidirectional REIL

This commit is contained in:
Christian Schmitt 2012-10-25 14:18:44 +02:00
parent 3155bbff0f
commit 8896dbcba8
2 changed files with 11 additions and 4 deletions

View file

@ -553,13 +553,20 @@ TGSuperPoly Runway::gen_touchdown_zone_lights( bool recip )
// generate REIL lights // generate REIL lights
TGSuperPoly Runway::gen_reil( bool recip ) TGSuperPoly Runway::gen_reil( const int kind, bool recip )
{ {
point_list lights; lights.clear(); point_list lights; lights.clear();
point_list normals; normals.clear(); point_list normals; normals.clear();
string flag = rwy.rwnum[get_thresh0(recip)]; string flag = rwy.rwnum[get_thresh0(recip)];
Point3D normal;
Point3D normal = gen_runway_light_vector( 10, recip ); if (kind == 1) {
// omnidirectional lights
normal = Point3D::fromSGVec3( normalize(SGVec3d::fromGeod(GetStart())) );
} else {
// unidirectional lights
normal = gen_runway_light_vector( 10, recip );
}
// determine the start point. // determine the start point.
SGGeod ref; SGGeod ref;
@ -1597,7 +1604,7 @@ void Runway::gen_runway_lights( superpoly_list *lights ) {
// REIL lighting // REIL lighting
if ( rwy.reil[side] ) { if ( rwy.reil[side] ) {
TGSuperPoly s = gen_reil( recip ); TGSuperPoly s = gen_reil( rwy.reil[side], recip );
lights->push_back( s ); lights->push_back( s );
} }

View file

@ -161,7 +161,7 @@ private:
superpoly_list gen_runway_threshold_lights( const int kind, bool recip ); superpoly_list gen_runway_threshold_lights( const int kind, bool recip );
superpoly_list gen_runway_center_line_lights( bool recip ); superpoly_list gen_runway_center_line_lights( bool recip );
TGSuperPoly gen_touchdown_zone_lights( bool recip ); TGSuperPoly gen_touchdown_zone_lights( bool recip );
TGSuperPoly gen_reil( bool recip ); TGSuperPoly gen_reil( const int kind, bool recip );
superpoly_list gen_calvert( const string &kind, bool recip ); superpoly_list gen_calvert( const string &kind, bool recip );
superpoly_list gen_alsf( const string &kind, bool recip ); superpoly_list gen_alsf( const string &kind, bool recip );
TGSuperPoly gen_odals( bool recip ); TGSuperPoly gen_odals( bool recip );