SO3Engine
Classes | Public Types | Public Member Functions | Protected Member Functions | List of all members
SO3::SWater Class Reference

#include <SO3Water.h>

Inheritance diagram for SO3::SWater:
SO3::SEnvironmentComponent SO3::SData

Classes

class  WaterComponent
 
class  WaterComponentCaustics
 
class  WaterComponentDepth
 
class  WaterComponentFoam
 
class  WaterComponentGodRays
 
class  WaterComponentSmooth
 
class  WaterComponentSun
 
class  WaterComponentUnderwater
 
class  WaterComponentUnderwaterReflections
 

Public Types

enum  WaterGeometryType { SO3_WATER_GEOM_INFINITE_PLANE , SO3_WATER_GEOM_FINITE_PLANE , SO3_WATER_GEOM_RADIAL }
 
enum  WaterComponentType {
  SO3_WATER_COMPONENT_NONE , SO3_WATER_COMPONENT_SUN , SO3_WATER_COMPONENT_FOAM , SO3_WATER_COMPONENT_DEPTH ,
  SO3_WATER_COMPONENT_SMOOTH , SO3_WATER_COMPONENT_CAUSTICS , SO3_WATER_COMPONENT_UNDERWATER , SO3_WATER_COMPONENT_UNDERWATER_REFLECTIONS ,
  SO3_WATER_COMPONENT_GODRAYS
}
 

Public Member Functions

 SWater (SEnvironment *parent, const std::string &waterName)
 
 SWater (SEnvironment *parent, const std::string &waterName, const int &planeSizeX, const int &planeSizeY)
 
 SWater (SEnvironment *parent, const std::string &waterName, const float &waterRadius)
 
 ~SWater ()
 
Hydrax::Hydrax * GetHydrax ()
 
WaterGeometryType GetGeometryType ()
 
void SetGeometryTypeInfinitePlane ()
 
float GetInfinitePlaneStrength ()
 
void SetInfinitePlaneStrength (const float &value)
 
float GetInfinitePlaneElevation ()
 
void SetInfinitePlaneElevation (const float &value)
 
float GetInfinitePlaneComplexity ()
 
void SetInfinitePlaneComplexity (const float &value)
 
float GetInfinitePlaneChoppyStrength ()
 
void SetInfinitePlaneChoppyStrength (const float &value)
 
void SetGeometryTypeFinitePlane (const int &planeSizeX, const int &planeSizeY)
 
void SetGeometryTypeRadialPlane (const float &waterRadius)
 
WaterComponentGetComponent (const SWater::WaterComponentType &componentType)
 
WaterComponentSunGetSun ()
 
WaterComponentFoamGetFoam ()
 
WaterComponentDepthGetDepth ()
 
WaterComponentSmoothGetSmooth ()
 
WaterComponentCausticsGetCaustics ()
 
WaterComponentUnderwaterGetUnderwater ()
 
WaterComponentUnderwaterReflectionsGetUnderwaterReflections ()
 
WaterComponentGodRaysGetGodRays ()
 
Ogre::Vector3 GetPosition ()
 
void SetPosition (const Ogre::Vector3 &newSeaLevel)
 
Ogre::ColourValue GetColor ()
 
void SetColor (const Ogre::ColourValue &color)
 
virtual void Update (const Ogre::Real &updateTime)
 
float GetAnimationSpeed ()
 
void SetAnimationSpeed (const float &animationSpeed)
 
Hydrax::Noise::Perlin::Options GetPerlinOptions ()
 
void SetPerlinOptions (const Hydrax::Noise::Perlin::Options &newOptions)
 
Hydrax::Noise::FFT::Options GetFFTOptions ()
 
void SetFFTOptions (const Hydrax::Noise::FFT::Options &newOptions)
 
void ApplyHydraxComponentTypes ()
 
virtual void preRenderTargetUpdate (const Hydrax::RttManager::RttType &Rtt)
 
virtual void postRenderTargetUpdate (const Hydrax::RttManager::RttType &Rtt)
 
virtual void preViewportUpdate (const Ogre::RenderTargetViewportEvent &evt)
 
virtual void UpdateCamera (SViewPort *viewport)
 
void AddViewport (Ogre::Viewport *viewport)
 
void RemoveViewport (Ogre::Viewport *viewport)
 
- Public Member Functions inherited from SO3::SEnvironmentComponent
 SEnvironmentComponent (SEnvironment *parent, const std::string &environmentComponentName)
 
virtual ~SEnvironmentComponent ()
 
SEnvironmentGetEnvironment ()
 
bool GetEnable ()
 
void SetEnable (const bool &enableComponent)
 
void RegisterViewport (SViewPort *viewport)
 
void UnregisterViewport (SViewPort *viewport)
 
void UnregisterCamera (Ogre::Camera *cam)
 
- Public Member Functions inherited from SO3::SData
 SData (const std::string &dataName)
 
virtual ~SData ()
 
std::string GetName () const
 
SUserObjectBindingsGetUserObjectBindings ()
 
const SUserObjectBindingsGetUserObjectBindings () const
 

Protected Member Functions

virtual void SetEnableImpl (const bool &enableComponent)
 
virtual void RegisterViewportImpl (SViewPort *viewport)
 
virtual void UnregisterViewportImpl (SViewPort *viewport)
 
- Protected Member Functions inherited from SO3::SEnvironmentComponent
void Cleanup ()
 
ViewportList GetRegisteredViewports ()
 
virtual void UnregisterCameraImpl (Ogre::Camera *cam)
 

Additional Inherited Members

- Protected Types inherited from SO3::SEnvironmentComponent
typedef std::set< SViewPort * > ViewportList
 
- Protected Attributes inherited from SO3::SEnvironmentComponent
SEnvironmentparentEnvironment
 
- Protected Attributes inherited from SO3::SData
std::string name
 

Detailed Description

Definition at line 49 of file SO3Water.h.

Member Enumeration Documentation

◆ WaterComponentType

Enumerator
SO3_WATER_COMPONENT_NONE 
SO3_WATER_COMPONENT_SUN 
SO3_WATER_COMPONENT_FOAM 
SO3_WATER_COMPONENT_DEPTH 
SO3_WATER_COMPONENT_SMOOTH 
SO3_WATER_COMPONENT_CAUSTICS 
SO3_WATER_COMPONENT_UNDERWATER 
SO3_WATER_COMPONENT_UNDERWATER_REFLECTIONS 
SO3_WATER_COMPONENT_GODRAYS 

Definition at line 65 of file SO3Water.h.

◆ WaterGeometryType

Enumerator
SO3_WATER_GEOM_INFINITE_PLANE 
SO3_WATER_GEOM_FINITE_PLANE 
SO3_WATER_GEOM_RADIAL 

Definition at line 56 of file SO3Water.h.

Constructor & Destructor Documentation

◆ SWater() [1/3]

SO3::SWater::SWater ( SEnvironment parent,
const std::string &  waterName 
)

Create a new water instance, with infinite plane geom shape by default

Definition at line 43 of file SO3Water.cpp.

◆ SWater() [2/3]

SO3::SWater::SWater ( SEnvironment parent,
const std::string &  waterName,
const int &  planeSizeX,
const int &  planeSizeY 
)

Create a new water instance, with defined finite plane geom shape by default

Definition at line 48 of file SO3Water.cpp.

◆ SWater() [3/3]

SO3::SWater::SWater ( SEnvironment parent,
const std::string &  waterName,
const float &  waterRadius 
)

Create a new water instance, with defined radial geom shape by default

Definition at line 55 of file SO3Water.cpp.

◆ ~SWater()

SO3::SWater::~SWater ( )

Destructor

Definition at line 140 of file SO3Water.cpp.

Member Function Documentation

◆ AddViewport()

void SO3::SWater::AddViewport ( Ogre::Viewport *  viewport)

Definition at line 309 of file SO3Water.cpp.

◆ ApplyHydraxComponentTypes()

void SO3::SWater::ApplyHydraxComponentTypes ( )

Definition at line 639 of file SO3Water.cpp.

◆ GetAnimationSpeed()

float SO3::SWater::GetAnimationSpeed ( )

Retrieve the waves animation speed.

Definition at line 1511 of file SO3Water.cpp.

◆ GetCaustics()

SWater::WaterComponentCaustics * SO3::SWater::GetCaustics ( )

Definition at line 402 of file SO3Water.cpp.

◆ GetColor()

Ogre::ColourValue SO3::SWater::GetColor ( )

Definition at line 1500 of file SO3Water.cpp.

◆ GetComponent()

SWater::WaterComponent * SO3::SWater::GetComponent ( const SWater::WaterComponentType componentType)

Definition at line 346 of file SO3Water.cpp.

◆ GetDepth()

SWater::WaterComponentDepth * SO3::SWater::GetDepth ( )

Definition at line 392 of file SO3Water.cpp.

◆ GetFFTOptions()

Hydrax::Noise::FFT::Options SO3::SWater::GetFFTOptions ( )

Get the actual FFT noise parameters

Definition at line 441 of file SO3Water.cpp.

◆ GetFoam()

SWater::WaterComponentFoam * SO3::SWater::GetFoam ( )

Definition at line 387 of file SO3Water.cpp.

◆ GetGeometryType()

SWater::WaterGeometryType SO3::SWater::GetGeometryType ( )

Get the actual geometry shape of the water

Definition at line 460 of file SO3Water.cpp.

◆ GetGodRays()

SWater::WaterComponentGodRays * SO3::SWater::GetGodRays ( )

Definition at line 417 of file SO3Water.cpp.

◆ GetHydrax()

Hydrax::Hydrax * SO3::SWater::GetHydrax ( )

Internal use only!

Definition at line 341 of file SO3Water.cpp.

◆ GetInfinitePlaneChoppyStrength()

float SO3::SWater::GetInfinitePlaneChoppyStrength ( )

Definition at line 535 of file SO3Water.cpp.

◆ GetInfinitePlaneComplexity()

float SO3::SWater::GetInfinitePlaneComplexity ( )

Definition at line 514 of file SO3Water.cpp.

◆ GetInfinitePlaneElevation()

float SO3::SWater::GetInfinitePlaneElevation ( )

Definition at line 493 of file SO3Water.cpp.

◆ GetInfinitePlaneStrength()

float SO3::SWater::GetInfinitePlaneStrength ( )

Definition at line 470 of file SO3Water.cpp.

◆ GetPerlinOptions()

Hydrax::Noise::Perlin::Options SO3::SWater::GetPerlinOptions ( )

Get the actual perlin noise parameters

Definition at line 422 of file SO3Water.cpp.

◆ GetPosition()

Ogre::Vector3 SO3::SWater::GetPosition ( )

Retrieve the position of the water plane geometry, y is the "sea level" component.

Definition at line 1481 of file SO3Water.cpp.

◆ GetSmooth()

SWater::WaterComponentSmooth * SO3::SWater::GetSmooth ( )

Definition at line 397 of file SO3Water.cpp.

◆ GetSun()

SWater::WaterComponentSun * SO3::SWater::GetSun ( )

Definition at line 382 of file SO3Water.cpp.

◆ GetUnderwater()

SWater::WaterComponentUnderwater * SO3::SWater::GetUnderwater ( )

Definition at line 407 of file SO3Water.cpp.

◆ GetUnderwaterReflections()

SWater::WaterComponentUnderwaterReflections * SO3::SWater::GetUnderwaterReflections ( )

Definition at line 412 of file SO3Water.cpp.

◆ postRenderTargetUpdate()

void SO3::SWater::postRenderTargetUpdate ( const Hydrax::RttManager::RttType &  Rtt)
virtual

Definition at line 1580 of file SO3Water.cpp.

◆ preRenderTargetUpdate()

void SO3::SWater::preRenderTargetUpdate ( const Hydrax::RttManager::RttType &  Rtt)
virtual

Definition at line 1541 of file SO3Water.cpp.

◆ preViewportUpdate()

void SO3::SWater::preViewportUpdate ( const Ogre::RenderTargetViewportEvent &  evt)
virtual

Definition at line 1616 of file SO3Water.cpp.

◆ RegisterViewportImpl()

void SO3::SWater::RegisterViewportImpl ( SViewPort viewport)
protectedvirtual

Implements SO3::SEnvironmentComponent.

Definition at line 321 of file SO3Water.cpp.

◆ RemoveViewport()

void SO3::SWater::RemoveViewport ( Ogre::Viewport *  viewport)

Definition at line 315 of file SO3Water.cpp.

◆ SetAnimationSpeed()

void SO3::SWater::SetAnimationSpeed ( const float &  animationSpeed)

Change the waves animations speed.

Definition at line 1519 of file SO3Water.cpp.

◆ SetColor()

void SO3::SWater::SetColor ( const Ogre::ColourValue &  color)

Definition at line 1505 of file SO3Water.cpp.

◆ SetEnableImpl()

void SO3::SWater::SetEnableImpl ( const bool &  enableComponent)
protectedvirtual

Implements SO3::SEnvironmentComponent.

Definition at line 237 of file SO3Water.cpp.

◆ SetFFTOptions()

void SO3::SWater::SetFFTOptions ( const Hydrax::Noise::FFT::Options &  newOptions)

Force perlin noise parameters

Definition at line 446 of file SO3Water.cpp.

◆ SetGeometryTypeFinitePlane()

void SO3::SWater::SetGeometryTypeFinitePlane ( const int &  planeSizeX,
const int &  planeSizeY 
)

Change the geometry to an finite plane (width and height provided).

Definition at line 556 of file SO3Water.cpp.

◆ SetGeometryTypeInfinitePlane()

void SO3::SWater::SetGeometryTypeInfinitePlane ( )

Change the geometry to an infinite plane.

Definition at line 465 of file SO3Water.cpp.

◆ SetGeometryTypeRadialPlane()

void SO3::SWater::SetGeometryTypeRadialPlane ( const float &  waterRadius)

Change the geometry to an radial plane (circle radius provided).

Definition at line 561 of file SO3Water.cpp.

◆ SetInfinitePlaneChoppyStrength()

void SO3::SWater::SetInfinitePlaneChoppyStrength ( const float &  value)

Definition at line 540 of file SO3Water.cpp.

◆ SetInfinitePlaneComplexity()

void SO3::SWater::SetInfinitePlaneComplexity ( const float &  value)

Definition at line 519 of file SO3Water.cpp.

◆ SetInfinitePlaneElevation()

void SO3::SWater::SetInfinitePlaneElevation ( const float &  value)

Definition at line 498 of file SO3Water.cpp.

◆ SetInfinitePlaneStrength()

void SO3::SWater::SetInfinitePlaneStrength ( const float &  value)

Definition at line 475 of file SO3Water.cpp.

◆ SetPerlinOptions()

void SO3::SWater::SetPerlinOptions ( const Hydrax::Noise::Perlin::Options &  newOptions)

Force perlin noise parameters

Definition at line 427 of file SO3Water.cpp.

◆ SetPosition()

void SO3::SWater::SetPosition ( const Ogre::Vector3 &  newSeaLevel)

Changes the sea level on the y component. x and z are usefull for radial and finite plane, but not for infinite plane.

Definition at line 1489 of file SO3Water.cpp.

◆ UnregisterViewportImpl()

void SO3::SWater::UnregisterViewportImpl ( SViewPort viewport)
protectedvirtual

Implements SO3::SEnvironmentComponent.

Definition at line 328 of file SO3Water.cpp.

◆ Update()

void SO3::SWater::Update ( const Ogre::Real &  updateTime)
virtual

Implements SO3::SEnvironmentComponent.

Definition at line 1387 of file SO3Water.cpp.

◆ UpdateCamera()

void SO3::SWater::UpdateCamera ( SViewPort viewport)
virtual

Reimplemented from SO3::SEnvironmentComponent.

Definition at line 1375 of file SO3Water.cpp.


The documentation for this class was generated from the following files: