Rigs of Rods 2023.09
Soft-body Physics Simulation
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Loading...
Searching...
No Matches
Data Structures | Public Member Functions | Private Attributes
RoR::Wavefield Class Reference

< 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< WaveTrainm_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
 

Detailed Description

< Water physics, see 'wavefield.cfg' in your config directory.

Definition at line 32 of file Wavefield.h.

Constructor & Destructor Documentation

◆ Wavefield()

Wavefield::Wavefield ( Vec3  terrn_size)

Definition at line 35 of file Wavefield.cpp.

Member Function Documentation

◆ CalcWavesHeight()

float Wavefield::CalcWavesHeight ( Vec3  pos,
float  timeshift_sec = 0.f 
)

Definition at line 90 of file Wavefield.cpp.

◆ CalcWavesVelocity()

Vec3 Wavefield::CalcWavesVelocity ( Vec3  pos,
float  timeshift_sec = 0.f 
)

Definition at line 139 of file Wavefield.cpp.

◆ FrameStepWaveField()

void Wavefield::FrameStepWaveField ( float  dt)

Definition at line 165 of file Wavefield.cpp.

◆ GetStaticWaterHeight()

float Wavefield::GetStaticWaterHeight ( )

Returns static water level configured in 'terrn2'.

Definition at line 75 of file Wavefield.cpp.

◆ GetWaveHeight()

float Wavefield::GetWaveHeight ( Vec3  pos)

Definition at line 170 of file Wavefield.cpp.

◆ IsUnderWater()

bool Wavefield::IsUnderWater ( Vec3  pos)

Definition at line 122 of file Wavefield.cpp.

◆ SetStaticWaterHeight()

void Wavefield::SetStaticWaterHeight ( float  value)

Definition at line 80 of file Wavefield.cpp.

◆ SetWavesHeight()

void Wavefield::SetWavesHeight ( float  value)

Definition at line 85 of file Wavefield.cpp.

Field Documentation

◆ m_bottom_height

float RoR::Wavefield::m_bottom_height = 0.f
private

Definition at line 63 of file Wavefield.h.

◆ m_map_size

Vec3 RoR::Wavefield::m_map_size
private

Definition at line 66 of file Wavefield.h.

◆ m_max_ampl

float RoR::Wavefield::m_max_ampl = 0.f
private

Definition at line 64 of file Wavefield.h.

◆ m_sim_time_counter

float RoR::Wavefield::m_sim_time_counter = 0.f
private

Elapsed simulation time in seconds.

Definition at line 65 of file Wavefield.h.

◆ m_water_height

float RoR::Wavefield::m_water_height = 0.f
private

Definition at line 61 of file Wavefield.h.

◆ m_waterplane_mesh_scale

float RoR::Wavefield::m_waterplane_mesh_scale = 1.f
private

Definition at line 60 of file Wavefield.h.

◆ m_waves_height

float RoR::Wavefield::m_waves_height = 0.f
private

Definition at line 62 of file Wavefield.h.

◆ m_wavetrain_defs

std::vector<WaveTrain> RoR::Wavefield::m_wavetrain_defs
private

Definition at line 58 of file Wavefield.h.


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