Rigs of Rods 2026.01
Soft-body Physics Simulation
Loading...
Searching...
No Matches
Data Structures | Public Member Functions | Private Member Functions | Private Attributes
Hydrax::Hydrax Class Reference

Description

Main Hydrax class.

Hydrax is a plugin for the Ogre3D engine whose aim is rendering realistic water scenes. Do not use two instances of the Hydrax class.

Definition at line 56 of file Hydrax.h.

Data Structures

class  DeviceListener
 

Public Member Functions

 Hydrax (Ogre::SceneManager *sm, Ogre::Camera *c, Ogre::Viewport *v)
 
 ~Hydrax ()
 
void create ()
 
void remove ()
 
void update (const Ogre::Real &timeSinceLastFrame)
 
bool isComponent (const HydraxComponent &Component)
 
void setComponents (const HydraxComponent &Components)
 
void setModule (Module::Module *Module, const bool &DeleteOldModule=true)
 
void setPolygonMode (const Ogre::PolygonMode &PM)
 
void setShaderMode (const MaterialManager::ShaderMode &ShaderMode)
 
void setPosition (const Ogre::Vector3 &Position)
 
void rotate (const Ogre::Quaternion &q)
 
const bool saveCfg (const Ogre::String &File, const Ogre::String &Path="") const
 
const bool loadCfg (const Ogre::String &File) const
 
void setPlanesError (const Ogre::Real &PlanesError)
 
void _setStrength (const Ogre::Real &Strength)
 
void setFullReflectionDistance (const Ogre::Real &FullReflectionDistance)
 
void setGlobalTransparency (const Ogre::Real &GlobalTransparencyDistance)
 
void setWaterColor (const Ogre::Vector3 &WaterColor)
 
void setNormalDistortion (const Ogre::Real &NormalDistortion)
 
void setSunPosition (const Ogre::Vector3 &SunPosition)
 
void setSunStrength (const Ogre::Real &SunStrength)
 
void setSunArea (const Ogre::Real &SunArea)
 
void setSunColor (const Ogre::Vector3 &SunColor)
 
void setFoamMaxDistance (const Ogre::Real &FoamMaxDistance)
 
void setFoamScale (const Ogre::Real &FoamScale)
 
void setFoamStart (const Ogre::Real &FoamStart)
 
void setFoamTransparency (const Ogre::Real &FoamTransparency)
 
void setDepthLimit (const Ogre::Real &DepthLimit)
 
void setDistLimit (const Ogre::Real &DistLimit)
 
void setSmoothPower (const Ogre::Real &SmoothPower)
 
void setCausticsScale (const Ogre::Real &CausticsScale)
 
void setCausticsPower (const Ogre::Real &CausticsPower)
 
void setCausticsEnd (const Ogre::Real &CausticsEnd)
 
void setGodRaysExposure (const Ogre::Vector3 &GodRaysExposure)
 
void setGodRaysIntensity (const Ogre::Real &GodRaysIntensity)
 
void setUnderwaterCameraSwitchDelta (const Ogre::Real &UnderwaterCameraSwitchDelta)
 
const bool & isCreated () const
 
void setVisible (const bool &Visible)
 
const bool & isVisible () const
 
Ogre::Camera * getCamera ()
 
Ogre::Viewport * getViewport ()
 
Ogre::SceneManager * getSceneManager ()
 
Mesh * getMesh ()
 
MaterialManager * getMaterialManager ()
 
RttManager * getRttManager ()
 
TextureManager * getTextureManager ()
 
GodRaysManager * getGodRaysManager ()
 
DecalsManager * getDecalsManager ()
 
GPUNormalMapManager * getGPUNormalMapManager ()
 
CfgFileManager * getCfgFileManager ()
 
Module::Module * getModule ()
 
const HydraxComponent & getComponents () const
 
const Ogre::PolygonMode & getPolygonMode () const
 
const MaterialManager::ShaderMode & getShaderMode () const
 
const Ogre::Vector3 & getPosition () const
 
const Ogre::Real & getPlanesError () const
 
float getHeigth (const Ogre::Vector2 &Position)
 
float getHeigth (const Ogre::Vector3 &Position)
 
const Ogre::Real & getFullReflectionDistance () const
 
const Ogre::Real & getGlobalTransparency () const
 
const Ogre::Vector3 & getSunPosition () const
 
const Ogre::Vector3 & getWaterColor () const
 
const Ogre::Real & getNormalDistortion () const
 
const Ogre::Real & getSunStrength () const
 
const Ogre::Real & getSunArea () const
 
const Ogre::Vector3 & getSunColor () const
 
const Ogre::Real & getFoamMaxDistance () const
 
const Ogre::Real & getFoamScale () const
 
const Ogre::Real & getFoamStart () const
 
const Ogre::Real & getFoamTransparency () const
 
const Ogre::Real & getDepthLimit () const
 
const Ogre::Real & getDistLimit () const
 
const Ogre::Real & getSmoothPower () const
 
const Ogre::Real & getCausticsScale () const
 
const Ogre::Real & getCausticsPower () const
 
const Ogre::Real & getCausticsEnd () const
 
const Ogre::Vector3 & getGodRaysExposure () const
 
const Ogre::Real & getGodRaysIntensity () const
 
const Ogre::Real & getUnderwaterCameraSwitchDelta () const
 
const bool & _isCurrentFrameUnderwater () const
 

Private Member Functions

void _updateNM ()
 
void _checkVisible ()
 
void _checkUnderwater (const Ogre::Real &timeSinceLastFrame)
 

Private Attributes

bool mCreated
 
bool mVisible
 
HydraxComponent mComponents
 
MaterialManager::ShaderMode mShaderMode
 
DeviceListener mDeviceListener
 
Ogre::PolygonMode mPolygonMode
 
Ogre::Vector3 mPosition
 
Ogre::Real mPlanesError
 
Ogre::Real mFullReflectionDistance
 
Ogre::Real mGlobalTransparency
 
Ogre::Vector3 mWaterColor
 
Ogre::Real mNormalDistortion
 
Ogre::Vector3 mSunPosition
 
Ogre::Real mSunStrength
 
Ogre::Real mSunArea
 
Ogre::Vector3 mSunColor
 
Ogre::Real mFoamMaxDistance
 
Ogre::Real mFoamScale
 
Ogre::Real mFoamStart
 
Ogre::Real mFoamTransparency
 
Ogre::Real mDepthLimit
 
Ogre::Real mDistLimit
 
Ogre::Real mSmoothPower
 
Ogre::Real mCausticsScale
 
Ogre::Real mCausticsPower
 
Ogre::Real mCausticsEnd
 
Ogre::Vector3 mGodRaysExposure
 
Ogre::Real mGodRaysIntensity
 
Ogre::Real mUnderwaterCameraSwitchDelta
 
bool mCurrentFrameUnderwater
 
Mesh * mMesh
 
MaterialManager * mMaterialManager
 
RttManager * mRttManager
 
TextureManager * mTextureManager
 
GodRaysManager * mGodRaysManager
 
DecalsManager * mDecalsManager
 
GPUNormalMapManager * mGPUNormalMapManager
 
CfgFileManager * mCfgFileManager
 
Module::Module * mModule
 
Ogre::SceneManager * mSceneManager
 
Ogre::Camera * mCamera
 
Ogre::Viewport * mViewport
 

Constructor & Destructor Documentation

◆ Hydrax()

Hydrax::Hydrax::Hydrax ( Ogre::SceneManager *  sm,
Ogre::Camera *  c,
Ogre::Viewport *  v 
)

Constructor.

Parameters
smOgre SceneManager pointer
cOgre Camera pointer
vOgre Main window viewport pointer

Definition at line 37 of file Hydrax.cpp.

◆ ~Hydrax()

Hydrax::Hydrax::~Hydrax ( )

Destructor.

Definition at line 82 of file Hydrax.cpp.

Member Function Documentation

◆ _checkUnderwater()

void Hydrax::Hydrax::_checkUnderwater ( const Ogre::Real &  timeSinceLastFrame)
private

Check for underwater effects.

Parameters
timeSinceLastFrameTime since last frame

Definition at line 632 of file Hydrax.cpp.

◆ _checkVisible()

void Hydrax::Hydrax::_checkVisible ( )
private

setVisible() helper funtion

Definition at line 204 of file Hydrax.cpp.

◆ _isCurrentFrameUnderwater()

const bool & Hydrax::Hydrax::_isCurrentFrameUnderwater ( ) const
inline

Is current frame underwater?

Returns
true If yes, false if not

Definition at line 621 of file Hydrax.h.

◆ _setStrength()

void Hydrax::Hydrax::_setStrength ( const Ogre::Real &  Strength)

Set water strength GPU param.

Parameters
StrengthWater strength GPU param

Definition at line 764 of file Hydrax.cpp.

◆ _updateNM()

void Hydrax::Hydrax::_updateNM ( )
private

Update normal map textures.

◆ create()

void Hydrax::Hydrax::create ( )

Create all resources according with current Hydrax components and add Hydrax to the scene.

Remarks
Call when all params are set

Definition at line 103 of file Hydrax.cpp.

◆ getCamera()

Ogre::Camera * Hydrax::Hydrax::getCamera ( )
inline

Get rendering camera.

Returns
Ogre::Camera pointer

Definition at line 293 of file Hydrax.h.

◆ getCausticsEnd()

const Ogre::Real & Hydrax::Hydrax::getCausticsEnd ( ) const
inline

Get caustics end.

Returns
Caustics end

Definition at line 588 of file Hydrax.h.

◆ getCausticsPower()

const Ogre::Real & Hydrax::Hydrax::getCausticsPower ( ) const
inline

Get caustics power.

Returns
Caustics power

Definition at line 580 of file Hydrax.h.

◆ getCausticsScale()

const Ogre::Real & Hydrax::Hydrax::getCausticsScale ( ) const
inline

Get caustics scale.

Returns
Caustics scale

Definition at line 572 of file Hydrax.h.

◆ getCfgFileManager()

CfgFileManager * Hydrax::Hydrax::getCfgFileManager ( )
inline

Get Hydrax::CfgFileManager.

Returns
Hydrax::CfgFileManager pointer

Definition at line 373 of file Hydrax.h.

◆ getComponents()

const HydraxComponent & Hydrax::Hydrax::getComponents ( ) const
inline

Get hydrax components selected.

Returns
Hydrax components

Definition at line 389 of file Hydrax.h.

◆ getDecalsManager()

DecalsManager * Hydrax::Hydrax::getDecalsManager ( )
inline

Get Hydrax::DecalsManager.

Returns
Hydrax::DecalsManager pointer

Definition at line 357 of file Hydrax.h.

◆ getDepthLimit()

const Ogre::Real & Hydrax::Hydrax::getDepthLimit ( ) const
inline

Get depth limit.

Returns
Depth limit

Definition at line 548 of file Hydrax.h.

◆ getDistLimit()

const Ogre::Real & Hydrax::Hydrax::getDistLimit ( ) const
inline

Get distance limit (viewable underwater)

Returns
Distance limit

Definition at line 556 of file Hydrax.h.

◆ getFoamMaxDistance()

const Ogre::Real & Hydrax::Hydrax::getFoamMaxDistance ( ) const
inline

Get foam max distance.

Returns
Foam max distance

Definition at line 516 of file Hydrax.h.

◆ getFoamScale()

const Ogre::Real & Hydrax::Hydrax::getFoamScale ( ) const
inline

Get foam scale.

Returns
Foam scale

Definition at line 524 of file Hydrax.h.

◆ getFoamStart()

const Ogre::Real & Hydrax::Hydrax::getFoamStart ( ) const
inline

Get foam start.

Returns
Foam start

Definition at line 532 of file Hydrax.h.

◆ getFoamTransparency()

const Ogre::Real & Hydrax::Hydrax::getFoamTransparency ( ) const
inline

Get foam transparency.

Returns
Foam scale

Definition at line 540 of file Hydrax.h.

◆ getFullReflectionDistance()

const Ogre::Real & Hydrax::Hydrax::getFullReflectionDistance ( ) const
inline

Get full reflection distance.

Returns
Hydrax water full reflection distance

Definition at line 452 of file Hydrax.h.

◆ getGlobalTransparency()

const Ogre::Real & Hydrax::Hydrax::getGlobalTransparency ( ) const
inline

Get global transparency.

Returns
Hydrax water global transparency

Definition at line 460 of file Hydrax.h.

◆ getGodRaysExposure()

const Ogre::Vector3 & Hydrax::Hydrax::getGodRaysExposure ( ) const
inline

Get God rays exposure factors.

Returns
God rays exposure factors

Definition at line 596 of file Hydrax.h.

◆ getGodRaysIntensity()

const Ogre::Real & Hydrax::Hydrax::getGodRaysIntensity ( ) const
inline

Get God rays intensity.

Returns
God rays intensity

Definition at line 604 of file Hydrax.h.

◆ getGodRaysManager()

GodRaysManager * Hydrax::Hydrax::getGodRaysManager ( )
inline

Get Hydrax::GodRaysManager.

Returns
Hydrax::GodRaysManager pointer

Definition at line 349 of file Hydrax.h.

◆ getGPUNormalMapManager()

GPUNormalMapManager * Hydrax::Hydrax::getGPUNormalMapManager ( )
inline

Get Hydrax::GPUNormalMapManager.

Returns
Hydrax::GPUNormalMapManager pointer

Definition at line 365 of file Hydrax.h.

◆ getHeigth() [1/2]

float Hydrax::Hydrax::getHeigth ( const Ogre::Vector2 &  Position)
inline

Get the current heigth at a especified world-space point.

Parameters
PositionX/Z World position
Returns
Heigth at the given position in y-World coordinates, if it's outside of the water return -1

Definition at line 430 of file Hydrax.h.

◆ getHeigth() [2/2]

float Hydrax::Hydrax::getHeigth ( const Ogre::Vector3 &  Position)
inline

Get the current heigth at a especified world-space point.

Parameters
PositionX/(Y)/Z World position
Returns
Heigth at the given position in y-World coordinates, if it's outside of the water return -1

Definition at line 444 of file Hydrax.h.

◆ getMaterialManager()

MaterialManager * Hydrax::Hydrax::getMaterialManager ( )
inline

Get Hydrax::MaterialManager.

Returns
Hydrax::MaterialManager pointer

Definition at line 325 of file Hydrax.h.

◆ getMesh()

Mesh * Hydrax::Hydrax::getMesh ( )
inline

Get Hydrax::Mesh.

Returns
Hydrax::Mesh pointer

Definition at line 317 of file Hydrax.h.

◆ getModule()

Module::Module * Hydrax::Hydrax::getModule ( )
inline

Get our Hydrax::Module::Module.

Returns
Hydrax::Module::Module pointer or NULL if Module isn't set.

Definition at line 381 of file Hydrax.h.

◆ getNormalDistortion()

const Ogre::Real & Hydrax::Hydrax::getNormalDistortion ( ) const
inline

Get normal distortion.

Returns
Hydrax normal distortion

Definition at line 484 of file Hydrax.h.

◆ getPlanesError()

const Ogre::Real & Hydrax::Hydrax::getPlanesError ( ) const
inline

Get current clip planes error.

Returns
Current clip planes error

Definition at line 421 of file Hydrax.h.

◆ getPolygonMode()

const Ogre::PolygonMode & Hydrax::Hydrax::getPolygonMode ( ) const
inline

Get current polygon mode.

Returns
Current polygon mode

Definition at line 397 of file Hydrax.h.

◆ getPosition()

const Ogre::Vector3 & Hydrax::Hydrax::getPosition ( ) const
inline

Get water position.

Returns
Water position

Definition at line 413 of file Hydrax.h.

◆ getRttManager()

RttManager * Hydrax::Hydrax::getRttManager ( )
inline

Get Hydrax::RttManager.

Returns
Hydrax::RttManager pointer

Definition at line 333 of file Hydrax.h.

◆ getSceneManager()

Ogre::SceneManager * Hydrax::Hydrax::getSceneManager ( )
inline

Get scene manager.

Returns
Ogre::SceneManager pointer

Definition at line 309 of file Hydrax.h.

◆ getShaderMode()

const MaterialManager::ShaderMode & Hydrax::Hydrax::getShaderMode ( ) const
inline

Get current shader mode.

Returns
Current shader mode

Definition at line 405 of file Hydrax.h.

◆ getSmoothPower()

const Ogre::Real & Hydrax::Hydrax::getSmoothPower ( ) const
inline

Get smooth power.

Returns
Smooth power

Definition at line 564 of file Hydrax.h.

◆ getSunArea()

const Ogre::Real & Hydrax::Hydrax::getSunArea ( ) const
inline

Get sun area.

Returns
Sun area

Definition at line 500 of file Hydrax.h.

◆ getSunColor()

const Ogre::Vector3 & Hydrax::Hydrax::getSunColor ( ) const
inline

Get sun color.

Returns
Sun color

Definition at line 508 of file Hydrax.h.

◆ getSunPosition()

const Ogre::Vector3 & Hydrax::Hydrax::getSunPosition ( ) const
inline

Get sun position.

Returns
Sun position

Definition at line 468 of file Hydrax.h.

◆ getSunStrength()

const Ogre::Real & Hydrax::Hydrax::getSunStrength ( ) const
inline

Get water strength.

Returns
Hydrax water strength

Definition at line 492 of file Hydrax.h.

◆ getTextureManager()

TextureManager * Hydrax::Hydrax::getTextureManager ( )
inline

Get Hydrax::TextureManager.

Returns
Hydrax::TextureManager pointer

Definition at line 341 of file Hydrax.h.

◆ getUnderwaterCameraSwitchDelta()

const Ogre::Real & Hydrax::Hydrax::getUnderwaterCameraSwitchDelta ( ) const
inline

Get the y-displacement under the water needed to change between underwater and overwater mode.

Returns
Underwater camera switch delta
Remarks
Useful to get a nice underwater-overwater transition, it depends of the world scale

Definition at line 613 of file Hydrax.h.

◆ getViewport()

Ogre::Viewport * Hydrax::Hydrax::getViewport ( )
inline

Get main window viewport.

Returns
Ogre::Viewport pointer

Definition at line 301 of file Hydrax.h.

◆ getWaterColor()

const Ogre::Vector3 & Hydrax::Hydrax::getWaterColor ( ) const
inline

Get water color.

Returns
Water color

Definition at line 476 of file Hydrax.h.

◆ isComponent()

bool Hydrax::Hydrax::isComponent ( const HydraxComponent &  Component)

Returns if the especified component is active.

Parameters
ComponentComponent that we want to check

Definition at line 612 of file Hydrax.cpp.

◆ isCreated()

const bool & Hydrax::Hydrax::isCreated ( ) const
inline

Has create() already called?

Returns
true is yes, false if not

Definition at line 270 of file Hydrax.h.

◆ isVisible()

const bool & Hydrax::Hydrax::isVisible ( ) const
inline

Is hydrax water visible?

Returns
true if yes, false if not

Definition at line 285 of file Hydrax.h.

◆ loadCfg()

const bool Hydrax::Hydrax::loadCfg ( const Ogre::String &  File) const
inline

Load config from file.

Parameters
FileFile name
Returns
false if an error has been ocurred(Check the log file in this case).
Remarks
The file must be registred in Hydrax resource group. If module isn't set, or module isn't the same from config file, module options won't be loaded.

Definition at line 142 of file Hydrax.h.

◆ remove()

void Hydrax::Hydrax::remove ( )

Remove hydrax, you can call this method to remove Hydrax from the scene or release (secondary) Hydrax memory, call create() to return Hydrax to the scene.

Definition at line 177 of file Hydrax.cpp.

◆ rotate()

void Hydrax::Hydrax::rotate ( const Ogre::Quaternion &  q)

Rotate water and planes.

Parameters
qconst Ogre::Quaternion&

Definition at line 743 of file Hydrax.cpp.

◆ saveCfg()

const bool Hydrax::Hydrax::saveCfg ( const Ogre::String &  File,
const Ogre::String &  Path = "" 
) const
inline

Save hydrax config to file.

Parameters
FileFile name
PathFile path
Returns
false if an error has been ocurred(Check the log file in this case).
Remarks
If module isn't set, module/noise options won't be saved.

Definition at line 130 of file Hydrax.h.

◆ setCausticsEnd()

void Hydrax::Hydrax::setCausticsEnd ( const Ogre::Real &  CausticsEnd)

Set caustics end.

Parameters
CausticsEndCaustics end

Definition at line 1146 of file Hydrax.cpp.

◆ setCausticsPower()

void Hydrax::Hydrax::setCausticsPower ( const Ogre::Real &  CausticsPower)

Set caustics power.

Parameters
CausticsPowerCaustics power

Definition at line 1118 of file Hydrax.cpp.

◆ setCausticsScale()

void Hydrax::Hydrax::setCausticsScale ( const Ogre::Real &  CausticsScale)

Set caustics scale.

Parameters
CausticsScaleCaustics scale

Definition at line 1104 of file Hydrax.cpp.

◆ setComponents()

void Hydrax::Hydrax::setComponents ( const HydraxComponent &  Components)

Set Hydrax components.

Parameters
ComponentsComponents
Remarks
It can be called after create(), Components will be updated

Definition at line 302 of file Hydrax.cpp.

◆ setDepthLimit()

void Hydrax::Hydrax::setDepthLimit ( const Ogre::Real &  DepthLimit)

Set depth limit.

Parameters
DepthLimitDepth limit

Definition at line 1052 of file Hydrax.cpp.

◆ setDistLimit()

void Hydrax::Hydrax::setDistLimit ( const Ogre::Real &  DistLimit)

Set distance limit underwater (occlusion)

Parameters
DistLimitDistance limit

Definition at line 1071 of file Hydrax.cpp.

◆ setFoamMaxDistance()

void Hydrax::Hydrax::setFoamMaxDistance ( const Ogre::Real &  FoamMaxDistance)

Set foam max distance.

Parameters
FoamMaxDistanceFoam max distance

Definition at line 968 of file Hydrax.cpp.

◆ setFoamScale()

void Hydrax::Hydrax::setFoamScale ( const Ogre::Real &  FoamScale)

Set foam scale.

Parameters
FoamScaleFoam scale

Definition at line 989 of file Hydrax.cpp.

◆ setFoamStart()

void Hydrax::Hydrax::setFoamStart ( const Ogre::Real &  FoamStart)

Set foam start.

Parameters
FoamStartFoam start

Definition at line 1010 of file Hydrax.cpp.

◆ setFoamTransparency()

void Hydrax::Hydrax::setFoamTransparency ( const Ogre::Real &  FoamTransparency)

Set foam transparency.

Parameters
FoamTransparencyFoam transparency

Definition at line 1031 of file Hydrax.cpp.

◆ setFullReflectionDistance()

void Hydrax::Hydrax::setFullReflectionDistance ( const Ogre::Real &  FullReflectionDistance)

Set full reflection distance.

Parameters
FullReflectionDistanceFull reflection distance

Definition at line 783 of file Hydrax.cpp.

◆ setGlobalTransparency()

void Hydrax::Hydrax::setGlobalTransparency ( const Ogre::Real &  GlobalTransparencyDistance)

Definition at line 799 of file Hydrax.cpp.

◆ setGodRaysExposure()

void Hydrax::Hydrax::setGodRaysExposure ( const Ogre::Vector3 &  GodRaysExposure)
inline

Set god rays exposure.

Parameters
GodRaysExposureGod rays exposure

Definition at line 245 of file Hydrax.h.

◆ setGodRaysIntensity()

void Hydrax::Hydrax::setGodRaysIntensity ( const Ogre::Real &  GodRaysIntensity)
inline

Set god rays intensity.

Parameters
GodRaysIntensityGod rays intensity

Definition at line 253 of file Hydrax.h.

◆ setModule()

void Hydrax::Hydrax::setModule ( Module::Module *  Module,
const bool &  DeleteOldModule = true 
)

Set Hydrax module.

Parameters
ModuleHydrax module
DeleteOldModuleDelete, if exists, the old module
Remarks
Module will be set before call create()

Definition at line 527 of file Hydrax.cpp.

◆ setNormalDistortion()

void Hydrax::Hydrax::setNormalDistortion ( const Ogre::Real &  NormalDistortion)

Set normal distortion.

Parameters
NormalDistortionuse low value, like 0.025

Definition at line 868 of file Hydrax.cpp.

◆ setPlanesError()

void Hydrax::Hydrax::setPlanesError ( const Ogre::Real &  PlanesError)

Set clip planes error.

Parameters
PlanesErrorClip planes error

Definition at line 759 of file Hydrax.cpp.

◆ setPolygonMode()

void Hydrax::Hydrax::setPolygonMode ( const Ogre::PolygonMode &  PM)

Set polygon mode (Solid, Wireframe, Points)

Parameters
PMPolygon mode

Definition at line 262 of file Hydrax.cpp.

◆ setPosition()

void Hydrax::Hydrax::setPosition ( const Ogre::Vector3 &  Position)

Set water position.

Parameters
PositionWater position

Definition at line 720 of file Hydrax.cpp.

◆ setShaderMode()

void Hydrax::Hydrax::setShaderMode ( const MaterialManager::ShaderMode &  ShaderMode)

Set shader mode.

Parameters
ShaderModeShader mode

Definition at line 279 of file Hydrax.cpp.

◆ setSmoothPower()

void Hydrax::Hydrax::setSmoothPower ( const Ogre::Real &  SmoothPower)

Set smooth power.

Parameters
SmoothPowerSmooth power
Remarks
Less values more transition distance, hight values short transition values, 1-50 range(aprox.)

Definition at line 1090 of file Hydrax.cpp.

◆ setSunArea()

void Hydrax::Hydrax::setSunArea ( const Ogre::Real &  SunArea)

Set sun area.

Parameters
SunAreaSun area

Definition at line 926 of file Hydrax.cpp.

◆ setSunColor()

void Hydrax::Hydrax::setSunColor ( const Ogre::Vector3 &  SunColor)

Set sun color.

Parameters
SunColorSun color

Definition at line 947 of file Hydrax.cpp.

◆ setSunPosition()

void Hydrax::Hydrax::setSunPosition ( const Ogre::Vector3 &  SunPosition)

Set sun position.

Parameters
SunPositionSun position

Definition at line 884 of file Hydrax.cpp.

◆ setSunStrength()

void Hydrax::Hydrax::setSunStrength ( const Ogre::Real &  SunStrength)

Set sun strength.

Parameters
SunStrengthSun strength

Definition at line 905 of file Hydrax.cpp.

◆ setUnderwaterCameraSwitchDelta()

void Hydrax::Hydrax::setUnderwaterCameraSwitchDelta ( const Ogre::Real &  UnderwaterCameraSwitchDelta)
inline

Set the y-displacement under the water needed to change between underwater and overwater mode.

Parameters
UnderwaterCameraSwitchDeltaUnderwater camera switch delta factor
Remarks
Useful to get a nice underwater-overwater transition, it depends of the world scale

Definition at line 262 of file Hydrax.h.

◆ setVisible()

void Hydrax::Hydrax::setVisible ( const bool &  Visible)

Show/Hide hydrax water.

Parameters
Visibletrue to show, false to hide
Remarks
Resources aren't going to be realeased(Use remove() for this), only RTT's are going to be stopped.

Definition at line 197 of file Hydrax.cpp.

◆ setWaterColor()

void Hydrax::Hydrax::setWaterColor ( const Ogre::Vector3 &  WaterColor)

Definition at line 815 of file Hydrax.cpp.

◆ update()

void Hydrax::Hydrax::update ( const Ogre::Real &  timeSinceLastFrame)

Call every frame.

Definition at line 291 of file Hydrax.cpp.

Field Documentation

◆ mCamera

Ogre::Camera* Hydrax::Hydrax::mCamera
private

Pointer to Ogre::Camera.

Definition at line 752 of file Hydrax.h.

◆ mCausticsEnd

Ogre::Real Hydrax::Hydrax::mCausticsEnd
private

Caustics end.

Definition at line 717 of file Hydrax.h.

◆ mCausticsPower

Ogre::Real Hydrax::Hydrax::mCausticsPower
private

Caustics power.

Definition at line 715 of file Hydrax.h.

◆ mCausticsScale

Ogre::Real Hydrax::Hydrax::mCausticsScale
private

Caustics scale param.

Definition at line 713 of file Hydrax.h.

◆ mCfgFileManager

CfgFileManager* Hydrax::Hydrax::mCfgFileManager
private

Our Hydrax::CfgFileManager pointer.

Definition at line 745 of file Hydrax.h.

◆ mComponents

HydraxComponent Hydrax::Hydrax::mComponents
private

Hydrax components.

Definition at line 663 of file Hydrax.h.

◆ mCreated

bool Hydrax::Hydrax::mCreated
private

Has create() already called?

Definition at line 657 of file Hydrax.h.

◆ mCurrentFrameUnderwater

bool Hydrax::Hydrax::mCurrentFrameUnderwater
private

Is current frame underwater?

Definition at line 728 of file Hydrax.h.

◆ mDecalsManager

DecalsManager* Hydrax::Hydrax::mDecalsManager
private

Our Hydrax::DecalsManager pointer.

Definition at line 741 of file Hydrax.h.

◆ mDepthLimit

Ogre::Real Hydrax::Hydrax::mDepthLimit
private

Depth limit param.

Definition at line 705 of file Hydrax.h.

◆ mDeviceListener

DeviceListener Hydrax::Hydrax::mDeviceListener
private

Device listener.

Definition at line 668 of file Hydrax.h.

◆ mDistLimit

Ogre::Real Hydrax::Hydrax::mDistLimit
private

Distance limit param (viewable underwater)

Definition at line 707 of file Hydrax.h.

◆ mFoamMaxDistance

Ogre::Real Hydrax::Hydrax::mFoamMaxDistance
private

Foam max distance param.

Definition at line 696 of file Hydrax.h.

◆ mFoamScale

Ogre::Real Hydrax::Hydrax::mFoamScale
private

Foam scale param.

Definition at line 698 of file Hydrax.h.

◆ mFoamStart

Ogre::Real Hydrax::Hydrax::mFoamStart
private

Foam start param.

Definition at line 700 of file Hydrax.h.

◆ mFoamTransparency

Ogre::Real Hydrax::Hydrax::mFoamTransparency
private

Foam transparency param.

Definition at line 702 of file Hydrax.h.

◆ mFullReflectionDistance

Ogre::Real Hydrax::Hydrax::mFullReflectionDistance
private

Full reflection distance param.

Definition at line 678 of file Hydrax.h.

◆ mGlobalTransparency

Ogre::Real Hydrax::Hydrax::mGlobalTransparency
private

Global transparency param.

Definition at line 680 of file Hydrax.h.

◆ mGodRaysExposure

Ogre::Vector3 Hydrax::Hydrax::mGodRaysExposure
private

God rays exposure factors.

Definition at line 720 of file Hydrax.h.

◆ mGodRaysIntensity

Ogre::Real Hydrax::Hydrax::mGodRaysIntensity
private

God rays intensity.

Definition at line 722 of file Hydrax.h.

◆ mGodRaysManager

GodRaysManager* Hydrax::Hydrax::mGodRaysManager
private

Our Hydrax::GodRaysManager pointer.

Definition at line 739 of file Hydrax.h.

◆ mGPUNormalMapManager

GPUNormalMapManager* Hydrax::Hydrax::mGPUNormalMapManager
private

Our Hydrax::GPUNormalMapManager pointer.

Definition at line 743 of file Hydrax.h.

◆ mMaterialManager

MaterialManager* Hydrax::Hydrax::mMaterialManager
private

Our Hydrax::MaterialManager.

Definition at line 733 of file Hydrax.h.

◆ mMesh

Mesh* Hydrax::Hydrax::mMesh
private

Our Hydrax::Mesh pointer.

Definition at line 731 of file Hydrax.h.

◆ mModule

Module::Module* Hydrax::Hydrax::mModule
private

Our Hydrax::Module::Module pointer.

Definition at line 747 of file Hydrax.h.

◆ mNormalDistortion

Ogre::Real Hydrax::Hydrax::mNormalDistortion
private

Normal distortion param.

Definition at line 684 of file Hydrax.h.

◆ mPlanesError

Ogre::Real Hydrax::Hydrax::mPlanesError
private

Planes error, y axis clipplanes displacement.

Definition at line 675 of file Hydrax.h.

◆ mPolygonMode

Ogre::PolygonMode Hydrax::Hydrax::mPolygonMode
private

Polygon mode (Solid, Wireframe, Points)

Definition at line 671 of file Hydrax.h.

◆ mPosition

Ogre::Vector3 Hydrax::Hydrax::mPosition
private

Water position.

Definition at line 673 of file Hydrax.h.

◆ mRttManager

RttManager* Hydrax::Hydrax::mRttManager
private

Our Hydrax::RttManager.

Definition at line 735 of file Hydrax.h.

◆ mSceneManager

Ogre::SceneManager* Hydrax::Hydrax::mSceneManager
private

Pointer to Ogre::SceneManager.

Definition at line 750 of file Hydrax.h.

◆ mShaderMode

MaterialManager::ShaderMode Hydrax::Hydrax::mShaderMode
private

Current shader mode.

Definition at line 665 of file Hydrax.h.

◆ mSmoothPower

Ogre::Real Hydrax::Hydrax::mSmoothPower
private

Smooth power param.

Definition at line 710 of file Hydrax.h.

◆ mSunArea

Ogre::Real Hydrax::Hydrax::mSunArea
private

Sun area.

Definition at line 691 of file Hydrax.h.

◆ mSunColor

Ogre::Vector3 Hydrax::Hydrax::mSunColor
private

Sun color.

Definition at line 693 of file Hydrax.h.

◆ mSunPosition

Ogre::Vector3 Hydrax::Hydrax::mSunPosition
private

Sun position.

Definition at line 687 of file Hydrax.h.

◆ mSunStrength

Ogre::Real Hydrax::Hydrax::mSunStrength
private

Sun strength param.

Definition at line 689 of file Hydrax.h.

◆ mTextureManager

TextureManager* Hydrax::Hydrax::mTextureManager
private

Our Hydrax::TextureManager pointer.

Definition at line 737 of file Hydrax.h.

◆ mUnderwaterCameraSwitchDelta

Ogre::Real Hydrax::Hydrax::mUnderwaterCameraSwitchDelta
private

Definition at line 725 of file Hydrax.h.

◆ mViewport

Ogre::Viewport* Hydrax::Hydrax::mViewport
private

Pointer to main window viewport.

Definition at line 754 of file Hydrax.h.

◆ mVisible

bool Hydrax::Hydrax::mVisible
private

Is hydrax water visible?

Definition at line 660 of file Hydrax.h.

◆ mWaterColor

Ogre::Vector3 Hydrax::Hydrax::mWaterColor
private

Water color param.

Definition at line 682 of file Hydrax.h.


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