OSG  3.4.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
ShadowTechnique.h
Go to the documentation of this file.
1 /* -*-c++-*- OpenSceneGraph - Copyright (C) 1998-2006 Robert Osfield
2  *
3  * This library is open source and may be redistributed and/or modified under
4  * the terms of the OpenSceneGraph Public License (OSGPL) version 0.0 or
5  * (at your option) any later version. The full license is in LICENSE file
6  * included with this distribution, and on the openscenegraph.org website.
7  *
8  * This library is distributed in the hope that it will be useful,
9  * but WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11  * OpenSceneGraph Public License for more details.
12 */
13 
14 #ifndef OSGSHADOW_SHADOWEDTECHNIQUE
15 #define OSGSHADOW_SHADOWEDTECHNIQUE 1
16 
17 #include <osg/buffered_value>
18 #include <osg/Camera>
19 #include <osg/Texture2D>
20 #include <osg/TexGenNode>
21 #include <osgUtil/CullVisitor>
22 
23 #include <osgShadow/Export>
24 
25 namespace osgShadow {
26 
27 // forward declare ShadowedScene
28 class ShadowedScene;
29 
32 {
33  public :
35 
37 
39 
40  ShadowedScene* getShadowedScene() { return _shadowedScene; }
41 
42  const ShadowedScene* getShadowedScene() const { return _shadowedScene; }
43 
45  virtual void init();
46 
48  virtual void update(osg::NodeVisitor& nv);
49 
51  virtual void cull(osgUtil::CullVisitor& cv);
52 
54  virtual void cleanSceneGraph();
55 
56  virtual void traverse(osg::NodeVisitor& nv);
57 
59  virtual void dirty() { _dirty = true; }
60 
61  protected :
62 
64  {
65  public:
66 
68 
69  virtual void operator()(osg::Node*, osg::NodeVisitor* nv);
70 
71  protected:
72 
74  };
75 
76  osg::Vec3 computeOrthogonalVector(const osg::Vec3& direction) const;
77 
78  virtual ~ShadowTechnique();
79 
80  friend class ShadowedScene;
81 
83  bool _dirty;
84 
85 };
86 
87 }
88 
89 #endif
ShadowedScene * _shadowedScene
const ShadowedScene * getShadowedScene() const
#define OSGSHADOW_EXPORT
Definition: Export.h:39
#define META_Object(library, name)
Definition: Object.h:42
ShadowedScene * getShadowedScene()
Definition: Node.h:71