![]() |
Rigs of Rods 2023.09
Soft-body Physics Simulation
|
< Water physics, see 'wavefield.cfg' in your config directory. More...
#include <Wavefield.h>
Data Structures | |
| struct | WaveTrain |
Public Member Functions | |
| Wavefield (Vec3 terrn_size) | |
| float | GetStaticWaterHeight () |
| Returns static water level configured in 'terrn2'. | |
| void | SetStaticWaterHeight (float value) |
| void | SetWavesHeight (float) |
| float | CalcWavesHeight (Vec3 pos, float timeshift_sec=0.f) |
| Vec3 | CalcWavesVelocity (Vec3 pos, float timeshift_sec=0.f) |
| void | FrameStepWaveField (float dt) |
| bool | IsUnderWater (Vec3 pos) |
| float | GetWaveHeight (Vec3 pos) |
Private Attributes | |
| std::vector< WaveTrain > | m_wavetrain_defs |
| float | m_waterplane_mesh_scale = 1.f |
| float | m_water_height = 0.f |
| float | m_waves_height = 0.f |
| float | m_bottom_height = 0.f |
| float | m_max_ampl = 0.f |
| float | m_sim_time_counter = 0.f |
| Elapsed simulation time in seconds. | |
| Vec3 | m_map_size |
< Water physics, see 'wavefield.cfg' in your config directory.
Definition at line 32 of file Wavefield.h.
| Wavefield::Wavefield | ( | Vec3 | terrn_size | ) |
Definition at line 35 of file Wavefield.cpp.
| float Wavefield::CalcWavesHeight | ( | Vec3 | pos, |
| float | timeshift_sec = 0.f |
||
| ) |
Definition at line 90 of file Wavefield.cpp.
Definition at line 139 of file Wavefield.cpp.
| void Wavefield::FrameStepWaveField | ( | float | dt | ) |
Definition at line 165 of file Wavefield.cpp.
| float Wavefield::GetStaticWaterHeight | ( | ) |
Returns static water level configured in 'terrn2'.
Definition at line 75 of file Wavefield.cpp.
| float Wavefield::GetWaveHeight | ( | Vec3 | pos | ) |
Definition at line 170 of file Wavefield.cpp.
| bool Wavefield::IsUnderWater | ( | Vec3 | pos | ) |
Definition at line 122 of file Wavefield.cpp.
| void Wavefield::SetStaticWaterHeight | ( | float | value | ) |
Definition at line 80 of file Wavefield.cpp.
| void Wavefield::SetWavesHeight | ( | float | value | ) |
Definition at line 85 of file Wavefield.cpp.
|
private |
Definition at line 63 of file Wavefield.h.
|
private |
Definition at line 66 of file Wavefield.h.
|
private |
Definition at line 64 of file Wavefield.h.
|
private |
Elapsed simulation time in seconds.
Definition at line 65 of file Wavefield.h.
|
private |
Definition at line 61 of file Wavefield.h.
|
private |
Definition at line 60 of file Wavefield.h.
|
private |
Definition at line 62 of file Wavefield.h.
|
private |
Definition at line 58 of file Wavefield.h.