]> git.mxchange.org Git - flightgear.git/blobdiff - src/Instrumentation/groundradar.hxx
Move viewer-related sources to separate folder.
[flightgear.git] / src / Instrumentation / groundradar.hxx
index 2a78cab5903552b342b2209f163410344cc72131..fb603be191dc650017dfeb4b494e09071bbd5b76 100644 (file)
 #include <osg/Geometry>
 #include <simgear/props/props.hxx>
 #include "od_gauge.hxx"
+#include <simgear/structure/subsystem_mgr.hxx>
 
 // forward decls
-class FGRunway;
+class FGRunwayBase;
 
 ////////////////////////////////////////////////////////////////////////
 // Built-in layer for the atc radar.
 ////////////////////////////////////////////////////////////////////////
 
-class GroundRadar : public SGPropertyChangeListener, public FGODGauge
+class GroundRadar : public SGSubsystem, public SGPropertyChangeListener, private FGODGauge
 {
 public:
+    static const int TextureHalfSize = 256;
     GroundRadar(SGPropertyNode* node);
     virtual ~GroundRadar();
     void updateTexture();
     virtual void valueChanged(SGPropertyNode*);
-
+    virtual void update (double dt);
 protected:
     void createTexture(const char* texture_name);
     
-    void addRunwayVertices(const FGRunway* aRunway, double aTowerLat, double aTowerLon, double aScale, osg::Vec3Array* aVertices);
+    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::Geometry> _geom;
+    osg::ref_ptr<osg::Geode> _geode;
     SGPropertyNode_ptr _airport_node;
     SGPropertyNode_ptr _range_node;
 };