![]() |
Rigs of Rods 2026.01
Soft-body Physics Simulation
|
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.
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) |
| Hydrax::Hydrax::Hydrax | ( | Ogre::SceneManager * | sm, |
| Ogre::Camera * | c, | ||
| Ogre::Viewport * | v | ||
| ) |
Constructor.
Definition at line 37 of file Hydrax.cpp.
| Hydrax::Hydrax::~Hydrax | ( | ) |
Destructor.
Definition at line 82 of file Hydrax.cpp.
|
private |
Check for underwater effects.
| timeSinceLastFrame | Time since last frame |
Definition at line 632 of file Hydrax.cpp.
|
private |
setVisible() helper funtion
Definition at line 204 of file Hydrax.cpp.
|
inline |
| void Hydrax::Hydrax::_setStrength | ( | const Ogre::Real & | Strength | ) |
Set water strength GPU param.
| Strength | Water strength GPU param |
Definition at line 764 of file Hydrax.cpp.
|
private |
Update normal map textures.
| void Hydrax::Hydrax::create | ( | ) |
Create all resources according with current Hydrax components and add Hydrax to the scene.
Definition at line 103 of file Hydrax.cpp.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Get Hydrax::GPUNormalMapManager.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Get our Hydrax::Module::Module.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
| bool Hydrax::Hydrax::isComponent | ( | const HydraxComponent & | Component | ) |
Returns if the especified component is active.
| Component | Component that we want to check |
Definition at line 612 of file Hydrax.cpp.
|
inline |
|
inline |
|
inline |
Load config from file.
| File | File name |
| void Hydrax::Hydrax::remove | ( | ) |
| void Hydrax::Hydrax::rotate | ( | const Ogre::Quaternion & | q | ) |
Rotate water and planes.
| q | const Ogre::Quaternion& |
Definition at line 743 of file Hydrax.cpp.
|
inline |
| void Hydrax::Hydrax::setCausticsEnd | ( | const Ogre::Real & | CausticsEnd | ) |
| void Hydrax::Hydrax::setCausticsPower | ( | const Ogre::Real & | CausticsPower | ) |
Set caustics power.
| CausticsPower | Caustics power |
Definition at line 1118 of file Hydrax.cpp.
| void Hydrax::Hydrax::setCausticsScale | ( | const Ogre::Real & | CausticsScale | ) |
Set caustics scale.
| CausticsScale | Caustics scale |
Definition at line 1104 of file Hydrax.cpp.
| void Hydrax::Hydrax::setComponents | ( | const HydraxComponent & | Components | ) |
Set Hydrax components.
| Components | Components |
Definition at line 302 of file Hydrax.cpp.
| void Hydrax::Hydrax::setDepthLimit | ( | const Ogre::Real & | DepthLimit | ) |
| void Hydrax::Hydrax::setDistLimit | ( | const Ogre::Real & | DistLimit | ) |
Set distance limit underwater (occlusion)
| DistLimit | Distance limit |
Definition at line 1071 of file Hydrax.cpp.
| void Hydrax::Hydrax::setFoamMaxDistance | ( | const Ogre::Real & | FoamMaxDistance | ) |
Set foam max distance.
| FoamMaxDistance | Foam max distance |
Definition at line 968 of file Hydrax.cpp.
| void Hydrax::Hydrax::setFoamScale | ( | const Ogre::Real & | FoamScale | ) |
| void Hydrax::Hydrax::setFoamStart | ( | const Ogre::Real & | FoamStart | ) |
| void Hydrax::Hydrax::setFoamTransparency | ( | const Ogre::Real & | FoamTransparency | ) |
Set foam transparency.
| FoamTransparency | Foam transparency |
Definition at line 1031 of file Hydrax.cpp.
| void Hydrax::Hydrax::setFullReflectionDistance | ( | const Ogre::Real & | FullReflectionDistance | ) |
Set full reflection distance.
| FullReflectionDistance | Full reflection distance |
Definition at line 783 of file Hydrax.cpp.
| void Hydrax::Hydrax::setGlobalTransparency | ( | const Ogre::Real & | GlobalTransparencyDistance | ) |
Definition at line 799 of file Hydrax.cpp.
|
inline |
|
inline |
| void Hydrax::Hydrax::setModule | ( | Module::Module * | Module, |
| const bool & | DeleteOldModule = true |
||
| ) |
| void Hydrax::Hydrax::setNormalDistortion | ( | const Ogre::Real & | NormalDistortion | ) |
Set normal distortion.
| NormalDistortion | use low value, like 0.025 |
Definition at line 868 of file Hydrax.cpp.
| void Hydrax::Hydrax::setPlanesError | ( | const Ogre::Real & | PlanesError | ) |
Set clip planes error.
| PlanesError | Clip planes error |
Definition at line 759 of file Hydrax.cpp.
| void Hydrax::Hydrax::setPolygonMode | ( | const Ogre::PolygonMode & | PM | ) |
Set polygon mode (Solid, Wireframe, Points)
| PM | Polygon mode |
Definition at line 262 of file Hydrax.cpp.
| void Hydrax::Hydrax::setPosition | ( | const Ogre::Vector3 & | Position | ) |
| void Hydrax::Hydrax::setShaderMode | ( | const MaterialManager::ShaderMode & | ShaderMode | ) |
| void Hydrax::Hydrax::setSmoothPower | ( | const Ogre::Real & | SmoothPower | ) |
Set smooth power.
| SmoothPower | Smooth power |
Definition at line 1090 of file Hydrax.cpp.
| void Hydrax::Hydrax::setSunArea | ( | const Ogre::Real & | SunArea | ) |
| void Hydrax::Hydrax::setSunColor | ( | const Ogre::Vector3 & | SunColor | ) |
| void Hydrax::Hydrax::setSunPosition | ( | const Ogre::Vector3 & | SunPosition | ) |
| void Hydrax::Hydrax::setSunStrength | ( | const Ogre::Real & | SunStrength | ) |
|
inline |
Set the y-displacement under the water needed to change between underwater and overwater mode.
| UnderwaterCameraSwitchDelta | Underwater camera switch delta factor |
| void Hydrax::Hydrax::setVisible | ( | const bool & | Visible | ) |
Show/Hide hydrax water.
| Visible | true to show, false to hide |
Definition at line 197 of file Hydrax.cpp.
| void Hydrax::Hydrax::setWaterColor | ( | const Ogre::Vector3 & | WaterColor | ) |
Definition at line 815 of file Hydrax.cpp.
| void Hydrax::Hydrax::update | ( | const Ogre::Real & | timeSinceLastFrame | ) |
Call every frame.
Definition at line 291 of file Hydrax.cpp.
|
private |
|
private |
|
private |
|
private |
|
private |
Our Hydrax::CfgFileManager pointer.
|
private |
|
private |
|
private |
|
private |
Our Hydrax::DecalsManager pointer.
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
Our Hydrax::GodRaysManager pointer.
|
private |
Our Hydrax::GPUNormalMapManager pointer.
|
private |
|
private |
Our Hydrax::Mesh pointer.
|
private |
Our Hydrax::Module::Module pointer.
|
private |
|
private |
|
private |
|
private |
|
private |
Our Hydrax::RttManager.
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
Our Hydrax::TextureManager pointer.
|
private |
|
private |
|
private |
|
private |