CloudyDay
 All Classes Functions Variables Enumerations
CloudLayerState.h
1 #pragma once
2 #include <iostream>
3 #include <algorithm>
4 #include <string>
5 #include <vector>
6 #include <map>
7 #include <osg/Vec2>
8 #include <osg/Vec3>
9 #include <osg/Vec4>
10 #include <osg/Referenced>
11 
12 namespace osgCloudyDay
13 {
18  {
19  public:
23  CloudLayerState(void);
27  ~CloudLayerState(void);
28 
34  void AddLayer(unsigned int layer, unsigned int type);
40  std::vector<unsigned int> GetLayers();
41 
47  void SetType(unsigned int layer, unsigned int type);
53  int GetType(unsigned int layer);
54 
60  void setClot(unsigned int cloud_type, unsigned int clot);
66  int getClot(unsigned int cloud_type);
67 
73  void setVariance(unsigned int cloud_type, float v);
79  float getVariance(unsigned int cloud_type);
80 
86  void setMeasureOvercast(unsigned int cloud_type, float overcast);
92  float getMeasureOvercast(unsigned int cloud_type);
93 
99  void setColor(unsigned int cloud_type, osg::Vec4f v);
105  osg::Vec4f getColor(unsigned int cloud_type);
106 
112  void setOvercast(unsigned int cloud_type, float overcast);
118  float getOvercast(unsigned int cloud_type);
119 
125  void setHeight(unsigned int cloud_type, float height);
131  float getHeight(unsigned int cloud_type);
132 
138  unsigned int GetEstimationOfNumberOfCloudsOfLayer(unsigned int cloud_type);
139 
145  void setMiddlePoint(unsigned int cloud_type, osg::Vec3 middlepoint);
151  osg::Vec3 getMiddlePoint(unsigned int cloud_type);
152 
158  void setSize(unsigned int cloud_type, osg::Vec3 size);
164  osg::Vec3 getSize(unsigned int cloud_type);
165 
171  unsigned int getNumClouds(unsigned int cloud_type);
177  void setNumClouds(unsigned int cloud_type, unsigned int num_clouds);
178 
179  private:
180  std::vector<unsigned int> m_keys;
181 
182  std::map<unsigned int, int> m_type;
183 
184  std::map<unsigned int, float> m_overcast;
185  std::map<unsigned int, float> m_overcast_measure;
186  std::map<unsigned int, float> m_height;
187  std::map<unsigned int, unsigned int> m_numClouds;
188 
189  std::map<unsigned int, osg::Vec3> m_middlepoint;
190  std::map<unsigned int, osg::Vec3> m_size;
191  std::map<unsigned int, osg::Vec4> m_color;
192 
193  std::map<unsigned int, unsigned int> m_clot;
194  std::map<unsigned int, float> m_var;
195  };
196 }