50 public Hydrax::RttManager::RttListener,
51 public Ogre::RenderTargetListener
75 SO3_WATER_COMPONENT_GODRAYS
89 bool waterComponentEnable;
108 void SetEnabled(
const bool& enable);
120 virtual void Update(
const Ogre::Real& updateTime)=0;
140 Ogre::Plane horizonPlane;
141 Ogre::Vector3 sunPosition;
144 Ogre::ColourValue sunColor;
153 void SetParameters(
const Ogre::Vector3& position,
const float& strength,
const float& area,
const Ogre::ColourValue& color);
157 Ogre::Vector3 GetPosition();
161 void SetPosition(
const Ogre::Vector3& position);
169 void SetStrength(
const float& strength);
177 void SetArea(
const float& area);
181 Ogre::ColourValue GetColor();
185 void SetColor(
const Ogre::ColourValue& color);
189 virtual void Update(
const Ogre::Real& updateTime);
193 virtual void ApplyParameters();
209 float foamMaxDistance;
212 float foamTransparency;
221 void SetParameters(
const float& maxDistance,
const float& scale,
const float& start,
const float& transparency);
225 float GetMaxDistance();
229 void SetMaxDistance(
const float& maxDistance);
237 void SetScale(
const float& scale);
245 void SetStart(
const float& start);
249 float GetTransparency();
253 void SetTransparency(
const float& transparency);
257 virtual void Update(
const Ogre::Real& updateTime);
261 virtual void ApplyParameters();
277 float depthLimitation;
278 float distanceLimitation;
287 void SetParameters(
const float& depthLimit,
const float& distanceLimit);
291 float GetDepthLimit();
295 void SetDepthLimit(
const float& depthLimit);
299 void SetDistanceLimit(
const float& distanceLimit);
303 float GetDistanceLimit();
307 virtual void Update(
const Ogre::Real& updateTime);
311 virtual void ApplyParameters();
340 void SetPower(
const float& power);
344 virtual void Update(
const Ogre::Real& updateTime);
348 virtual void ApplyParameters();
375 void SetParameters(
const float& scale,
const float& power,
const float& end);
383 void SetScale(
const float& scale);
391 void SetPower(
const float& power);
399 void SetEnd(
const float& end);
403 virtual void Update(
const Ogre::Real& updateTime);
407 virtual void ApplyParameters();
431 virtual void Update(
const Ogre::Real& updateTime);
435 virtual void ApplyParameters();
459 virtual void Update(
const Ogre::Real& updateTime);
463 virtual void ApplyParameters();
479 Ogre::Vector3 godRaysExposure;
480 float godRaysIntensity;
482 int godRaysNumberOfRays;
483 float godRaysRaysSize;
484 bool godRaysRaysIntersections;
493 void SetParameters(
const Ogre::Vector3& exposure,
const float& intensity,
const float& speed,
const int& numberOfRays,
const float& raysSize,
const bool& raysIntersections);
497 Ogre::Vector3 GetExposure();
501 void SetExposure(
const Ogre::Vector3& exposure);
505 float GetIntensity();
509 void SetIntensity(
const float& intensity);
517 void SetSpeed(
const float& speed);
521 int GetNumberOfRays();
525 void SetNumberOfRays(
const int& numberOfRays);
533 void SetRaysSize(
const float& raysSize);
537 bool GetRaysIntersectionEnable();
541 void SetRaysIntersectionEnable(
const bool& raysIntersections);
545 virtual void Update(
const Ogre::Real& updateTime);
550 virtual void ApplyParameters();
569 Hydrax::Hydrax* hydraxManager;
570 Hydrax::Module::Module* hydraxGeometry;
571 Hydrax::Module::ProjectedGrid::Options progGridOptions;
573 Hydrax::Noise::Noise* hydraxNoise;
574 Hydrax::Noise::Perlin::Options perlinNoiseOptions;
575 Hydrax::Noise::FFT::Options fftNoiseOptions;
577 Ogre::ColourValue baseColour;
579 int finitePlaneWaterSizeX;
580 int finitePlaneWaterSizeY;
581 Ogre::Real radialWaterRadius;
582 Ogre::Vector3 waterPlanePosition;
583 float wavesAnimationSpeed;
584 Ogre::Vector2 cachedWindDirection;
585 bool IslastUnderWater;
596 SWater(
SEnvironment* parent,
const std::string& waterName,
const int& planeSizeX,
const int& planeSizeY);
611 Hydrax::Hydrax* GetHydrax();
621 void SetGeometryTypeInfinitePlane();
625 float GetInfinitePlaneStrength();
629 void SetInfinitePlaneStrength(
const float& value);
633 float GetInfinitePlaneElevation();
637 void SetInfinitePlaneElevation(
const float& value);
641 float GetInfinitePlaneComplexity();
645 void SetInfinitePlaneComplexity(
const float& value);
649 float GetInfinitePlaneChoppyStrength();
653 void SetInfinitePlaneChoppyStrength(
const float& value);
658 void SetGeometryTypeFinitePlane(
const int& planeSizeX,
const int& planeSizeY);
663 void SetGeometryTypeRadialPlane(
const float& waterRadius);
704 Ogre::Vector3 GetPosition();
709 void SetPosition(
const Ogre::Vector3& newSeaLevel);
713 Ogre::ColourValue GetColor();
717 void SetColor(
const Ogre::ColourValue& color);
721 virtual void Update(
const Ogre::Real& updateTime);
726 float GetAnimationSpeed();
731 void SetAnimationSpeed(
const float& animationSpeed);
736 Hydrax::Noise::Perlin::Options GetPerlinOptions();
741 void SetPerlinOptions(
const Hydrax::Noise::Perlin::Options& newOptions);
746 Hydrax::Noise::FFT::Options GetFFTOptions();
751 void SetFFTOptions(
const Hydrax::Noise::FFT::Options& newOptions);
755 void ApplyHydraxComponentTypes();
759 virtual void preRenderTargetUpdate(
const Hydrax::RttManager::RttType& Rtt);
763 virtual void postRenderTargetUpdate(
const Hydrax::RttManager::RttType& Rtt);
768 virtual void preViewportUpdate(
const Ogre::RenderTargetViewportEvent& evt);
772 virtual void UpdateCamera(
SViewPort* viewport);
774 void AddViewport(Ogre::Viewport* viewport);
776 void RemoveViewport(Ogre::Viewport* viewport);
782 virtual void SetEnableImpl(
const bool& enableComponent);
787 virtual void RegisterViewportImpl(
SViewPort* viewport);
792 virtual void UnregisterViewportImpl(
SViewPort* viewport);
803 void CommonConstructorsSequence(
const WaterGeometryType& selectedWaterGeometryType);
811 void CreateInfinitePlaneGeometry();
815 void CreateFinitePlaneGeometry(
const int& planeSizeX,
const int& planeSizeY);
819 void CreateRadialPlaneGeometry(
const float& waterRadius);
823 Hydrax::Noise::Noise* CreatePerlinNoise();
827 Hydrax::Noise::Noise* CreateFftNoise();
831 Hydrax::Noise::Noise* CreateRealNoise();
835 void RefreshWaterColourGradient();