1 // GroundLightManager.hxx - manage StateSets for point lights
3 // Copyright (C) 2007 Tim Moore timoore@redhat.com
4 // Copyright (C) 2006-2007 Mathias Froehlich
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.
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.
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.
21 #include <osg/ref_ptr>
23 #include <osg/Referenced>
24 #include <osg/StateSet>
27 #include <simgear/structure/Singleton.hxx>
28 #include <simgear/scene/util/SGUpdateVisitor.hxx>
32 class GroundLightManager : public ReferencedSingleton<GroundLightManager> {
35 osg::StateSet* getRunwayLightStateSet() { return runwayLightSS.get(); }
36 osg::StateSet* getTaxiLightStateSet() { return taxiLightSS.get(); }
37 osg::StateSet* getGroundLightStateSet() { return groundLightSS.get(); }
38 // The SGUpdateVisitor manages various environmental properties,
40 void update (const SGUpdateVisitor* updateVisitor);
41 unsigned getLightNodeMask(const SGUpdateVisitor* updateVisitor);
43 osg::ref_ptr<osg::StateSet> runwayLightSS;
44 osg::ref_ptr<osg::StateSet> taxiLightSS;
45 osg::ref_ptr<osg::StateSet> groundLightSS;