1
0
Fork 0

Port runway lights over to the new framework

This commit is contained in:
Christian Schmitt 2011-10-04 11:42:12 +02:00
parent 6a6052f2f5
commit ce08e218f6
5 changed files with 280 additions and 372 deletions

View file

@ -6,6 +6,7 @@ add_executable(genapts850
convex_hull.hxx convex_hull.cxx
elevations.cxx elevations.hxx
global.hxx
lights.cxx
linearfeature.hxx linearfeature.cxx
main.cxx
parser.hxx parser.cxx

File diff suppressed because it is too large Load diff

View file

@ -1,47 +0,0 @@
// lights.hxx -- Generate runway lighting
//
// Written by Curtis Olson, started February 2002.
//
// Copyright (C) 2002 Curtis L. Olson - http://www.flightgear.org/~curt
//
// This program is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 2 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
//
// $Id: lights.hxx,v 1.8 2004-11-19 22:25:49 curt Exp $
//
#ifndef _RWY_LIGHTS_HXX
#define _RWY_LIGHTS_HXX
#include <Polygon/polygon.hxx>
#include <Polygon/superpoly.hxx>
#include "runway.hxx"
#include "texparams.hxx"
// generate runway lighting
void gen_runway_lights( const TGRunway& rwy_info, float alt_m,
superpoly_list &lights, TGPolygon *apt_base );
// generate taxiway lighting
void gen_taxiway_lights( const TGRunway& taxiway_info, float alt_m,
superpoly_list &lights );
// generate light objects
void gen_airport_lightobj( const TGLightobj& rwy_light, float alt_m, superpoly_list &lights );
#endif // _RWY_LIGHTS_HXX

View file

@ -412,6 +412,7 @@ int Runway::BuildBtg( float alt_m, superpoly_list* rwy_polys, texparams_list* te
case 2: // concrete
SG_LOG( SG_GENERAL, SG_ALERT, "Build Runway: asphalt or concrete" << rwy.surface);
gen_rwy( alt_m, material, rwy_polys, texparams, accum );
gen_runway_lights( alt_m, rwy_lights, apt_base );
break;
case 3: // Grass
@ -419,6 +420,7 @@ int Runway::BuildBtg( float alt_m, superpoly_list* rwy_polys, texparams_list* te
case 5: // Gravel
SG_LOG( SG_GENERAL, SG_ALERT, "Build Runway: Turf, Dirt or Gravel" << rwy.surface );
gen_simple_rwy( alt_m, material, rwy_polys, texparams, accum );
gen_runway_lights( alt_m, rwy_lights, apt_base );
break;
case 12: // dry lakebed

View file

@ -42,9 +42,8 @@ public:
int tz_lights[2];
int reil[2];
};
typedef std::vector < TGRunway > runway_list;
TGRunway rwy;
TGRunway rwy;
Runway(char* def);
@ -81,16 +80,16 @@ private:
void gen_number_block( const std::string& material,
TGPolygon poly, double heading, int num,
double start_pct, double end_pct,
superpoly_list *rwy_polys,
texparams_list *texparams,
TGPolygon *accum );
superpoly_list* rwy_polys,
texparams_list* texparams,
TGPolygon* accum );
// generate the runway overrun area
void gen_runway_overrun( const TGPolygon& runway_half,
int rwhalf,
const std::string& prefix,
superpoly_list *rwy_polys,
texparams_list *texparams,
superpoly_list* rwy_polys,
texparams_list* texparams,
TGPolygon* accum );
// generate a section of runway
@ -101,24 +100,39 @@ private:
double heading,
const std::string& prefix,
const std::string& material,
superpoly_list *rwy_polys,
texparams_list *texparams,
TGPolygon *accum );
superpoly_list* rwy_polys,
texparams_list* texparams,
TGPolygon* accum );
void gen_simple_rwy( double alt_m, const string& material, superpoly_list *rwy_polys, texparams_list *texparams, TGPolygon *accum );
void gen_rwy( double alt_m,
const std::string& material,
superpoly_list *rwy_polys,
texparams_list *texparams,
TGPolygon *accum );
superpoly_list* rwy_polys,
texparams_list* texparams,
TGPolygon* accum );
void gen_rw_marking( const TGPolygon& runway,
double &start1_pct, double &end1_pct,
double heading,
const string& material,
superpoly_list *rwy_polys,
texparams_list *texparams,
TGPolygon *accum, int marking);
superpoly_list* rwy_polys,
texparams_list* texparams,
TGPolygon* accum, int marking);
void gen_runway_lights( float alt_m, superpoly_list* lights, TGPolygon* apt_base );
Point3D gen_runway_light_vector( double angle, bool recip );
superpoly_list gen_runway_edge_lights( bool recip );
superpoly_list gen_taxiway_edge_lights( const int kind, bool recip );
superpoly_list gen_runway_threshold_lights( const int kind, float alt_m, bool recip );
superpoly_list gen_runway_center_line_lights( bool recip );
TGSuperPoly gen_touchdown_zone_lights( float alt_m, bool recip );
TGSuperPoly gen_reil( float alt_m, bool recip );
superpoly_list gen_calvert( float alt_m, const string &kind, bool recip );
superpoly_list gen_alsf( float alt_m, const string &kind, bool recip );
TGSuperPoly gen_odals( float alt_m, bool recip );
superpoly_list gen_ssalx( float alt_m, const string& kind, bool recip );
superpoly_list gen_malsx( float alt_m, const string& kind, bool recip );
};
typedef std::vector <Runway *> RunwayList;