]> git.mxchange.org Git - simgear.git/blob - simgear/scene/material/EffectGeode.hxx
Terrasync: make whitespace in pathnames work under windows
[simgear.git] / simgear / scene / material / EffectGeode.hxx
1 // Copyright (C) 2008  Timothy Moore timoore@redhat.com
2 //
3 // This program is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU General Public License as
5 // published by the Free Software Foundation; either version 2 of the
6 // License, or (at your option) any later version.
7 //
8 // This program is distributed in the hope that it will be useful, but
9 // WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
11 // General Public License for more details.
12 //
13 // You should have received a copy of the GNU General Public License
14 // along with this program; if not, write to the Free Software
15 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
16
17 #ifndef SIMGEAR_EFFECT_GEODE_HXX
18 #define SIMGEAR_EFFECT_GEODE_HXX 1
19
20 #include <osg/Geode>
21
22 #include "Effect.hxx"
23
24 namespace simgear
25 {
26 class EffectGeode : public osg::Geode
27 {
28 public:
29     EffectGeode();
30     EffectGeode(const EffectGeode& rhs,
31                 const osg::CopyOp& copyop = osg::CopyOp::SHALLOW_COPY);
32     META_Node(simgear,EffectGeode);
33     Effect* getEffect() const { return _effect.get(); }
34     void setEffect(Effect* effect);
35     virtual void resizeGLObjectBuffers(unsigned int maxSize);
36     virtual void releaseGLObjects(osg::State* = 0) const;
37     typedef DrawableList::iterator DrawablesIterator;
38     DrawablesIterator drawablesBegin() { return _drawables.begin(); }
39     DrawablesIterator drawablesEnd() { return _drawables.end(); }
40     void runGenerators(osg::Geometry *geometry);
41 private:
42     osg::ref_ptr<Effect> _effect;
43 };
44 }
45 #endif