]> git.mxchange.org Git - flightgear.git/blobdiff - src/Instrumentation/groundradar.hxx
small cleanup to vivian's patch
[flightgear.git] / src / Instrumentation / groundradar.hxx
index ad8aa33710af9bd95f5c657a18be45ae899050c7..dc653f2c4d3666b47ec88b9db375bf0d707b1de9 100644 (file)
@@ -1,12 +1,12 @@
 //  groundradar.hxx - Background layer for the ATC radar.
 //
-//  Written by Csaba Halasz.
+//  Copyright (C) 2007 Csaba Halasz.
 //
 //  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
@@ -25,6 +25,9 @@
 #include <simgear/props/props.hxx>
 #include "od_gauge.hxx"
 
+// forward decls
+class FGRunwayBase;
+
 ////////////////////////////////////////////////////////////////////////
 // Built-in layer for the atc radar.
 ////////////////////////////////////////////////////////////////////////
 class GroundRadar : public SGPropertyChangeListener, public FGODGauge
 {
 public:
+    static const int TextureHalfSize = 256;
     GroundRadar(SGPropertyNode* node);
     virtual ~GroundRadar();
     void updateTexture();
     virtual void valueChanged(SGPropertyNode*);
 
 protected:
-    osg::ref_ptr<osg::Geometry> _geom;
+    void createTexture(const char* texture_name);
+    
+    void addRunwayVertices(const FGRunwayBase* aRunway, double aTowerLat, double aTowerLon, double aScale, osg::Vec3Array* aVertices);
+    osg::Geometry *addPavementGeometry(const FGPavement* aPavement, double aTowerLat, double aTowerLon, double aScale);
+    
+    osg::ref_ptr<osg::Geode> _geode;
     SGPropertyNode_ptr _airport_node;
-    SGPropertyNode_ptr _radar_node;
-
-    void createTexture();
+    SGPropertyNode_ptr _range_node;
 };
 
 #endif // __INST_GROUNDRADAR_HXX