Caelum
CloudSystem.h
1 /*
2 This file is part of Caelum.
3 See http://www.ogre3d.org/wiki/index.php/Caelum
4 
5 Copyright (c) 2008 Caelum team. See Contributors.txt for details.
6 
7 Caelum is free software: you can redistribute it and/or modify
8 it under the terms of the GNU Lesser General Public License as published
9 by the Free Software Foundation, either version 3 of the License, or
10 (at your option) any later version.
11 
12 Caelum is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU Lesser General Public License for more details.
16 
17 You should have received a copy of the GNU Lesser General Public License
18 along with Caelum. If not, see <http://www.gnu.org/licenses/>.
19 */
20 
21 #ifndef CAELUM__CLOUD_SYSTEM_H
22 #define CAELUM__CLOUD_SYSTEM_H
23 
24 #include "CaelumPrerequisites.h"
25 
26 namespace Caelum
27 {
31  class CAELUM_EXPORT CloudSystem
32  {
33  public:
34  CloudSystem (
35  Ogre::SceneManager *sceneMgr,
36  Ogre::SceneNode *cloudRoot);
37 
38  ~CloudSystem();
39 
40  typedef std::vector<FlatCloudLayer*> LayerVector;
41 
42  private:
43  Ogre::SceneManager *mSceneMgr;
44  Ogre::SceneNode *mCloudRoot;
45  LayerVector mLayers;
46 
47  public:
50  LayerVector& getLayerVector() { return mLayers; }
51 
53  void clearLayers();
54 
57  FlatCloudLayer* createLayer();
58 
61  FlatCloudLayer* createLayerAtHeight(Ogre::Real height);
62 
64  void addLayer(FlatCloudLayer* layer);
65 
67  inline FlatCloudLayer* getLayer(int index) { return mLayers[index]; }
68 
70  inline int getLayerCount() { return static_cast<int> (mLayers.size ()); }
71 
74  void update (
75  Ogre::Real timePassed,
76  const Ogre::Vector3 &sunDirection,
77  const Ogre::ColourValue &sunLightColour,
78  const Ogre::ColourValue &fogColour,
79  const Ogre::ColourValue &sunSphereColour);
80 
82  virtual void forceLayerQueryFlags (uint flags);
83 
85  virtual void forceLayerVisibilityFlags (uint flags);
86  };
87 }
88 
89 #endif // CAELUM__CLOUD_SYSTEM_H
FlatCloudLayer * getLayer(int index)
Get a pointer to a certain layer.
Definition: CloudSystem.h:67
int getLayerCount()
Get the total number of layers.
Definition: CloudSystem.h:70
A flat cloud layer; drawn as a simple plane.
A cloud system is implemented by a number of cloud layers.
Definition: CloudSystem.h:31
LayerVector & getLayerVector()
Direct access to the layer vector.
Definition: CloudSystem.h:50
Caelum namespace.
Definition: Astronomy.cpp:24