CloudyDay
 All Classes Functions Variables Enumerations
Skydome.h
1 #pragma once
2 #include <osg/Vec3>
3 #include <osg/Matrix>
4 #include <osg/StateSet>
5 #define PI 3.14159265
6 
7 namespace osgCloudyDay
8 {
9  class Skydome
10  {
11  public:
12  Skydome(void);
13  virtual ~Skydome(void)=0;
14 
15  /*
16  * Returns the actual lightposition
17  * @return light position
18  */
19  osg::Vec3 GetLightPosition();
20  /*
21  * Sets the light position
22  * @param pos new position of the light
23  */
24  void SetLightPosition(osg::Vec3 pos);
25 
26  /*
27  * This method returns the weighting factor between scene and the light scattering effect
28  * @return inverse wavelength
29  */
30  float GetLightScatteringWeight();
31  /*
32  * This method sets the the weighting factor between scene and the light scattering effect
33  * @param weight weighting factor
34  */
35  void SetLightScatteringWeight(float weight);
36 
37  /*
38  * This method returns the density factor for light scattering.
39  * @return density
40  */
41  float GetDensity();
42  /*
43  * This method sets the the density factor for light scattering.
44  * @param density weighting factor
45  */
46  void SetDensity(float weight);
47 
48  /*
49  * This method returns the decay factor for lightscattering
50  * @return decay factor for lightscattering
51  */
52  float GetDecay();
53  /*
54  * This method sets the the decay factor for light scattering
55  * @param decay factor for lightscattering
56  */
57  void SetDecay(float weight);
58 
59 
60  /*
61  * This method returns the exposure factor
62  * @return exposure factor
63  */
64  float GetExposure();
65  /*
66  * This method sets the the exposure factor
67  * @param exposure exporure factor for Tone Mapping
68  */
69  void SetExposure(float exposure);
70 
71  virtual void SetupUniform(osg::StateSet* nodess4) = 0;
72 
73  private:
74  osg::Vec3 m_lightPos;
75 
76  float m_weight;
77  float m_exposure;
78  float m_density;
79  float m_decay;
80 
81  };
82 }