51 cloudsAnimationSpeed = 1.0f;
52 cloudsCeilingHeight = 100.0f;
53 cachedMoonTextureName =
"SkyX_Moon.png";
54 skyxOptions.RayleighMultiplier = 0.003075f;
55 skyxOptions.MieMultiplier = 0.00125f;
56 skyxOptions.InnerRadius = 5.92f;
57 skyxOptions.OuterRadius = 6.3311f;
58 skyxOptions.SunIntensity = 15;
60 skyLightningEnable =
false;
67 const Ogre::RenderSystemCapabilities* caps = Ogre::Root::getSingleton().getRenderSystem()->getCapabilities();
68 if (caps && caps->hasCapability(Ogre::RSC_TEXTURE_3D))
87 SO3_SAFE_DELETE(skyxManager);
90 SO3_SAFE_DELETE(layeredClouds);
91 SO3_SAFE_DELETE(volumetricClouds);
92 SO3_SAFE_DELETE(astronomicalModel);
107 skyxManager->create();
108 skyxManager->getMeshManager()->getEntity()->setVisibilityFlags(SO3_VISIBILITY_FLAG_INVISIBLE_ENVIRONMENT|SO3_VISIBILITY_MASK_VISIBLE_WATER_RTT);
111 skyxManager->getAtmosphereManager()->setOptions(skyxOptions);
115 skyxManager->getMeshManager()->setRadiusMultiplier(0.80f);
118 skyxManager->getMoonManager()->setMoonSize(0.120f);
122 SEnvironmentComponent::ViewportList::iterator iViewport = viewportList.begin();
123 while(iViewport != viewportList.end())
125 bool hasStereo = (*iViewport)->IsStereoViewportRegistered();
127 (*iViewport)->UnregisterStereoViewport();
132 (*iViewport)->RegisterStereoViewport();
137 if (volumetricClouds)
149 SEnvironmentComponent::ViewportList::iterator iViewport = viewportList.begin();
150 while(iViewport != viewportList.end())
152 bool hasStereo = (*iViewport)->IsStereoViewportRegistered();
154 (*iViewport)->UnregisterStereoViewport();
159 (*iViewport)->RegisterStereoViewport();
164 if (volumetricClouds)
170 skyxManager->remove();
171 SO3_SAFE_DELETE(skyxManager);
181 ogreViewport->getTarget()->removeListener(skyxManager);
182 ogreViewport->getTarget()->addListener(skyxManager);
192 if (volumetricClouds)
195 ogreViewport->getTarget()->removeListener(skyxManager);
204 viewport->getTarget()->removeListener(skyxManager);
205 viewport->getTarget()->addListener(skyxManager);
214 if (volumetricClouds)
217 viewport->getTarget()->removeListener(skyxManager);
224 if(skyxManager && volumetricClouds)
244 layeredClouds->
Update(updateTime);
247 if (volumetricClouds)
248 volumetricClouds->
Update(updateTime);
251 if(cachedMoonTextureName != moonNewTextureName)
255 Ogre::MaterialPtr moonMaterial =
static_cast<Ogre::MaterialPtr
> (Ogre::MaterialManager::getSingleton().getByName(skyxManager->getGPUManager()->getMoonMaterialName()));
258 Ogre::Material::Techniques techList = moonMaterial->getSupportedTechniques();
259 if(techList.size() > 0)
261 Ogre::Technique* ogreTechnique = techList[0];
262 Ogre::Pass* ogrePass = ogreTechnique->getPasses()[0];
265 Ogre::TextureUnitState* ogreTextureUnit = ogrePass->getTextureUnitState(0);
266 if(ogreTextureUnit != 0)
268 ogreTextureUnit->setTextureName(moonNewTextureName);
269 cachedMoonTextureName = moonNewTextureName;
275 catch(
const Ogre::Exception&)
283 skyxManager->setTimeMultiplier(0.0f);
288 if((speed > -1) && (speed < 1))
291 skyxManager->setTimeMultiplier(1.0f / SO3_SKY_DEFAULT_TIME_MULTIPLIER);
300 skyxManager->update(updateTime);
307 switch(componentType)
310 component = layeredClouds;
313 component = volumetricClouds;
316 OGRE_EXCEPT(Ogre::Exception::ERR_INVALIDPARAMS,
"Invalid sky component type requested!",
"SSky::GetComponent");
324 return volumetricClouds;
329 return layeredClouds;
334 return cloudsAnimationSpeed;
339 cloudsAnimationSpeed = animationSpeed;
344 return cloudsCeilingHeight;
349 float oldCloudCeiling = cloudsCeilingHeight;
351 std::vector<int>::iterator iLayerIndexes = layerIndexes.begin();
352 while(iLayerIndexes != layerIndexes.end())
355 cloudsCeilingHeight = newCloudCeiling;
357 cloudsCeilingHeight = oldCloudCeiling;
360 cloudsCeilingHeight = newCloudCeiling;
374 skyxManager->setLightingMode(SkyX::SkyX::LM_HDR);
380 skyxManager->setLightingMode(SkyX::SkyX::LM_LDR);
386 return skyLightningEnable;
393 SkyX::VCloudsManager* skyxVolumetricCloudsManager = skyxManager->getVCloudsManager();
394 SkyX::VClouds::VClouds* skyxVolumetricClouds = skyxVolumetricCloudsManager->getVClouds();
396 skyxVolumetricClouds->getLightningManager()->setEnabled(enable);
397 skyxVolumetricClouds->getLightningManager()->setAverageLightningApparitionTime(0.5f);
398 skyxVolumetricClouds->getLightningManager()->setLightningColor(Ogre::Vector3(1,0.976,0.92));
399 skyxVolumetricClouds->getLightningManager()->setLightningTimeMultiplier(2);
402 skyLightningEnable = enable;
409 SkyX::VCloudsManager* skyxVolumetricCloudsManager = skyxManager->getVCloudsManager();
410 SkyX::VClouds::VClouds* skyxVolumetricClouds = skyxVolumetricCloudsManager->getVClouds();
412 skyxVolumetricClouds->getLightningManager()->addLightning(from, dir, length);
425 skyComponentEnable =
false;
440 return skyComponentEnable;
454 skyComponentEnable = enable;
459 return componentType;
481 SkyX::SkyX* skyxManager = parentSky->GetSkyX();
486 CloudLayerOptionsMap::iterator iCloudLayerOptionsMap = cloudLayerOptionsMap.begin();
487 while(iCloudLayerOptionsMap != cloudLayerOptionsMap.end())
490 ApplyLayerOptions(iCloudLayerOptionsMap->first);
491 iCloudLayerOptionsMap++;
497 skyxManager->getCloudsManager()->removeAll();
499 cloudLayerMap.clear();
508 CloudLayerOptionsMap::iterator iCloudLayerOptionsMap = cloudLayerOptionsMap.begin();
509 while(iCloudLayerOptionsMap!=cloudLayerOptionsMap.end())
511 SkyX::CloudLayer::Options* skyxCloudLayerOptions = iCloudLayerOptionsMap->second;
512 skyxCloudLayerOptions->WindDirection = Ogre::Vector2(parentSky->GetEnvironment()->GetWindDirection().x, -parentSky->GetEnvironment()->GetWindDirection().y);
515 float environmentHumidity = parentSky->GetEnvironment()->GetHumidity();
516 skyxCloudLayerOptions->DetailAttenuation = 2.0f - (0.020f * environmentHumidity);
519 if(parentSky->GetEnvironment()->GetPaused())
520 skyxCloudLayerOptions->TimeMultiplier = 0.0f;
523 float speed = parentSky->GetEnvironment()->GetTimeSpeedFactor();
524 if((speed > -1) && (speed < 1))
527 skyxCloudLayerOptions->TimeMultiplier = -SO3_SKY_DEFAULT_TIME_MULTIPLIER * parentSky->GetEnvironment()->GetWindSpeed() * 0.1f;
529 skyxCloudLayerOptions->TimeMultiplier = SO3_SKY_DEFAULT_TIME_MULTIPLIER * parentSky->GetEnvironment()->GetWindSpeed() * 0.1f;
534 skyxCloudLayerOptions->TimeMultiplier = -SO3_SKY_DEFAULT_TIME_MULTIPLIER / speed * parentSky->GetEnvironment()->GetWindSpeed() * 0.1f;
536 skyxCloudLayerOptions->TimeMultiplier = SO3_SKY_DEFAULT_TIME_MULTIPLIER / speed * parentSky->GetEnvironment()->GetWindSpeed() * 0.1f;
541 ApplyLayerOptions(iCloudLayerOptionsMap->first);
542 iCloudLayerOptionsMap++;
547unsigned int SSky::CloudLayered::AddLayer(
const Ogre::Real& heightFromCloudCeiling,
const Ogre::Real& scale,
const Ogre::Real& distanceAttenuation,
const Ogre::Real& detailAttenuation,
const Ogre::Real& heightVolume,
const Ogre::Real& volumetricDisplacement)
550 unsigned int lowerIndex = 1;
551 if(!cloudLayerOptionsMap.empty())
553 bool lowerIndexFound =
false;
554 while(!lowerIndexFound)
556 if(cloudLayerOptionsMap.find(lowerIndex) != cloudLayerOptionsMap.end())
559 lowerIndexFound =
true;
564 SkyX::CloudLayer::Options* skyxCloudLayerOptions =
new SkyX::CloudLayer::Options();
565 skyxCloudLayerOptions->Height = parentSky->GetCloudCeiling() + heightFromCloudCeiling;
566 skyxCloudLayerOptions->Scale = scale;
567 skyxCloudLayerOptions->DistanceAttenuation = distanceAttenuation;
568 skyxCloudLayerOptions->DetailAttenuation = detailAttenuation;
569 skyxCloudLayerOptions->HeightVolume = heightVolume;
570 skyxCloudLayerOptions->VolumetricDisplacement = volumetricDisplacement;
571 skyxCloudLayerOptions->WindDirection = Ogre::Vector2(parentSky->GetEnvironment()->GetWindDirection().x, -parentSky->GetEnvironment()->GetWindDirection().y);
572 float speed = parentSky->GetEnvironment()->GetTimeSpeedFactor();
573 if((speed > -1) && (speed < 1))
576 skyxCloudLayerOptions->TimeMultiplier = -SO3_SKY_DEFAULT_TIME_MULTIPLIER * parentSky->GetEnvironment()->GetWindSpeed() * 0.1f;
578 skyxCloudLayerOptions->TimeMultiplier = SO3_SKY_DEFAULT_TIME_MULTIPLIER * parentSky->GetEnvironment()->GetWindSpeed() * 0.1f;
583 skyxCloudLayerOptions->TimeMultiplier = -SO3_SKY_DEFAULT_TIME_MULTIPLIER / speed * parentSky->GetEnvironment()->GetWindSpeed() * 0.1f;
585 skyxCloudLayerOptions->TimeMultiplier = SO3_SKY_DEFAULT_TIME_MULTIPLIER / speed * parentSky->GetEnvironment()->GetWindSpeed() * 0.1f;
588 cloudLayerOptionsMap.insert(CloudLayerOptionsMap::value_type(lowerIndex, skyxCloudLayerOptions));
589 ApplyLayerOptions(lowerIndex);
595void SSky::CloudLayered::ApplyLayerOptions(
const unsigned int& index)
597 SkyX::SkyX* skyxManager = parentSky->GetSkyX();
600 CloudLayerOptionsMap::iterator iLayerOptions = cloudLayerOptionsMap.find(index);
601 CloudLayerMap::iterator iLayer = cloudLayerMap.find(index);
602 if(iLayer == cloudLayerMap.end())
605 SkyX::CloudLayer* skyxCloudLayer = skyxManager->getCloudsManager()->add(*(iLayerOptions->second));
608 cloudLayerMap.insert(CloudLayerMap::value_type(index, skyxCloudLayer));
613 iLayer->second->setOptions(*(iLayerOptions->second));
619 cloudLayerMap.clear();
625 CloudLayerOptionsMap::iterator iSearchedLayerOptions = cloudLayerOptionsMap.find(index);
626 if(iSearchedLayerOptions == cloudLayerOptionsMap.end())
627 OGRE_EXCEPT(Ogre::Exception::ERR_ITEM_NOT_FOUND,
"Cannot remove cloud layer, there's no layer associated with this index!",
"SSky::CloudLayered::RemoveLayer");
630 SkyX::SkyX* skyxManager = parentSky->GetSkyX();
631 CloudLayerMap::iterator iSearchedLayer = cloudLayerMap.find(index);
632 if(iSearchedLayer != cloudLayerMap.end())
635 skyxManager->getCloudsManager()->remove(iSearchedLayer->second);
638 cloudLayerMap.erase(iSearchedLayer);
642 cloudLayerOptionsMap.erase(iSearchedLayerOptions);
647 SkyX::SkyX* skyxManager = parentSky->GetSkyX();
649 skyxManager->getCloudsManager()->removeAll();
651 cloudLayerMap.clear();
652 cloudLayerOptionsMap.clear();
657 std::vector<int> layerIndexes;
658 CloudLayerOptionsMap::iterator iLayerOptions = cloudLayerOptionsMap.begin();
659 while(iLayerOptions != cloudLayerOptionsMap.end())
661 layerIndexes.push_back(iLayerOptions->first);
667SkyX::CloudLayer::Options* SSky::CloudLayered::GetLayerOptions(
const unsigned int& index)
669 CloudLayerOptionsMap::iterator iSearchedLayerOption = cloudLayerOptionsMap.find(index);
670 if(iSearchedLayerOption == cloudLayerOptionsMap.end())
671 OGRE_EXCEPT(Ogre::Exception::ERR_ITEM_NOT_FOUND,
"Cannot find cloud layer, there's no layer associated with this index!",
"SSky::CloudLayered::GetLayerOptions");
673 return iSearchedLayerOption->second;
676void SSky::CloudLayered::SetParameters(
const unsigned int& index,
const float& heightFromCloudCeiling,
const float& scale,
const float& attenuationDistance,
const float& attenuationDetail,
const float& heightVolume,
const float& volumetricDisplacement)
678 SkyX::CloudLayer::Options* skyxCloudLayerOptions = GetLayerOptions(index);
679 skyxCloudLayerOptions->Height = parentSky->GetCloudCeiling() + heightFromCloudCeiling;
680 skyxCloudLayerOptions->Scale = scale;
681 skyxCloudLayerOptions->DistanceAttenuation = attenuationDistance;
682 skyxCloudLayerOptions->DetailAttenuation = attenuationDetail;
683 skyxCloudLayerOptions->HeightVolume = heightVolume;
684 skyxCloudLayerOptions->VolumetricDisplacement = volumetricDisplacement;
685 ApplyLayerOptions(index);
690 return (parentSky->GetCloudCeiling() - GetLayerOptions(index)->Height);
695 GetLayerOptions(index)->Height = parentSky->GetCloudCeiling() + newHeightFromCloudCeiling;
696 ApplyLayerOptions(index);
701 return GetLayerOptions(index)->Scale;
706 GetLayerOptions(index)->Scale = newScale;
707 ApplyLayerOptions(index);
712 return GetLayerOptions(index)->DistanceAttenuation;
717 GetLayerOptions(index)->DistanceAttenuation = newAttenuationDistance;
718 ApplyLayerOptions(index);
723 return GetLayerOptions(index)->DetailAttenuation;
728 GetLayerOptions(index)->DetailAttenuation = newAttenuationDetail;
729 ApplyLayerOptions(index);
734 return GetLayerOptions(index)->HeightVolume;
739 GetLayerOptions(index)->HeightVolume = newHeightVolume;
740 ApplyLayerOptions(index);
745 return GetLayerOptions(index)->VolumetricDisplacement;
750 GetLayerOptions(index)->VolumetricDisplacement = newVolumetricDisplacement;
751 ApplyLayerOptions(index);
768 SkyX::SkyX* skyxManager = parentSky->GetSkyX();
771 skyxManager->getVCloudsManager()->remove();
777 SkyX::SkyX* skyxManager = parentSky->GetSkyX();
781 SkyX::VCloudsManager* skyxVolumetricCloudsManager = skyxManager->getVCloudsManager();
782 SkyX::VClouds::VClouds* skyxVolumetricClouds = skyxVolumetricCloudsManager->getVClouds();
783 skyxVolumetricClouds->unregisterCamera(cam);
789 SkyX::SkyX* skyxManager = parentSky->GetSkyX();
793 SkyX::VCloudsManager* skyxVolumetricCloudsManager = skyxManager->getVCloudsManager();
794 SkyX::VClouds::VClouds* skyxVolumetricClouds = skyxVolumetricCloudsManager->getVClouds();
798 skyxVolumetricCloudsManager->setAutoupdate(
false);
801 if(!skyxVolumetricCloudsManager->isCreated())
804 cachedHumidity = parentSky->GetEnvironment()->GetHumidity();
805 cachedCloudCeiling = parentSky->GetCloudCeiling();
808 CheckSunColourGradient(
true);
811 cachedWindDirection = parentSky->GetEnvironment()->GetWindDirection();
812 cachedWindSpeed = parentSky->GetEnvironment()->GetWindSpeed();
813 if(parentSky->GetEnvironment()->GetTimeSpeedFactor() < 0)
814 cachedWindSpeed = -cachedWindSpeed;
817 if(cachedWindDirection.squaredLength() == 0.0f)
818 skyxVolumetricCloudsManager->setWindSpeed(0.0f);
820 skyxVolumetricCloudsManager->setWindSpeed(parentSky->GetAnimationSpeed() * cachedWindSpeed * 0.5f * (cachedCloudCeiling / 7.5f));
823 skyxVolumetricClouds->setWindDirection(Ogre::Math::ATan2(cachedWindDirection.x, -cachedWindDirection.y));
826 float radius = 100.0f * cachedCloudCeiling / 7.5f;
827 skyxVolumetricCloudsManager->create(radius);
830 skyxVolumetricClouds->setWheater(cachedHumidity / 100.0f, std::min(1.0f, cachedHumidity / 75.0f),
false);
833 skyxVolumetricClouds->getLightningManager()->setEnabled(parentSky->GetLightningEnable());
834 skyxVolumetricClouds->getLightningManager()->setAverageLightningApparitionTime(0.5f);
835 skyxVolumetricClouds->getLightningManager()->setLightningColor(Ogre::Vector3(1,0.976,0.92));
836 skyxVolumetricClouds->getLightningManager()->setLightningTimeMultiplier(2);
838 skyxVolumetricCloudsManager->getVClouds()->getDataManager()->setUpdateTime(5.0f);
841 else if((skyxVolumetricCloudsManager->isCreated()) && (!enableComponent))
844 skyxManager->getVCloudsManager()->remove();
851 SkyX::SkyX* skyxManager = parentSky->GetSkyX();
855 SkyX::VCloudsManager* skyxVolumetricCloudsManager = skyxManager->getVCloudsManager();
856 SkyX::VClouds::VClouds* skyxVolumetricClouds = skyxVolumetricCloudsManager->getVClouds();
859 if(skyxVolumetricCloudsManager->isCreated())
862 float newCloudCeiling = parentSky->GetCloudCeiling();
863 Ogre::Vector2 newWindDirection = parentSky->GetEnvironment()->GetWindDirection();
864 float newWindSpeed = parentSky->GetEnvironment()->GetWindSpeed();
865 if(parentSky->GetEnvironment()->GetTimeSpeedFactor() < 0)
866 newWindSpeed = -newWindSpeed;
869 if((cachedWindSpeed != newWindSpeed) || (cachedCloudCeiling != newCloudCeiling) || (cachedWindDirection != newWindDirection))
871 if(newWindDirection.squaredLength() == 0.0f)
872 skyxVolumetricCloudsManager->setWindSpeed(0.0f);
874 skyxVolumetricCloudsManager->setWindSpeed(parentSky->GetAnimationSpeed() * newWindSpeed * 0.5f * (newCloudCeiling / 7.5f));
878 if(cachedWindDirection != newWindDirection)
879 skyxVolumetricClouds->setWindDirection(Ogre::Math::ATan2(newWindDirection.x, -newWindDirection.y));
882 float newHumidity = parentSky->GetEnvironment()->GetHumidity();
883 if(cachedHumidity != newHumidity)
884 skyxVolumetricClouds->setWheater(newHumidity / 100.0f, std::min(1.0f, newHumidity / 75.0f),
true);
887 CheckSunColourGradient();
890 if(cachedCloudCeiling != newCloudCeiling)
893 float radius = 100.0f * newCloudCeiling / 7.5f;
894 skyxVolumetricCloudsManager->remove();
895 skyxVolumetricCloudsManager->create(radius);
898 cachedHumidity = newHumidity;
899 cachedCloudCeiling = newCloudCeiling;
900 cachedWindSpeed = newWindSpeed;
901 cachedWindDirection = newWindDirection;
906void SSky::CloudVolumetric::CheckSunColourGradient(
const bool& force)
908 float moonLightTreshold = 0.4125f;
914 if((newSunColour != cachedSunLightColour) || (newMoonColour != cachedMoonLightColour) || force)
917 Ogre::ColourValue lightSourceColour = sun->
GetLightColour((0.9f - moonLightTreshold) / (1.0f - moonLightTreshold));
918 sunGradient.addCFrame(SkyX::ColorGradient::ColorFrame(Ogre::Vector3(lightSourceColour.r, lightSourceColour.g, lightSourceColour.b), 1.0f));
919 lightSourceColour = sun->
GetLightColour((0.75f - moonLightTreshold) / (1.0f - moonLightTreshold));
920 sunGradient.addCFrame(SkyX::ColorGradient::ColorFrame(Ogre::Vector3(lightSourceColour.r, lightSourceColour.g, lightSourceColour.b), 0.75f));
921 lightSourceColour = sun->
GetLightColour((0.5625f - moonLightTreshold) / (1.0f - moonLightTreshold));
922 sunGradient.addCFrame(SkyX::ColorGradient::ColorFrame(Ogre::Vector3(lightSourceColour.r, lightSourceColour.g, lightSourceColour.b), 0.5625f));
923 lightSourceColour = sun->
GetLightColour((0.5f - moonLightTreshold) / (1.0f - moonLightTreshold));
924 sunGradient.addCFrame(SkyX::ColorGradient::ColorFrame(Ogre::Vector3(lightSourceColour.r, lightSourceColour.g, lightSourceColour.b), 0.5f));
925 lightSourceColour = sun->
GetLightColour((0.4725f - moonLightTreshold) / (1.0f - moonLightTreshold));
926 sunGradient.addCFrame(SkyX::ColorGradient::ColorFrame(Ogre::Vector3(lightSourceColour.r, lightSourceColour.g, lightSourceColour.b), 0.4725f));
927 lightSourceColour = sun->
GetLightColour((0.45f - moonLightTreshold) / (1.0f - moonLightTreshold));
928 sunGradient.addCFrame(SkyX::ColorGradient::ColorFrame(Ogre::Vector3(lightSourceColour.r, lightSourceColour.g, lightSourceColour.b), 0.45f));
929 sunGradient.addCFrame(SkyX::ColorGradient::ColorFrame(Ogre::Vector3(0.0, 0.0, 0.0), 0.4125f));
930 lightSourceColour = moon->
GetLightColour((0.45f - moonLightTreshold) / (1.0f - moonLightTreshold));
931 sunGradient.addCFrame(SkyX::ColorGradient::ColorFrame(Ogre::Vector3(lightSourceColour.r, lightSourceColour.g, lightSourceColour.b), 0.25f));
932 lightSourceColour = moon->
GetLightColour((0.75f - moonLightTreshold) / (1.0f - moonLightTreshold));
933 sunGradient.addCFrame(SkyX::ColorGradient::ColorFrame(Ogre::Vector3(lightSourceColour.r, lightSourceColour.g, lightSourceColour.b), 0.0f));
935 SkyX::SkyX* skyxManager = parentSky->GetSkyX();
937 skyxManager->getVCloudsManager()->setSunGradient(sunGradient);
939 cachedSunLightColour = newSunColour;
940 cachedMoonLightColour = newMoonColour;
ViewportList GetRegisteredViewports()
std::set< SViewPort * > ViewportList
SEnvironment * parentEnvironment
float GetTimeSpeedFactor()
void _NotifyEnvironmentComponentUnRegisterRenderTarget(Ogre::Viewport *targetViewport)
void _NotifyEnvironmentComponentRegisterRenderTarget(Ogre::Viewport *targetViewport)
std::string GetTextureName()
Ogre::SceneManager * GetOgreScenePointer()
void SetVolumetricDisplacement(const unsigned int &index, const Ogre::Real &newVolumetricDisplacement)
virtual void Update(const Ogre::Real &updateTime)
void SetHeightFromCloudCeiling(const unsigned int &index, const Ogre::Real &newHeightFromCloudCeiling)
void SetAttenuationDistance(const unsigned int &index, const Ogre::Real &newAttenuationDistance)
Ogre::Real GetAttenuationDetail(const unsigned int &index)
void SetHeightVolume(const unsigned int &index, const Ogre::Real &newHeightVolume)
void SetParameters(const unsigned int &index, const float &heightFromCloudCeiling, const float &scale, const float &attenuationDistance, const float &attenuationDetail, const float &heightVolume, const float &volumetricDisplacement)
void RemoveLayer(const unsigned int &index)
Ogre::Real GetHeightFromCloudCeiling(const unsigned int &index)
void SetScale(const unsigned int &index, const Ogre::Real &newScale)
std::vector< int > GetLayerIndexes()
void SetAttenuationDetail(const unsigned int &index, const Ogre::Real &newAttenuationDetail)
Ogre::Real GetAttenuationDistance(const unsigned int &index)
Ogre::Real GetVolumetricDisplacement(const unsigned int &index)
virtual void SetEnableImpl(const bool &enableComponent)
unsigned int AddLayer(const Ogre::Real &heightFromCloudCeiling=0.0f, const Ogre::Real &scale=0.001f, const Ogre::Real &distanceAttenuation=0.05f, const Ogre::Real &detailAttenuation=1.0f, const Ogre::Real &heightVolume=0.25f, const Ogre::Real &volumetricDisplacement=0.01f)
Ogre::Real GetHeightVolume(const unsigned int &index)
Ogre::Real GetScale(const unsigned int &index)
virtual void SetEnableImpl(const bool &enableComponent)
virtual void Update(const Ogre::Real &updateTime)
virtual void UnregisterCamera(Ogre::Camera *cam)
SkyComponentType GetType()
void SetEnabled(const bool &enable)
virtual void SetEnableImpl(const bool &enableComponent)
virtual void UnregisterCamera(Ogre::Camera *cam)
SSky::CloudVolumetric * GetCloudVolumetric()
SSky::CloudLayered * GetCloudLayered()
void RemoveViewport(Ogre::Viewport *viewport)
void AddLightning(const Ogre::Vector3 from, const Ogre::Vector3 dir, const Ogre::Real length)
float GetAnimationSpeed()
virtual void UnregisterViewportImpl(SViewPort *viewport)
virtual void Update(const Ogre::Real &updateTime)
void SetLightningEnable(const bool &enable)
@ SO3_SKY_HDR
High dynamic range.
@ SO3_SKY_LDR
Low dynamic range.
void SetAnimationSpeed(const float &animationSpeed)
bool GetLightningEnable()
void SetHDREnable(const bool &enable)
void SetCloudCeiling(const float &newCloudCeiling)
virtual void UnregisterCameraImpl(Ogre::Camera *cam)
virtual void RegisterViewportImpl(SViewPort *viewport)
virtual void SetEnableImpl(const bool &enableComponent)
SkyComponent * GetComponent(const SkyComponentType &componentType)
void AddViewport(Ogre::Viewport *viewport)
@ SO3_SKY_COMPONENT_VOLUMETRIC_CLOUD
@ SO3_SKY_COMPONENT_LAYERER_CLOUD
virtual void UpdateCamera(SViewPort *viewport)
const Ogre::ColourValue GetLightColour(const float &level=1.0f) const
SEnvironment * GetEnvironment()
Ogre::Viewport * GetOgreViewPortPointer()