All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
VCloudsManager.h
Go to the documentation of this file.
1 /*
2 --------------------------------------------------------------------------------
3 This source file is part of SkyX.
4 Visit http://www.paradise-studios.net/products/skyx/
5 
6 Copyright (C) 2009-2012 Xavier Verguín González <xavyiy@gmail.com>
7 
8 This program is free software; you can redistribute it and/or modify it under
9 the terms of the GNU Lesser General Public License as published by the Free Software
10 Foundation; either version 2 of the License, or (at your option) any later
11 version.
12 
13 This program is distributed in the hope that it will be useful, but WITHOUT
14 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
15 FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
16 
17 You should have received a copy of the GNU Lesser General Public License along with
18 this program; if not, write to the Free Software Foundation, Inc., 59 Temple
19 Place - Suite 330, Boston, MA 02111-1307, USA, or go to
20 http://www.gnu.org/copyleft/lesser.txt.
21 --------------------------------------------------------------------------------
22 */
23 
24 #ifndef _SkyX_VCloudsManager_H_
25 #define _SkyX_VCloudsManager_H_
26 
27 #include "Prerequisites.h"
28 
29 #include "VClouds/VClouds.h"
30 #include "ColorGradient.h"
31 
32 namespace SkyX
33 {
34  class SkyX;
35 
36  class DllExport VCloudsManager
37  {
38  public:
42  VCloudsManager(SkyX *s);
43 
46  ~VCloudsManager();
47 
51  void create(const Ogre::Real& radius = -1);
52 
56  void update(const Ogre::Real& timeSinceLastFrame);
57 
63  void notifyCameraRender(Ogre::Camera* c);
64 
67  void remove();
68 
72  inline void setAmbientGradient(const ColorGradient& AmbientGradient)
73  {
74  mAmbientGradient = AmbientGradient;
75  }
76 
80  inline const ColorGradient& getAmbientGradient() const
81  {
82  return mAmbientGradient;
83  }
84 
88  inline void setSunGradient(const ColorGradient& SunGradient)
89  {
90  mSunGradient = SunGradient;
91  }
92 
96  inline const ColorGradient& getSunGradient() const
97  {
98  return mSunGradient;
99  }
100 
106  inline void setHeight(const Ogre::Vector2& Height)
107  {
108  mHeight = Height;
109  }
110 
114  inline const Ogre::Vector2& getHeight() const
115  {
116  return mHeight;
117  }
118 
123  inline void setAutoupdate(const bool& Autoupdate)
124  {
125  mAutoupdate = Autoupdate;
126  _updateWindSpeedConfig();
127  }
128 
132  inline const bool& getAutoupdate() const
133  {
134  return mAutoupdate;
135  }
136 
140  inline void setWindSpeed(const Ogre::Real& WindSpeed)
141  {
142  mWindSpeed = WindSpeed;
143  _updateWindSpeedConfig();
144  }
145 
149  inline const Ogre::Real& getWindSpeed() const
150  {
151  return mWindSpeed;
152  }
153 
156  inline VClouds::VClouds* getVClouds()
157  {
158  return mVClouds;
159  }
160 
164  inline const bool& isCreated() const
165  {
166  return mCreated;
167  }
168 
172  void _updateWindSpeedConfig();
173 
174  private:
177  void _setLightParameters();
178 
180  SkyX *mSkyX;
181 
183  VClouds::VClouds* mVClouds;
184 
187  Ogre::Vector2 mHeight;
188 
190  Ogre::Real mWindSpeed;
191 
193  bool mAutoupdate;
194 
196  bool mCreated;
197 
199  Ogre::Real mCurrentTimeSinceLastFrame;
200 
202  ColorGradient mAmbientGradient;
203  ColorGradient mSunGradient;
204  };
205 }
206 
207 #endif
void create()
Create SkyX.
void notifyCameraRender(Ogre::Camera *c)
Notify camera render (to be invoked per camera and per frame)
SkyX(Ogre::SceneManager *sm, Controller *c)
Contructor.
bool mCreated
Is SkyX created?
Definition: SkyX.h:422
class __declspec(dllimport) BasicController void update(const Ogre::Real &simDeltaTime)
Basic controller class.
#define DllExport
Include external headers.
Definition: Prerequisites.h:45
bool isCreated() const
Is SkyX created?
Definition: SkyX.h:147