24 #ifndef _SkyX_CloudsManager_H_
25 #define _SkyX_CloudsManager_H_
48 Ogre::Vector2 WindDirection;
50 Ogre::Real TimeMultiplier;
53 Ogre::Real DistanceAttenuation;
55 Ogre::Real DetailAttenuation;
57 Ogre::Real HeightVolume;
59 Ogre::Real VolumetricDisplacement;
67 , WindDirection(Ogre::Vector2(1, 1))
68 , TimeMultiplier(0.125f)
69 , DistanceAttenuation(0.05f)
70 , DetailAttenuation(1)
72 , VolumetricDisplacement(0.01f)
82 Options(
const Ogre::Real& _Height,
83 const Ogre::Real& _Scale,
84 const Ogre::Vector2& _WindDirection,
85 const Ogre::Real& _TimeMultiplier)
88 , WindDirection(_WindDirection)
89 , TimeMultiplier(_TimeMultiplier)
90 , DistanceAttenuation(0.05f)
91 , DetailAttenuation(1)
93 , VolumetricDisplacement(0.01f)
108 Options(
const Ogre::Real& _Height,
109 const Ogre::Real& _Scale,
110 const Ogre::Vector2& _WindDirection,
111 const Ogre::Real& _TimeMultiplier,
112 const Ogre::Real& _DistanceAttenuation,
113 const Ogre::Real& _DetailAttenuation,
114 const Ogre::Real& _HeightVolume,
115 const Ogre::Real& _VolumetricDisplacement)
118 , WindDirection(_WindDirection)
119 , TimeMultiplier(_TimeMultiplier)
120 , DistanceAttenuation(_DistanceAttenuation)
121 , DetailAttenuation(_DetailAttenuation)
122 , HeightVolume(_HeightVolume)
123 , VolumetricDisplacement(_VolumetricDisplacement)
138 CloudLayer(
SkyX *s,
const Options& o);
147 inline void setOptions(
const Options& o)
150 _updatePassParameters();
156 inline const Options& getOptions()
const
164 inline void setAmbientGradient(
const ColorGradient& AmbientGradient)
166 mAmbientGradient = AmbientGradient;
172 inline const ColorGradient& getAmbientGradient()
const
174 return mAmbientGradient;
180 inline void setSunGradient(
const ColorGradient& SunGradient)
182 mSunGradient = SunGradient;
188 inline const ColorGradient& getSunGradient()
const
196 void _registerCloudLayer(Ogre::Pass* CloudLayerPass);
204 void _updateInternalPassParameters();
209 void _updatePassParameters();
218 Ogre::Pass *mCloudLayerPass;
221 ColorGradient mAmbientGradient;
222 ColorGradient mSunGradient;
231 CloudsManager(
SkyX *h);
245 CloudLayer* add(
const CloudLayer::Options& o);
249 void remove(CloudLayer *cl);
262 void unregister(CloudLayer* cl);
266 void unregisterAll();
271 inline const std::vector<CloudLayer*>& getCloudLayers()
const
281 std::vector<CloudLayer*> mCloudLayers;
284 std::vector<CloudLayer*>::iterator CloudLayersIt;
SkyX(Ogre::SceneManager *sm, Controller *c)
Contructor.
class __declspec(dllimport) BasicController void update(const Ogre::Real &simDeltaTime)
Basic controller class.
#define DllExport
Include external headers.
Definition: Prerequisites.h:45