00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 
00009 
00010 
00011 
00012 
00013 
00014 
00015 
00016 
00017 
00018 
00019 
00020 
00021 #include <osg/ref_ptr>
00022 #include <osg/Vec4>
00023 #include <osg/Referenced>
00024 #include <osg/StateSet>
00025 
00026 
00027 #include <simgear/structure/Singleton.hxx>
00028 #include <simgear/scene/util/SGUpdateVisitor.hxx>
00029 
00030 namespace simgear
00031 {
00032 class GroundLightManager : public ReferencedSingleton<GroundLightManager> {
00033 public:
00034     GroundLightManager();
00035     osg::StateSet* getRunwayLightStateSet() { return runwayLightSS.get(); }
00036     osg::StateSet* getTaxiLightStateSet() { return taxiLightSS.get(); }
00037     osg::StateSet* getGroundLightStateSet() { return groundLightSS.get(); }
00038     
00039     
00040     void update (const SGUpdateVisitor* updateVisitor);
00041     unsigned getLightNodeMask(const SGUpdateVisitor* updateVisitor);
00042 protected:
00043     osg::ref_ptr<osg::StateSet> runwayLightSS;
00044     osg::ref_ptr<osg::StateSet> taxiLightSS;
00045     osg::ref_ptr<osg::StateSet> groundLightSS;
00046 };
00047 }