OpenCOVER
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
coVRShadowManager.h
Go to the documentation of this file.
1 /* This file is part of COVISE.
2 
3  You can use it under the terms of the GNU Lesser General Public License
4  version 2.1 or later, see lgpl-2.1.txt.
5 
6  * License: LGPL 2+ */
7 
8 #ifndef COVR_SHADOW_MANAGER_H
9 #define COVR_SHADOW_MANAGER_H
10 
23 #include <util/coExport.h>
24 #include <osgShadow/ShadowedScene>
25 #include <osgShadow/ShadowMap>
26 #include <osgShadow/ShadowTexture>
27 #include <osgShadow/SoftShadowMap>
28 #include <osgShadow/StandardShadowMap>
29 #include <osgShadow/MinimalShadowMap>
30 #include <osgShadow/LightSpacePerspectiveShadowMap>
31 
32 namespace opencover
33 {
34 class COVEREXPORT coVRShadowManager
35 {
36 public:
38  static coVRShadowManager *instance();
39  osgShadow::ShadowedScene *newScene();
40 
41  void setLight(osg::LightSource *ls);
42 
43  void setTechnique(const std::string &tech);
44  std::string getTechnique();
45  void setSoftnessWidth(float w);
46  void setJitteringScale(float s);
47  void setTextureSize(osg::Vec2s ts);
48 
49 private:
50 
52  std::string technique;
53  static coVRShadowManager* inst;
54  osg::ref_ptr<osgShadow::ShadowTexture> st;
55  osg::ref_ptr<osgShadow::SoftShadowMap> softSM;
56  osg::ref_ptr<osgShadow::StandardShadowMap> standardSM;
57  osg::ref_ptr<osgShadow::MinimalShadowMap> lspsm;
58  osg::ref_ptr<osgShadow::MinimalShadowMap> lspsmcb;
59  osg::ref_ptr<osgShadow::MinimalShadowMap> lspsmdb;
60  osg::ref_ptr<osgShadow::ShadowMap> shadowMap;
61  osg::ref_ptr<osg::LightSource> lightSource;
62 };
63 
64 }
65 #endif
Definition: coVRShadowManager.h:34