00001 
00002 
00003 
00004 
00005 
00006 
00007 
00008 
00009 
00010 
00011 
00012 
00013 
00014 
00015 
00016 
00017 #ifndef SIMGEAR_EFFECT_GEODE_HXX
00018 #define SIMGEAR_EFFECT_GEODE_HXX 1
00019 
00020 #include <osg/Geode>
00021 
00022 #include "Effect.hxx"
00023 
00024 namespace simgear
00025 {
00026 class EffectGeode : public osg::Geode
00027 {
00028 public:
00029     EffectGeode();
00030     EffectGeode(const EffectGeode& rhs,
00031                 const osg::CopyOp& copyop = osg::CopyOp::SHALLOW_COPY);
00032     META_Node(simgear,EffectGeode);
00033     Effect* getEffect() const { return _effect.get(); }
00034     void setEffect(Effect* effect);
00035     virtual void resizeGLObjectBuffers(unsigned int maxSize);
00036     virtual void releaseGLObjects(osg::State* = 0) const;
00037     typedef DrawableList::iterator DrawablesIterator;
00038     DrawablesIterator drawablesBegin() { return _drawables.begin(); }
00039     DrawablesIterator drawablesEnd() { return _drawables.end(); }
00040 private:
00041     osg::ref_ptr<Effect> _effect;
00042 };
00043 }
00044 #endif