OpenMW
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
terraindrawable.hpp
Go to the documentation of this file.
1 #ifndef OPENMW_COMPONENTS_TERRAIN_DRAWABLE_H
2 #define OPENMW_COMPONENTS_TERRAIN_DRAWABLE_H
3 
4 #include <osg/Geometry>
5 
6 namespace osgUtil
7 {
8  class CullVisitor;
9 }
10 
11 namespace SceneUtil
12 {
13  class LightListCallback;
14 }
15 
16 namespace Terrain
17 {
18 
22  class TerrainDrawable : public osg::Geometry
23  {
24  public:
25  virtual osg::Object* cloneType() const { return new TerrainDrawable (); }
26  virtual osg::Object* clone(const osg::CopyOp& copyop) const { return new TerrainDrawable (*this,copyop); }
27  virtual bool isSameKindAs(const osg::Object* obj) const { return dynamic_cast<const TerrainDrawable *>(obj)!=NULL; }
28  virtual const char* className() const { return "TerrainDrawable"; }
29  virtual const char* libraryName() const { return "Terrain"; }
30 
32  TerrainDrawable(const TerrainDrawable& copy, const osg::CopyOp& copyop);
33 
34  virtual void accept(osg::NodeVisitor &nv);
35  void cull(osgUtil::CullVisitor* cv);
36 
37  typedef std::vector<osg::ref_ptr<osg::StateSet> > PassVector;
38  void setPasses (const PassVector& passes);
39 
40  void setLightListCallback(SceneUtil::LightListCallback* lightListCallback);
41 
42  virtual void compileGLObjects(osg::RenderInfo& renderInfo) const;
43 
44  private:
46 
47  osg::ref_ptr<SceneUtil::LightListCallback> mLightListCallback;
48  };
49 
50 }
51 
52 
53 #endif
void cull(osgUtil::CullVisitor *cv)
Definition: terraindrawable.cpp:41
Definition: lightmanager.hpp:157
void copy(const btTransform &src, Nif::Transformation &dst)
Definition: testbulletnifloader.cpp:269
virtual void accept(osg::NodeVisitor &nv)
Definition: terraindrawable.cpp:22
void setPasses(const PassVector &passes)
Definition: terraindrawable.cpp:67
Definition: terraindrawable.hpp:22
virtual osg::Object * cloneType() const
Definition: terraindrawable.hpp:25
virtual const char * className() const
Definition: terraindrawable.hpp:28
TerrainDrawable()
Definition: terraindrawable.cpp:10
std::vector< osg::ref_ptr< osg::StateSet > > PassVector
Definition: terraindrawable.hpp:37
virtual bool isSameKindAs(const osg::Object *obj) const
Definition: terraindrawable.hpp:27
osg::ref_ptr< SceneUtil::LightListCallback > mLightListCallback
Definition: terraindrawable.hpp:47
virtual osg::Object * clone(const osg::CopyOp &copyop) const
Definition: terraindrawable.hpp:26
void setLightListCallback(SceneUtil::LightListCallback *lightListCallback)
Definition: terraindrawable.cpp:72
virtual const char * libraryName() const
Definition: terraindrawable.hpp:29
PassVector mPasses
Definition: terraindrawable.hpp:45
virtual void compileGLObjects(osg::RenderInfo &renderInfo) const
Definition: terraindrawable.cpp:77