00001 #ifndef _GFX_CLODTERRAINDRAWABLE_ 00002 #define _GFX_CLODTERRAINDRAWABLE_ 00003 00004 #include <osg/BoundingBox> 00005 #include <osg/StateSet> 00006 #include <osg/State> 00007 #include <osg/Drawable> 00008 #include <gfx/CLODTerrainRenderer> 00009 00010 00011 namespace demeter { 00012 00013 using gfx::CLODTerrainRenderer; 00014 00015 class DemeterDrawable : public osg::Drawable 00016 { 00017 public: 00018 DemeterDrawable(); 00019 DemeterDrawable(const DemeterDrawable&,const osg::CopyOp& copyop=osg::CopyOp::SHALLOW_COPY); 00020 virtual ~DemeterDrawable(); 00021 00022 META_Object(gfx,DemeterDrawable) 00023 00024 void SetTerrain(CLODTerrainRenderer* pTerrain); 00025 DemeterDrawable& operator=(const DemeterDrawable&) ; 00026 // virtual const char* className() const; 00027 /// Demeter does not currently support display lists - see Demeter source for discussion 00028 void setUseDisplayList(const bool flag); 00029 virtual void drawImplementation(osg::State&) const; 00030 protected: 00031 virtual bool computeBound() const; 00032 mutable osg::ref_ptr<Terrain> m_RefTerrain; 00033 }; 00034 00035 } 00036 00037 namespace gfx { 00038 00039 typedef demeter::DemeterDrawable CLODTerrainDrawable; 00040 00041 } 00042 00043 #endif