[airport] Refactor, Modernize
This commit is contained in:
parent
40ecb4048c
commit
48e80937c9
2 changed files with 1178 additions and 1157 deletions
File diff suppressed because it is too large
Load diff
|
@ -15,6 +15,7 @@
|
|||
#include "runway.hxx"
|
||||
#include "taxiway.hxx"
|
||||
|
||||
|
||||
class Airport
|
||||
{
|
||||
public:
|
||||
|
@ -26,14 +27,14 @@ public:
|
|||
runways.push_back(runway);
|
||||
}
|
||||
|
||||
void AddWaterRunway(std::shared_ptr<WaterRunway> waterrunway)
|
||||
void AddWaterRunway(std::shared_ptr<WaterRunway> runway)
|
||||
{
|
||||
waterrunways.push_back(waterrunway);
|
||||
waterRunways.push_back(runway);
|
||||
}
|
||||
|
||||
void AddObj(std::shared_ptr<LightingObj> lightobj)
|
||||
void AddObj(std::shared_ptr<LightingObj> lightObj)
|
||||
{
|
||||
lightobjects.push_back(lightobj);
|
||||
lightObjects.push_back(lightObj);
|
||||
}
|
||||
|
||||
void AddHelipad(std::shared_ptr<Helipad> helipad)
|
||||
|
@ -58,19 +59,19 @@ public:
|
|||
|
||||
void AddFeatures(FeatureList feature_list)
|
||||
{
|
||||
for (auto feature : feature_list) {
|
||||
for (auto& feature : feature_list) {
|
||||
features.push_back(feature);
|
||||
}
|
||||
}
|
||||
|
||||
int NumFeatures(void)
|
||||
int NumFeatures() const
|
||||
{
|
||||
return features.size();
|
||||
}
|
||||
|
||||
void AddBoundary(std::shared_ptr<ClosedPoly> bndry)
|
||||
void AddBoundary(std::shared_ptr<ClosedPoly> boundary)
|
||||
{
|
||||
boundary.push_back(bndry);
|
||||
boundaries.push_back(boundary);
|
||||
}
|
||||
|
||||
void AddWindsock(std::shared_ptr<Windsock> windsock)
|
||||
|
@ -88,7 +89,7 @@ public:
|
|||
signs.push_back(sign);
|
||||
}
|
||||
|
||||
std::string GetIcao()
|
||||
std::string GetIcao() const
|
||||
{
|
||||
return icao;
|
||||
}
|
||||
|
@ -111,8 +112,6 @@ public:
|
|||
void merge_slivers(tgpolygon_list& polys, tgcontour_list& slivers);
|
||||
void BuildBtg(const std::string& root, const string_list& elev_src);
|
||||
|
||||
void DumpStats(void);
|
||||
|
||||
void set_debug(std::string& path,
|
||||
debug_map& dbg_runways,
|
||||
debug_map& dbg_pavements,
|
||||
|
@ -126,13 +125,13 @@ public:
|
|||
debug_features = dbg_features;
|
||||
};
|
||||
|
||||
bool isDebugRunway(int i);
|
||||
bool isDebugPavement(int i);
|
||||
bool isDebugTaxiway(int i);
|
||||
bool isDebugFeature(int i);
|
||||
bool isDebugRunway(int) const;
|
||||
bool isDebugPavement(int) const;
|
||||
bool isDebugTaxiway(int) const;
|
||||
bool isDebugFeature(int) const;
|
||||
|
||||
private:
|
||||
bool CheckZFightingTriangles(const char* prefix, const char* debug_root, const tgPolygon& base_poly, const tgpolygon_list& rwy_polys, const tgpolygon_list& pvmt_polys);
|
||||
bool CheckZFightingTriangles(const std::string& prefix, const std::string& debug_root, const tgPolygon& base_poly, const tgpolygon_list& rwy_polys, const tgpolygon_list& pvmt_polys);
|
||||
|
||||
int code; // airport, heliport or sea port
|
||||
int altitude; // in meters
|
||||
|
@ -142,14 +141,14 @@ private:
|
|||
PavementList pavements;
|
||||
FeatureList features;
|
||||
RunwayList runways;
|
||||
WaterRunwayList waterrunways;
|
||||
WaterRunwayList waterRunways;
|
||||
TaxiwayList taxiways;
|
||||
LightingObjList lightobjects;
|
||||
LightingObjList lightObjects;
|
||||
WindsockList windsocks;
|
||||
BeaconList beacons;
|
||||
SignList signs;
|
||||
HelipadList helipads;
|
||||
PavementList boundary;
|
||||
PavementList boundaries;
|
||||
|
||||
// stats
|
||||
SGTimeStamp build_time;
|
||||
|
|
Loading…
Add table
Reference in a new issue