Rigs of Rods 2023.09
Soft-body Physics Simulation
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Loading...
Searching...
No Matches
VCloudsManager.h
Go to the documentation of this file.
1/*
2--------------------------------------------------------------------------------
3This source file is part of SkyX.
4Visit http://www.paradise-studios.net/products/skyx/
5
6Copyright (C) 2009-2012 Xavier Vergu�n Gonz�lez <xavyiy@gmail.com>
7
8This program is free software; you can redistribute it and/or modify it under
9the terms of the GNU Lesser General Public License as published by the Free Software
10Foundation; either version 2 of the License, or (at your option) any later
11version.
12
13This program is distributed in the hope that it will be useful, but WITHOUT
14ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
15FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
16
17You should have received a copy of the GNU Lesser General Public License along with
18this program; if not, write to the Free Software Foundation, Inc., 59 Temple
19Place - Suite 330, Boston, MA 02111-1307, USA, or go to
20http://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
32namespace SkyX
33{
34 class SkyX;
35
37 {
38 public:
43
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
122 inline void setAutoupdate(const bool& Autoupdate)
123 {
124 mAutoupdate = Autoupdate;
126 }
127
131 inline const bool& getAutoupdate() const
132 {
133 return mAutoupdate;
134 }
135
139 inline void setWindSpeed(const Ogre::Real& WindSpeed)
140 {
141 mWindSpeed = WindSpeed;
143 }
144
148 inline const Ogre::Real& getWindSpeed() const
149 {
150 return mWindSpeed;
151 }
152
156 {
157 return mVClouds;
158 }
159
163 inline const bool& isCreated() const
164 {
165 return mCreated;
166 }
167
172
173 private:
176 void _setLightParameters();
177
181
184
186 Ogre::Vector2 mHeight;
187
191 Ogre::Real mWindSpeed;
192
195
198
201 };
202}
203
204#endif
const ColorGradient & getAmbientGradient() const
Get ambient color gradient.
void setAutoupdate(const bool &Autoupdate)
Autoupdate volumetric clouds wind depending of the SkyX time multiplier.
const bool & getAutoupdate() const
Get autoupdate.
Ogre::Vector2 mHeight
Height parameters, x = Cloud field y-coord start, y: Field height (both in world coordinates)
bool mCreated
Is vclouds manager created?
ColorGradient mAmbientGradient
Ambient and Sun color gradients.
void setAmbientGradient(const ColorGradient &AmbientGradient)
Set ambient gradient.
void remove()
Remove all resources.
const ColorGradient & getSunGradient() const
Get sun color gradient.
const Ogre::Real & getWindSpeed() const
Get wind speed.
SkyX * mSkyX
SkyX parent pointer.
Ogre::Real mCurrentTimeSinceLastFrame
Current time since last frame.
bool mAutoupdate
Autoupdate wind speed depending of skyx time multiplier?
void create(const Ogre::Real &radius=-1)
Create all resources.
void _updateWindSpeedConfig()
Update wind speed config.
void update(const Ogre::Real &timeSinceLastFrame)
Update.
void setSunGradient(const ColorGradient &SunGradient)
Set sun gradient.
VClouds::VClouds * getVClouds()
Get VClouds.
void notifyCameraRender(Ogre::Camera *c)
Notify camera render, to be invoked per-camera and per-frame.
void setWindSpeed(const Ogre::Real &WindSpeed)
Set wind speed.
const Ogre::Vector2 & getHeight() const
Get height parameters.
~VCloudsManager()
Destructor.
ColorGradient mSunGradient
Ogre::Real mWindSpeed
Wind speed.
const bool & isCreated() const
Is moon manager created?
VClouds::VClouds * mVClouds
VClouds pointer.
void _setLightParameters()
Set light parameters.
void setHeight(const Ogre::Vector2 &Height)
Set height parameters.