SO3Engine
|
SO3Water.cpp
Go to the documentation of this file.
43SWater::SWater(SEnvironment* parent, const std::string& waterName) : SEnvironmentComponent(parent, waterName)
48SWater::SWater(SEnvironment* parent, const std::string& waterName, const int& planeSizeX, const int& planeSizeY) : SEnvironmentComponent(parent, waterName)
55SWater::SWater(SEnvironment* parent, const std::string& waterName, const float& waterRadius) : SEnvironmentComponent(parent, waterName)
134 progGridOptions.Elevation = 1.0f; // It's very important to set a little value here, cause max tesselation of the water plane is reached when the camera is at least to this height.
163 Ogre::Viewport* ogreViewport = const_cast<Ogre::Viewport*> (renderingViewport->GetOgreViewPortPointer());
169 //(static_cast<Hydrax::Noise::Real*> (hydraxNoise))->addWave(parentEnvironment->GetWindDirection(), 0.01, parentEnvironment->GetWindSpeed(), 0.5);
226 hydraxManager->getRttManager()->setTextureSize(Hydrax::RttManager::RTT_REFLECTION, Hydrax::Size(nwidth, nheight));
227 hydraxManager->getRttManager()->setTextureSize(Hydrax::RttManager::RTT_REFRACTION, Hydrax::Size(nwidth, nheight));
228 hydraxManager->getRttManager()->setTextureSize(Hydrax::RttManager::RTT_DEPTH, Hydrax::Size(nwidth, nheight));
229 hydraxManager->getRttManager()->setTextureSize(Hydrax::RttManager::RTT_DEPTH_REFLECTION, Hydrax::Size(nwidth, nheight));
230 hydraxManager->getRttManager()->setTextureSize(Hydrax::RttManager::RTT_GPU_NORMAL_MAP, Hydrax::Size(nwidth, nheight));
631 // Alpha is not managed by Hydrax, which only use a Ogre::Vector3 for rgb values, so do not care about alpha that will be less than 1 after those multiplications.
647 components = static_cast<Hydrax::HydraxComponent> (components|Hydrax::HYDRAX_COMPONENT_UNDERWATER_GODRAYS);
650 components = static_cast<Hydrax::HydraxComponent> (components|Hydrax::HYDRAX_COMPONENT_UNDERWATER_REFLECTIONS);
653 components = static_cast<Hydrax::HydraxComponent> (components|Hydrax::HYDRAX_COMPONENT_UNDERWATER);
681SWater::WaterComponent::WaterComponent(SWater* parentWaterInstance, const SWater::WaterComponentType& component, const Hydrax::HydraxComponent& hydraxComponent) : componentType(component),
737SWater::WaterComponentSun::WaterComponentSun(SWater* parentWaterInstance) : SWater::WaterComponent(parentWaterInstance, SWater::SO3_WATER_COMPONENT_SUN, Hydrax::HYDRAX_COMPONENT_SUN)
740 SetParameters(Ogre::Vector3(0.0f, 10000.0f, 0.0f), 1.75f, 1500.0f, Ogre::ColourValue(1.0f, 0.9f, 0.6f));
743SWater::WaterComponentSun::WaterComponentSun() : SWater::WaterComponent(0, SWater::SO3_WATER_COMPONENT_NONE, Hydrax::HYDRAX_COMPONENTS_NONE)
748void SWater::WaterComponentSun::SetParameters(const Ogre::Vector3& position, const float& strength, const float& area, const Ogre::ColourValue& color)
878SWater::WaterComponentFoam::WaterComponentFoam(SWater* parentWaterInstance) : SWater::WaterComponent(parentWaterInstance, SWater::SO3_WATER_COMPONENT_FOAM, Hydrax::HYDRAX_COMPONENT_FOAM)
883SWater::WaterComponentFoam::WaterComponentFoam() : SWater::WaterComponent(0, SWater::SO3_WATER_COMPONENT_NONE, Hydrax::HYDRAX_COMPONENTS_NONE)
888void SWater::WaterComponentFoam::SetParameters(const float& maxDistance, const float& scale, const float& start, const float& transparency)
985SWater::WaterComponentDepth::WaterComponentDepth(SWater* parentWaterInstance) : SWater::WaterComponent(parentWaterInstance, SWater::SO3_WATER_COMPONENT_DEPTH, Hydrax::HYDRAX_COMPONENT_DEPTH)
990SWater::WaterComponentDepth::WaterComponentDepth() : SWater::WaterComponent(0, SWater::SO3_WATER_COMPONENT_NONE, Hydrax::HYDRAX_COMPONENTS_NONE)
995void SWater::WaterComponentDepth::SetParameters(const float& depthLimit, const float& distanceLimit)
1058SWater::WaterComponentSmooth::WaterComponentSmooth(SWater* parentWaterInstance) : SWater::WaterComponent(parentWaterInstance, SWater::SO3_WATER_COMPONENT_SMOOTH, Hydrax::HYDRAX_COMPONENT_SMOOTH)
1063SWater::WaterComponentSmooth::WaterComponentSmooth() : SWater::WaterComponent(0, SWater::SO3_WATER_COMPONENT_NONE, Hydrax::HYDRAX_COMPONENTS_NONE)
1098SWater::WaterComponentCaustics::WaterComponentCaustics(SWater* parentWaterInstance) : SWater::WaterComponent(parentWaterInstance, SWater::SO3_WATER_COMPONENT_CAUSTICS, Hydrax::HYDRAX_COMPONENT_CAUSTICS)
1103SWater::WaterComponentCaustics::WaterComponentCaustics() : SWater::WaterComponent(0, SWater::SO3_WATER_COMPONENT_NONE, Hydrax::HYDRAX_COMPONENTS_NONE)
1108void SWater::WaterComponentCaustics::SetParameters(const float& scale, const float& power, const float& end)
1186SWater::WaterComponentUnderwater::WaterComponentUnderwater(SWater* parentWaterInstance) : SWater::WaterComponent(parentWaterInstance, SWater::SO3_WATER_COMPONENT_UNDERWATER, Hydrax::HYDRAX_COMPONENT_UNDERWATER)
1190SWater::WaterComponentUnderwater::WaterComponentUnderwater() : SWater::WaterComponent(0, SWater::SO3_WATER_COMPONENT_NONE, Hydrax::HYDRAX_COMPONENTS_NONE)
1210SWater::WaterComponentUnderwaterReflections::WaterComponentUnderwaterReflections(SWater* parentWaterInstance) : SWater::WaterComponent(parentWaterInstance, SWater::SO3_WATER_COMPONENT_UNDERWATER_REFLECTIONS, Hydrax::HYDRAX_COMPONENT_UNDERWATER_REFLECTIONS)
1214SWater::WaterComponentUnderwaterReflections::WaterComponentUnderwaterReflections() : SWater::WaterComponent(0, SWater::SO3_WATER_COMPONENT_NONE, Hydrax::HYDRAX_COMPONENTS_NONE)
1232SWater::WaterComponentGodRays::WaterComponentGodRays(SWater* parentWaterInstance) : SWater::WaterComponent(parentWaterInstance, SWater::SO3_WATER_COMPONENT_GODRAYS, Hydrax::HYDRAX_COMPONENT_UNDERWATER_GODRAYS)
1238SWater::WaterComponentGodRays::WaterComponentGodRays() : SWater::WaterComponent(0, SWater::SO3_WATER_COMPONENT_NONE, Hydrax::HYDRAX_COMPONENTS_NONE)
1243void SWater::WaterComponentGodRays::SetParameters(const Ogre::Vector3& exposure, const float& intensity, const float& speed, const int& numberOfRays, const float& raysSize, const bool& raysIntersections)
1396 Ogre::ColourValue ogreColourValue = waterColourGradient.GetColour(std::max(parentEnvironment->GetSun()->GetLightDirection().y, 0.0f));
1397 hydraxManager->setWaterColor(Ogre::Vector3(ogreColourValue.r, ogreColourValue.g, ogreColourValue.b));
1433 Ogre::Vector2 newWindDirection = parentEnvironment->GetWindDirection() * parentEnvironment->GetWindSpeed();
1437 (static_cast<Hydrax::Noise::Real*> (hydraxNoise))->modifyWave(0, parentEnvironment->GetWindDirection(), 0.01, 4.0, 0.5);
void AddColourFrame(const ColourFrame &colourFrame)
Definition SO3ColourGradient.h:72
const Ogre::ColourValue GetColour(const float &gradientPosition) const
Definition SO3ColourGradient.cpp:46
SEnvironment * parentEnvironment
Definition SO3EnvironmentComponent.h:47
Definition SO3Environment.h:47
void _NotifyEnvironmentComponentRegisterRenderTarget(Ogre::Viewport *targetViewport)
Definition SO3Environment.cpp:447
Ogre::Vector2 GetWindDirection()
Definition SO3Environment.cpp:330
Ogre::SceneManager * GetOgreScenePointer()
Definition SO3Scene.cpp:449
Definition SO3Sky.h:47
const Ogre::Vector3 GetLightDirection() const
Definition SO3SkyLight.cpp:173
Definition SO3ViewPort.h:56
void UnregisterStereoViewport()
Definition SO3ViewPort.cpp:319
bool IsStereoViewportRegistered()
Definition SO3ViewPort.cpp:329
Ogre::Viewport * GetOgreViewPortPointer()
Definition SO3ViewPort.cpp:98
virtual void ApplyParameters()
Definition SO3Water.cpp:1172
void SetScale(const float &scale)
Definition SO3Water.cpp:1125
void SetPower(const float &power)
Definition SO3Water.cpp:1142
void SetEnd(const float &end)
Definition SO3Water.cpp:1159
virtual void Update(const Ogre::Real &updateTime)
Definition SO3Water.cpp:1167
void SetParameters(const float &scale, const float &power, const float &end)
Definition SO3Water.cpp:1108
virtual void Update(const Ogre::Real &updateTime)
Definition SO3Water.cpp:1036
void SetDistanceLimit(const float &distanceLimit)
Definition SO3Water.cpp:1028
void SetParameters(const float &depthLimit, const float &distanceLimit)
Definition SO3Water.cpp:995
float GetDistanceLimit()
Definition SO3Water.cpp:1019
void SetDepthLimit(const float &depthLimit)
Definition SO3Water.cpp:1011
virtual void ApplyParameters()
Definition SO3Water.cpp:1041
void SetScale(const float &scale)
Definition SO3Water.cpp:923
virtual void Update(const Ogre::Real &updateTime)
Definition SO3Water.cpp:965
virtual void ApplyParameters()
Definition SO3Water.cpp:970
void SetStart(const float &start)
Definition SO3Water.cpp:940
void SetMaxDistance(const float &maxDistance)
Definition SO3Water.cpp:906
void SetTransparency(const float &transparency)
Definition SO3Water.cpp:957
void SetParameters(const float &maxDistance, const float &scale, const float &start, const float &transparency)
Definition SO3Water.cpp:888
void SetRaysIntersectionEnable(const bool &raysIntersections)
Definition SO3Water.cpp:1362
void SetSpeed(const float &speed)
Definition SO3Water.cpp:1311
void SetNumberOfRays(const int &numberOfRays)
Definition SO3Water.cpp:1328
void SetRaysSize(const float &raysSize)
Definition SO3Water.cpp:1345
virtual void ApplyParameters()
Definition SO3Water.cpp:1254
void SetParameters(const Ogre::Vector3 &exposure, const float &intensity, const float &speed, const int &numberOfRays, const float &raysSize, const bool &raysIntersections)
Definition SO3Water.cpp:1243
Ogre::Vector3 GetExposure()
Definition SO3Water.cpp:1268
virtual void Update(const Ogre::Real &updateTime)
Definition SO3Water.cpp:1370
bool GetRaysIntersectionEnable()
Definition SO3Water.cpp:1353
int GetNumberOfRays()
Definition SO3Water.cpp:1319
void SetExposure(const Ogre::Vector3 &exposure)
Definition SO3Water.cpp:1277
void SetIntensity(const float &intensity)
Definition SO3Water.cpp:1294
Definition SO3Water.h:82
void SetEnabled(const bool &enable)
Definition SO3Water.cpp:707
virtual void ApplyParameters()
Definition SO3Water.cpp:1088
virtual void Update(const Ogre::Real &updateTime)
Definition SO3Water.cpp:1083
void SetPower(const float &power)
Definition SO3Water.cpp:1077
Definition SO3Water.h:136
void SetStrength(const float &strength)
Definition SO3Water.cpp:783
void SetPosition(const Ogre::Vector3 &position)
Definition SO3Water.cpp:766
virtual void Update(const Ogre::Real &updateTime)
Definition SO3Water.cpp:831
virtual void ApplyParameters()
Definition SO3Water.cpp:862
void SetParameters(const Ogre::Vector3 &position, const float &strength, const float &area, const Ogre::ColourValue &color)
Definition SO3Water.cpp:748
void SetColor(const Ogre::ColourValue &color)
Definition SO3Water.cpp:820
virtual void Update(const Ogre::Real &updateTime)
Definition SO3Water.cpp:1195
virtual void ApplyParameters()
Definition SO3Water.cpp:1200
virtual void ApplyParameters()
Definition SO3Water.cpp:1224
virtual void Update(const Ogre::Real &updateTime)
Definition SO3Water.cpp:1219
Definition SO3Water.h:52
void SetGeometryTypeFinitePlane(const int &planeSizeX, const int &planeSizeY)
Definition SO3Water.cpp:556
virtual void SetEnableImpl(const bool &enableComponent)
Definition SO3Water.cpp:237
void SetInfinitePlaneChoppyStrength(const float &value)
Definition SO3Water.cpp:540
virtual void preRenderTargetUpdate(const Hydrax::RttManager::RttType &Rtt)
Definition SO3Water.cpp:1541
float GetInfinitePlaneChoppyStrength()
Definition SO3Water.cpp:535
void SetAnimationSpeed(const float &animationSpeed)
Definition SO3Water.cpp:1519
float GetInfinitePlaneComplexity()
Definition SO3Water.cpp:514
WaterComponent * GetComponent(const SWater::WaterComponentType &componentType)
Definition SO3Water.cpp:346
virtual void RegisterViewportImpl(SViewPort *viewport)
Definition SO3Water.cpp:321
virtual void postRenderTargetUpdate(const Hydrax::RttManager::RttType &Rtt)
Definition SO3Water.cpp:1580
void SetInfinitePlaneComplexity(const float &value)
Definition SO3Water.cpp:519
virtual void UnregisterViewportImpl(SViewPort *viewport)
Definition SO3Water.cpp:328
void SetGeometryTypeRadialPlane(const float &waterRadius)
Definition SO3Water.cpp:561
void SetInfinitePlaneElevation(const float &value)
Definition SO3Water.cpp:498
void SetFFTOptions(const Hydrax::Noise::FFT::Options &newOptions)
Definition SO3Water.cpp:446
WaterComponentUnderwaterReflections * GetUnderwaterReflections()
Definition SO3Water.cpp:412
void SetGeometryTypeInfinitePlane()
Definition SO3Water.cpp:465
void SetPosition(const Ogre::Vector3 &newSeaLevel)
Definition SO3Water.cpp:1489
void SetInfinitePlaneStrength(const float &value)
Definition SO3Water.cpp:475
virtual void preViewportUpdate(const Ogre::RenderTargetViewportEvent &evt)
Definition SO3Water.cpp:1616
Hydrax::Noise::Perlin::Options GetPerlinOptions()
Definition SO3Water.cpp:422
void SetPerlinOptions(const Hydrax::Noise::Perlin::Options &newOptions)
Definition SO3Water.cpp:427
@ SO3_WATER_COMPONENT_UNDERWATER_REFLECTIONS
Definition SO3Water.h:74
Definition SO3DataScol.h:38
Generated by 1.9.8