OSG  3.4.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
ShadowTexture.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_SHADOWETEXTURE
15 #define OSGSHADOW_SHADOWETEXTURE 1
16 
17 #include <osg/Camera>
18 #include <osg/Material>
19 
20 #include <osgShadow/ShadowTechnique>
21 
22 namespace osgShadow {
23 
26 {
27  public :
28  ShadowTexture();
29 
31 
33 
35  void setTextureUnit(unsigned int unit);
36 
38  unsigned int getTextureUnit() const { return _textureUnit; }
39 
40 
42  virtual void init();
43 
45  virtual void update(osg::NodeVisitor& nv);
46 
48  virtual void cull(osgUtil::CullVisitor& cv);
49 
51  virtual void cleanSceneGraph();
52 
53 
54  protected :
55 
56  virtual ~ShadowTexture() {}
57 
63  unsigned int _textureUnit;
64 };
65 
66 }
67 
68 #endif
osg::ref_ptr< osg::Material > _material
Definition: ShadowTexture.h:62
unsigned int getTextureUnit() const
Definition: ShadowTexture.h:38
#define OSGSHADOW_EXPORT
Definition: Export.h:39
#define META_Object(library, name)
Definition: Object.h:42
osg::ref_ptr< osg::Camera > _camera
Definition: ShadowTexture.h:58
osg::ref_ptr< osg::TexGen > _texgen
Definition: ShadowTexture.h:59
osg::ref_ptr< osg::Texture2D > _texture
Definition: ShadowTexture.h:60
osg::ref_ptr< osg::StateSet > _stateset
Definition: ShadowTexture.h:61