]> git.mxchange.org Git - simgear.git/blob - simgear/scene/tgdb/GroundLightManager.hxx
Replace SG_USE_STD() by using std::
[simgear.git] / simgear / scene / tgdb / GroundLightManager.hxx
1 // GroundLightManager.hxx - manage StateSets for point lights
2 //
3 // Copyright (C) 2007  Tim Moore timoore@redhat.com
4 // Copyright (C) 2006-2007 Mathias Froehlich 
5 //
6 // This program is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU General Public License as
8 // published by the Free Software Foundation; either version 2 of the
9 // License, or (at your option) any later version.
10 //
11 // This program is distributed in the hope that it will be useful, but
12 // WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14 // General Public License for more details.
15 //
16 // You should have received a copy of the GNU General Public License
17 // along with this program; if not, write to the Free Software
18 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
19 //
20
21 #include <osg/ref_ptr>
22 #include <osg/Vec4>
23 #include <osg/Referenced>
24 #include <osg/StateSet>
25 #include <simgear/scene/util/SGUpdateVisitor.hxx>
26
27 namespace simgear
28 {
29 class GroundLightManager : public osg::Referenced {
30 public:
31     GroundLightManager();
32     osg::StateSet* getRunwayLightStateSet() { return runwayLightSS.get(); }
33     osg::StateSet* getTaxiLightStateSet() { return taxiLightSS.get(); }
34     osg::StateSet* getGroundLightStateSet() { return groundLightSS.get(); }
35     // The SGUpdateVisitor manages various environmental properties,
36     // so use it.
37     void update (const SGUpdateVisitor* updateVisitor);
38     unsigned getLightNodeMask(const SGUpdateVisitor* updateVisitor);
39     static GroundLightManager* instance();
40 protected:
41     osg::ref_ptr<osg::StateSet> runwayLightSS;
42     osg::ref_ptr<osg::StateSet> taxiLightSS;
43     osg::ref_ptr<osg::StateSet> groundLightSS;
44 };
45 }