// 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
#include <osg/Geometry>
#include <simgear/props/props.hxx>
#include "od_gauge.hxx"
+#include <simgear/structure/subsystem_mgr.hxx>
+
+// forward decls
+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:
- 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