Caelum
CaelumDefaultTypeDescriptorData.cpp
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 #include "CaelumPrecompiled.h"
22 #include "CaelumPrerequisites.h"
23 
24 #if CAELUM_TYPE_DESCRIPTORS
25 
26 #include "TypeDescriptor.h"
27 #include "CaelumSystem.h"
28 #include "FlatCloudLayer.h"
29 
30 using namespace Ogre;
31 
32 namespace Caelum
33 {
34  CaelumDefaultTypeDescriptorData::CaelumDefaultTypeDescriptorData ():
35  CaelumSystemTypeDescriptor(0),
36  PointStarfieldTypeDescriptor(0),
37  BaseSkyLightTypeDescriptor(0),
38  GroundFogTypeDescriptor(0),
39  PrecipitationTypeDescriptor(0),
40  DepthComposerTypeDescriptor(0),
41  FlatCloudLayerTypeDescriptor(0),
42  SkyDomeTypeDescriptor(0)
43  {
44  try {
45  load ();
46  } catch (...) {
47  unload ();
48  throw;
49  }
50  }
51 
52  CaelumDefaultTypeDescriptorData::~CaelumDefaultTypeDescriptorData ()
53  {
54  unload ();
55  }
56 
57  template<class T>
58  inline void delete_zero(T*& member) {
59  // Remember: delete 0 is a legal no-op.
60  delete member;
61  member = 0;
62  }
63 
64  void CaelumDefaultTypeDescriptorData::unload ()
65  {
66  delete_zero(CaelumSystemTypeDescriptor);
67  delete_zero(PointStarfieldTypeDescriptor);
68  delete_zero(BaseSkyLightTypeDescriptor);
69  delete_zero(GroundFogTypeDescriptor);
70  delete_zero(PrecipitationTypeDescriptor);
71  delete_zero(DepthComposerTypeDescriptor);
72  delete_zero(FlatCloudLayerTypeDescriptor);
73  delete_zero(SkyDomeTypeDescriptor);
74  }
75 
76  void CaelumDefaultTypeDescriptorData::load ()
77  {
78  if (!CaelumSystemTypeDescriptor)
79  {
80  std::auto_ptr<DefaultTypeDescriptor> td (new DefaultTypeDescriptor ());
81 
82  // Timing settings.
83  td->add("time_scale",
84  new AccesorPropertyDescriptor<Caelum::CaelumSystem, Real, Real, Real>(
85  &Caelum::CaelumSystem::getTimeScale,
86  &Caelum::CaelumSystem::setTimeScale));
87  td->add("julian_day",
88  new AccesorPropertyDescriptor<Caelum::CaelumSystem, LongReal, LongReal, LongReal>(
89  &Caelum::CaelumSystem::getJulianDay,
90  &Caelum::CaelumSystem::setJulianDay));
91 
92  // Latitude/longitude
93  td->add("latitude",
94  new AccesorPropertyDescriptor<Caelum::CaelumSystem, Degree, Degree, const Degree>(
97  td->add("longitude",
98  new AccesorPropertyDescriptor<Caelum::CaelumSystem, Degree, Degree, const Degree>(
101 
102  // Fog settings.
103  td->add("global_fog_density_multiplier",
104  new AccesorPropertyDescriptor<Caelum::CaelumSystem, Real, Real, Real>(
107  td->add("global_fog_colour_multiplier",
108  new AccesorPropertyDescriptor<Caelum::CaelumSystem, ColourValue>(
111  td->add("manage_scene_fog_mode",
112  new AccesorPropertyDescriptor<Caelum::CaelumSystem, Ogre::FogMode, Ogre::FogMode, Ogre::FogMode>(
115  td->add("manage_scene_start",
116  new AccesorPropertyDescriptor<Caelum::CaelumSystem, Ogre::Real, Ogre::Real, Ogre::Real>(
117  &Caelum::CaelumSystem::getManageSceneFogStart,
118  &Caelum::CaelumSystem::setManageSceneFogStart));
119  td->add("manage_scene_end",
120  new AccesorPropertyDescriptor<Caelum::CaelumSystem, Ogre::Real, Ogre::Real, Ogre::Real>(
121  &Caelum::CaelumSystem::getManageSceneFogEnd,
122  &Caelum::CaelumSystem::setManageSceneFogEnd));
123  td->add("scene_fog_density_multiplier",
124  new AccesorPropertyDescriptor<Caelum::CaelumSystem, Real, Real, Real>(
127  td->add("scene_fog_colour_multiplier",
128  new AccesorPropertyDescriptor<Caelum::CaelumSystem, ColourValue>(
131  td->add("ground_fog_density_multiplier",
132  new AccesorPropertyDescriptor<Caelum::CaelumSystem, Real, Real, Real>(
135  td->add("ground_fog_colour_multiplier",
136  new AccesorPropertyDescriptor<Caelum::CaelumSystem, ColourValue>(
139 
140  // Lighting settings.
141  td->add("manage_ambient_light",
142  new AccesorPropertyDescriptor<Caelum::CaelumSystem, bool, bool, bool>(
145  td->add("minimum_ambient_light",
146  new AccesorPropertyDescriptor<Caelum::CaelumSystem, ColourValue>(
149  td->add("ensure_single_light_source",
150  new AccesorPropertyDescriptor<Caelum::CaelumSystem, bool, bool, bool>(
153  td->add("ensure_single_shadow_source",
154  new AccesorPropertyDescriptor<Caelum::CaelumSystem, bool, bool, bool>(
157 
158  CaelumSystemTypeDescriptor = td.release ();
159  }
160 
161  if (!PointStarfieldTypeDescriptor)
162  {
163  std::auto_ptr<DefaultTypeDescriptor> td (new DefaultTypeDescriptor ());
164  td->add("magnitude_scale",
165  new AccesorPropertyDescriptor<Caelum::PointStarfield, Real, Real, Real>(
166  &Caelum::PointStarfield::getMagnitudeScale,
168  td->add("mag0_pixel_size",
169  new AccesorPropertyDescriptor<Caelum::PointStarfield, Real, Real, Real>(
170  &Caelum::PointStarfield::getMag0PixelSize,
171  &Caelum::PointStarfield::setMag0PixelSize));
172  td->add("min_pixel_size",
173  new AccesorPropertyDescriptor<Caelum::PointStarfield, Real, Real, Real>(
174  &Caelum::PointStarfield::getMinPixelSize,
175  &Caelum::PointStarfield::setMinPixelSize));
176  td->add("max_pixel_size",
177  new AccesorPropertyDescriptor<Caelum::PointStarfield, Real, Real, Real>(
178  &Caelum::PointStarfield::getMaxPixelSize,
179  &Caelum::PointStarfield::setMaxPixelSize));
180  td->add("latitude",
181  new AccesorPropertyDescriptor<Caelum::PointStarfield, Degree, Degree, Degree>(
182  &Caelum::PointStarfield::getObserverLatitude,
183  &Caelum::PointStarfield::setObserverLatitude));
184  td->add("longitude",
185  new AccesorPropertyDescriptor<Caelum::PointStarfield, Degree, Degree, Degree>(
186  &Caelum::PointStarfield::getObserverLongitude,
187  &Caelum::PointStarfield::setObserverLongitude));
188  td->add("observer_position_rebuild_delta",
189  new AccesorPropertyDescriptor<Caelum::PointStarfield, Degree, Degree, Degree>(
191  &Caelum::PointStarfield::setObserverPositionRebuildDelta));
192  PointStarfieldTypeDescriptor = td.release ();
193  }
194 
195  if (!BaseSkyLightTypeDescriptor)
196  {
197  std::auto_ptr<DefaultTypeDescriptor> td (new DefaultTypeDescriptor ());
198  td->add("ambient_multiplier",
199  new AccesorPropertyDescriptor<Caelum::BaseSkyLight, ColourValue>(
202  td->add("specular_multiplier",
203  new AccesorPropertyDescriptor<Caelum::BaseSkyLight, ColourValue>(
206  td->add("diffuse_multiplier",
207  new AccesorPropertyDescriptor<Caelum::BaseSkyLight, ColourValue>(
210  td->add("light_colour",
211  new AccesorPropertyDescriptor<Caelum::BaseSkyLight, ColourValue>(
214  td->add("body_colour",
215  new AccesorPropertyDescriptor<Caelum::BaseSkyLight, ColourValue>(
218  td->add("auto_disable_threshold",
219  new AccesorPropertyDescriptor<Caelum::BaseSkyLight, Real, Real, Real>(
222  td->add("auto_disable",
223  new AccesorPropertyDescriptor<Caelum::BaseSkyLight, bool, bool, bool>(
226  BaseSkyLightTypeDescriptor = td.release ();
227  }
228 
229  if (!GroundFogTypeDescriptor)
230  {
231  std::auto_ptr<DefaultTypeDescriptor> td (new DefaultTypeDescriptor ());
232  td->add("density",
233  new AccesorPropertyDescriptor<Caelum::GroundFog, Real, Real, Real>(
236  td->add("vertical_decay",
237  new AccesorPropertyDescriptor<Caelum::GroundFog, Real, Real, Real>(
240  td->add("ground_level",
241  new AccesorPropertyDescriptor<Caelum::GroundFog, Real, Real, Real>(
244  td->add("colour",
245  new AccesorPropertyDescriptor<Caelum::GroundFog, ColourValue>(
248  GroundFogTypeDescriptor = td.release ();
249  }
250 
251  if (!DepthComposerTypeDescriptor)
252  {
253  std::auto_ptr<DefaultTypeDescriptor> td (new DefaultTypeDescriptor ());
254  td->add("debug_depth_render",
255  new AccesorPropertyDescriptor<Caelum::DepthComposer, bool, bool, bool>(
256  &Caelum::DepthComposer::getDebugDepthRender,
258 
259  // Legacy haze
260  td->add("haze_enabled",
261  new AccesorPropertyDescriptor<Caelum::DepthComposer, bool, bool, bool>(
262  &Caelum::DepthComposer::getSkyDomeHazeEnabled,
264  td->add("haze_colour",
265  new AccesorPropertyDescriptor<Caelum::DepthComposer, ColourValue>(
266  &Caelum::DepthComposer::getHazeColour,
267  &Caelum::DepthComposer::setHazeColour));
268  td->add("haze_sun_direction",
269  new AccesorPropertyDescriptor<Caelum::DepthComposer, Vector3>(
270  &Caelum::DepthComposer::getSunDirection,
271  &Caelum::DepthComposer::setSunDirection));
272 
273  // Ground fog
274  td->add("ground_fog_enabled",
275  new AccesorPropertyDescriptor<Caelum::DepthComposer, bool, bool, bool>(
276  &Caelum::DepthComposer::getGroundFogEnabled,
278  td->add("ground_fog_density",
279  new AccesorPropertyDescriptor<Caelum::DepthComposer, Real, Real, Real>(
282  td->add("ground_fog_vertical_decay",
283  new AccesorPropertyDescriptor<Caelum::DepthComposer, Real, Real, Real>(
286  td->add("ground_fog_base_level",
287  new AccesorPropertyDescriptor<Caelum::DepthComposer, Real, Real, Real>(
290  td->add("ground_fog_colour",
291  new AccesorPropertyDescriptor<Caelum::DepthComposer, ColourValue>(
294 
295  DepthComposerTypeDescriptor = td.release ();
296  }
297 
298  if (!PrecipitationTypeDescriptor)
299  {
300  std::auto_ptr<DefaultTypeDescriptor> td (new DefaultTypeDescriptor ());
301 
302  td->add("texture",
303  new AccesorPropertyDescriptor<Caelum::PrecipitationController, String>(
304  &Caelum::PrecipitationController::getTextureName,
305  &Caelum::PrecipitationController::setTextureName));
306  td->add("precipitation_colour",
307  new AccesorPropertyDescriptor<Caelum::PrecipitationController, ColourValue>(
308  &Caelum::PrecipitationController::getColour,
310  td->add("falling_speed",
311  new AccesorPropertyDescriptor<Caelum::PrecipitationController, Real, Real, Real>(
312  &Caelum::PrecipitationController::getSpeed,
314  td->add("wind_speed",
315  new AccesorPropertyDescriptor<Caelum::PrecipitationController, Vector3>(
316  &Caelum::PrecipitationController::getWindSpeed,
318  td->add("camera_speed_scale",
319  new AccesorPropertyDescriptor<Caelum::PrecipitationController, Vector3>(
320  &Caelum::PrecipitationController::getCameraSpeedScale,
322  td->add("intensity",
323  new AccesorPropertyDescriptor<Caelum::PrecipitationController, Real, Real, Real>(
324  &Caelum::PrecipitationController::getIntensity,
326  td->add("auto_disable_intensity",
327  new AccesorPropertyDescriptor<Caelum::PrecipitationController, Real, Real, Real>(
328  &Caelum::PrecipitationController::getAutoDisableThreshold,
330  td->add("falling_direction",
331  new AccesorPropertyDescriptor<Caelum::PrecipitationController, Vector3>(
332  &Caelum::PrecipitationController::getFallingDirection,
334 
335  PrecipitationTypeDescriptor = td.release ();
336  }
337 
338  if (!FlatCloudLayerTypeDescriptor)
339  {
340  std::auto_ptr<DefaultTypeDescriptor> td (new DefaultTypeDescriptor ());
341 
342  // Height.
343  td->add("height",
344  new AccesorPropertyDescriptor<Caelum::FlatCloudLayer, Real, Real, Real>(
347 
348  // Coverage parameters.
349  td->add("coverage",
350  new AccesorPropertyDescriptor<Caelum::FlatCloudLayer, Real, Real, Real>(
353  td->add("cloud_cover_visibility_threshold",
354  new AccesorPropertyDescriptor<Caelum::FlatCloudLayer, Real, Real, Real>(
357  td->add("cloud_cover_lookup",
358  new AccesorPropertyDescriptor<Caelum::FlatCloudLayer, String>(
361 
362  // Overwritten by CaelumSystem; included for completeness.
363  td->add("sun_direction",
364  new AccesorPropertyDescriptor<Caelum::FlatCloudLayer, Vector3>(
365  &Caelum::FlatCloudLayer::getSunDirection,
366  &Caelum::FlatCloudLayer::setSunDirection));
367  td->add("sun_light_colour",
368  new AccesorPropertyDescriptor<Caelum::FlatCloudLayer, ColourValue>(
369  &Caelum::FlatCloudLayer::getSunLightColour,
370  &Caelum::FlatCloudLayer::setSunLightColour));
371  td->add("sun_sphere_colour",
372  new AccesorPropertyDescriptor<Caelum::FlatCloudLayer, ColourValue>(
373  &Caelum::FlatCloudLayer::getSunSphereColour,
374  &Caelum::FlatCloudLayer::setSunSphereColour));
375  td->add("fog_colour",
376  new AccesorPropertyDescriptor<Caelum::FlatCloudLayer, ColourValue>(
377  &Caelum::FlatCloudLayer::getFogColour,
378  &Caelum::FlatCloudLayer::setFogColour));
379 
380  // Moving noise textures.
381  td->add("cloud_speed",
382  new AccesorPropertyDescriptor<Caelum::FlatCloudLayer, Vector2>(
385 
386  // Blending time between noise textures.
387  td->add("blend_time",
388  new AccesorPropertyDescriptor<Caelum::FlatCloudLayer, Real, Real, Real>(
391 
392  // Mesh properties
393  td->add("mesh_width",
394  new AccesorPropertyDescriptor<Caelum::FlatCloudLayer, Real, Real, Real>(
395  &Caelum::FlatCloudLayer::getMeshWidth,
397  td->add("mesh_height",
398  new AccesorPropertyDescriptor<Caelum::FlatCloudLayer, Real, Real, Real>(
399  &Caelum::FlatCloudLayer::getMeshHeight,
400  &Caelum::FlatCloudLayer::setMeshHeight));
401  td->add("mesh_width_segments",
402  new AccesorPropertyDescriptor<Caelum::FlatCloudLayer, int, int, int>(
403  &Caelum::FlatCloudLayer::getMeshWidthSegments,
404  &Caelum::FlatCloudLayer::setMeshWidthSegments));
405  td->add("mesh_height_segments",
406  new AccesorPropertyDescriptor<Caelum::FlatCloudLayer, int, int, int>(
407  &Caelum::FlatCloudLayer::getMeshHeightSegments,
408  &Caelum::FlatCloudLayer::setMeshHeightSegments));
409 
410  // Misc hacks
411  td->add("cloud_uv_factor",
412  new AccesorPropertyDescriptor<Caelum::FlatCloudLayer, Real, Real, Real>(
415  td->add("height_red_factor",
416  new AccesorPropertyDescriptor<Caelum::FlatCloudLayer, Real, Real, Real>(
419 
420  // Fading
421  td->add("near_fade_dist",
422  new AccesorPropertyDescriptor<Caelum::FlatCloudLayer, Real, Real, Real>(
425  td->add("far_fade_dist",
426  new AccesorPropertyDescriptor<Caelum::FlatCloudLayer, Real, Real, Real>(
429  td->add("fade_dist_measurement_vector",
430  new AccesorPropertyDescriptor<Caelum::FlatCloudLayer, Vector3>(
433 
434  FlatCloudLayerTypeDescriptor = td.release ();
435  }
436 
437  if (!SkyDomeTypeDescriptor)
438  {
439  std::auto_ptr<DefaultTypeDescriptor> td (new DefaultTypeDescriptor ());
440 
441  // SkyDome is slightly special because most properties are write-only.
442 
443  // Reset by CaelumSystem every frame anyway
444  td->add("sun_direction",
445  new AccesorPropertyDescriptor<Caelum::SkyDome, Ogre::Vector3>(
447  td->add("haze_colour",
448  new AccesorPropertyDescriptor<Caelum::SkyDome, Ogre::ColourValue>(
450 
451  // Different files not supported anyway
452  td->add("sky_gradients_image",
453  new AccesorPropertyDescriptor<Caelum::SkyDome, Ogre::String>(
455  td->add("atmosphere_depth_image",
456  new AccesorPropertyDescriptor<Caelum::SkyDome, Ogre::String>(
458 
459  // This does actually make sense.
460  td->add("haze_enabled",
461  new AccesorPropertyDescriptor<Caelum::SkyDome, bool, bool, bool>(
464 
465  SkyDomeTypeDescriptor = td.release ();
466  }
467  }
468 }
469 
470 #endif // CAELUM_TYPE_DESCRIPTORS
const Ogre::Vector3 getFadeDistMeasurementVector() const
Get the value set by setFadeDistMeasurementVector.
Ogre::Real getCloudUVFactor() const
void setManageSceneFog(Ogre::FogMode f)
Enables/disables Caelum managing standard Ogre::Scene fog.
Real getGroundFogVerticalDecay() const
Get ground fog density.
void setAutoDisableThreshold(Real value)
Automatically disable compositors when intensity is low.
void setFadeDistMeasurementVector(const Ogre::Vector3 &value)
Set on which components is the fade distance measured.
Ogre::Real getAutoDisableThreshold() const
Get the auto-disable threshold.
Definition: SkyLight.h:146
void setGroundLevel(Ogre::Real GroundLevela)
Sets the ground level.
Definition: GroundFog.cpp:150
void setAutoDisableThreshold(Ogre::Real value)
Set the auto-disable threshold.
Definition: SkyLight.h:149
void setObserverLongitude(Ogre::Degree value)
Set the observer&#39;s longitude. East is positive, west is negative.
Definition: CaelumSystem.h:369
void setCloudCoverLookup(const Ogre::String &fileName)
Set the image used to lookup the cloud coverage threshold.
void setEnsureSingleShadowSource(bool value)
Ensure only one of caelum&#39;s light sources casts shadows (the brightest).
Definition: CaelumSystem.h:584
void setGroundFogVerticalDecay(Real value)
Sets ground fog vertical decay.
void setDiffuseMultiplier(const Ogre::ColourValue &diffuse)
Set diffuse multiplier for light colour.
Definition: SkyLight.cpp:121
Ogre::Real getFarFadeDist() const
Get fade distance (see setFadeDistances).
void setMinimumAmbientLight(const Ogre::ColourValue &value)
Set the minimum value for scene ambient lighting, This is only used if getManageAmbientLight() is tru...
Definition: CaelumSystem.h:565
void setFarFadeDist(const Ogre::Real value)
Set only far fade distance (see setFadeDistances).
const Ogre::ColourValue getGroundFogColourMultiplier() const
See setGroundFogColourMultiplier.
Definition: CaelumSystem.h:529
Ogre::Real getCloudBlendTime() const
Gets the time it takes to blend two cloud shaped together, in seconds.
const Ogre::Vector2 getCloudSpeed() const
Gets cloud movement speed.
const Ogre::ColourValue getDiffuseMultiplier() const
Set diffuse multiplier for light colour.
Definition: SkyLight.cpp:125
const Ogre::ColourValue getColour() const
Gets fog colour.
Definition: GroundFog.cpp:132
Ogre::Real getHeightRedFactor() const
const Ogre::ColourValue getGlobalFogColourMultiplier() const
See setGlobalFogColourMultiplier.
Definition: CaelumSystem.h:550
void setDensity(Ogre::Real density)
Sets the fog density multiplier.
Definition: GroundFog.cpp:103
Ogre::FogMode getManageSceneFog() const
Tells if Caelum is managing the fog or not.
void setHeight(Ogre::Real height)
Set the height of the cloud layer.
void setCameraSpeedScale(const Ogre::Vector3 &value)
Automatically scale camera speed.
void setDebugDepthRender(bool value)
Enables drawing the depth buffer.
void setGroundFogColour(const Ogre::ColourValue &value)
Sets ground fog colour.
const Ogre::ColourValue getAmbientMultiplier() const
Set ambient multiplier for light colour.
Definition: SkyLight.cpp:141
Real getGlobalFogDensityMultiplier() const
Get the value set by setSceneFogDensityMultiplier.
void setSpeed(Real value)
Precipitation speed (affects direction). Part of a preset.
Real getSceneFogDensityMultiplier() const
Get the value set by setSceneFogDensityMultiplier.
bool getManageAmbientLight() const
Check if CaelumSystem is managing ambient lighting.
Definition: CaelumSystem.h:559
const Ogre::ColourValue getGroundFogColour() const
Get ground fog colour.
void setGroundFogColourMultiplier(const Ogre::ColourValue &value)
Set an additional multiplier for ground fog colour as it comes from SkyColourModel.
Definition: CaelumSystem.h:526
Ogre::Real getHeight() const
Get the height of the cloud layer.
void setIntensity(Real value)
Precipitation intensity.
bool getHazeEnabled() const
If skydome haze is enabled.
Definition: SkyDome.cpp:118
void setSceneFogColourMultiplier(const Ogre::ColourValue &value)
Set an additional multiplier for fog colour as it comes from SkyColourModel.
Definition: CaelumSystem.h:506
void setGroundFogBaseLevel(Real value)
Sets ground fog level At ground level fogginess is equal to GroundFogDensity.
void setObserverLatitude(Ogre::Degree value)
Set the observer&#39;s latitude. North is positive, south is negative.
Definition: CaelumSystem.h:375
void setFallingDirection(const Ogre::Vector3 &value)
The basic direction for falling precipitation.
const Ogre::ColourValue getLightColour() const
Get current light colour, as set in setLightColour.
Definition: SkyLight.cpp:117
void setSpecularMultiplier(const Ogre::ColourValue &specular)
Set specular multiplier for light colour.
Definition: SkyLight.cpp:129
Ogre::Real getCloudCover() const
Gets the current cloud cover.
void setGroundFogDensityMultiplier(Real value)
Multiplier for ground fog density (default 1).
virtual void setBodyColour(const Ogre::ColourValue &colour)
Sets the colour to draw the light&#39;s body with.
Definition: SkyLight.cpp:89
void setGlobalFogDensityMultiplier(Real value)
Multiplier for global fog density (default 1).
const Ogre::Degree getObserverLatitude() const
Get the observer&#39;s latitude. North is positive, south is negative.
Definition: CaelumSystem.h:372
void setCloudBlendTime(const Ogre::Real value)
Sets the time it takes to blend two cloud shaped together, in seconds.
void setAtmosphereDepthImage(const Ogre::String &gradients)
Set the atmosphere depthh gradient image.
Definition: SkyDome.cpp:105
Real getGroundFogDensityMultiplier() const
Get the value set by setGroundFogDensityMultiplier.
const Ogre::ColourValue getMinimumAmbientLight() const
Definition: CaelumSystem.h:568
void setGlobalFogColourMultiplier(const Ogre::ColourValue &value)
Set an additional multiplier for fog colour.
Definition: CaelumSystem.h:547
void setSceneFogDensityMultiplier(Real value)
Multiplier for scene fog density (default 1).
void setCloudCoverVisibilityThreshold(const Ogre::Real value)
Set cloud cover visiblity threshold.
const Ogre::ColourValue getSceneFogColourMultiplier() const
See setSceneFogColourMultiplier.
Definition: CaelumSystem.h:509
void setGroundFogEnabled(bool value)
Enables exponential ground fog.
void setColour(const Ogre::ColourValue &colour)
Sets fog colour.
Definition: GroundFog.cpp:117
void setWindSpeed(const Ogre::Vector3 &value)
Wind speed and direction.
void setMagnitudeScale(Ogre::Real value)
Magnitude power scale.
const Ogre::String getCloudCoverLookupFileName() const
Get the filename of the cloud cover lookup image.
void setManageAmbientLight(bool value)
Set this to true to have CaelumSystem manage the scene&#39;s ambient light.
Definition: CaelumSystem.h:556
void setMeshWidth(Real value)
void setCloudCover(const Ogre::Real cloudCover)
Sets cloud cover, between 0 (completely clear) and 1 (completely covered)
Ogre::Real getCloudCoverVisibilityThreshold() const
Get cloud cover visiblity threshold.
Ogre::Real getNearFadeDist() const
Get near fade distance (see setFadeDistances).
const Ogre::ColourValue getSpecularMultiplier() const
Set specular multiplier for light colour.
Definition: SkyLight.cpp:133
Real getGroundFogDensity() const
Get ground fog density.
void setNearFadeDist(const Ogre::Real value)
Set only near fade distance (see setFadeDistances).
void setHazeColour(const Ogre::ColourValue &hazeColour)
Explicit haze colour.
Definition: SkyDome.cpp:83
void setAutoDisable(bool value)
Turn on and off auto-disabling of the light when too dim.
Definition: SkyLight.h:143
Real getGroundFogBaseLevel() const
Get ground fog density.
bool getAutoDisable() const
Check if the light is automatically disabled.
Definition: SkyLight.h:136
bool getEnsureSingleShadowSource() const
See setEnsureSingleShadowSource.
Definition: CaelumSystem.h:587
Ogre::Degree getObserverPositionRebuildDelta() const
Moving the observer position around causes a starfield rebuild.
bool getEnsureSingleLightSource() const
See setEnsureSingleLightSource.
Definition: CaelumSystem.h:579
const Ogre::Degree getObserverLongitude() const
Get the observer&#39;s longitude. East is positive, west is negative.
Definition: CaelumSystem.h:366
void setSkyGradientsImage(const Ogre::String &gradients)
Set the sky color gradients image.
Definition: SkyDome.cpp:89
void setHazeEnabled(bool value)
Enable or disable skydome haze.
Definition: SkyDome.cpp:122
virtual void setLightColour(const Ogre::ColourValue &colour)
Sets the skylight colour.
Definition: SkyLight.cpp:98
void setEnsureSingleLightSource(bool value)
Ensure only one of caelum&#39;s light sources is active at a time (the brightest).
Definition: CaelumSystem.h:576
void setVerticalDecay(Ogre::Real verticalDecay)
Sets the vertical fog decay constant.
Definition: GroundFog.cpp:136
void setSkyDomeHazeEnabled(bool value)
Enables skydome haze.
Ogre::Real getDensity() const
Get the fog density multiplier.
Definition: GroundFog.cpp:113
void setAmbientMultiplier(const Ogre::ColourValue &ambient)
Set ambient multiplier for light colour This value is only stored here; the SceneManager is not touch...
Definition: SkyLight.cpp:137
void setCloudSpeed(const Ogre::Vector2 &cloudSpeed)
Sets cloud movement speed.
Ogre::Real getVerticalDecay() const
Get the vertical fog decay constant.
Definition: GroundFog.cpp:146
Ogre::Real getGroundLevel() const
Get the ground level.
Definition: GroundFog.cpp:160
void setHeightRedFactor(const Ogre::Real value)
High-altitude clouds are tinted red in the evening.
void setCloudUVFactor(const Ogre::Real value)
Cloud texture coordinates are multiplied with this.
Caelum namespace.
Definition: Astronomy.cpp:24
void setGroundFogDensity(Real value)
Sets ground fog density.
void setSunDirection(const Ogre::Vector3 &dir)
Sets the sun direction.
Definition: SkyDome.cpp:70
void setColour(const Ogre::ColourValue &color)
Precipitation color. Part of a preset.
const Ogre::ColourValue getBodyColour() const
Get current body colour, as set in setBodyColour.
Definition: SkyLight.cpp:94