diff options
author | jjesswan <jessica_wan@brown.edu> | 2024-05-07 01:32:02 -0400 |
---|---|---|
committer | jjesswan <jessica_wan@brown.edu> | 2024-05-07 01:32:02 -0400 |
commit | cb868acadcae4e3f497ecdabeca507f3e73e01c7 (patch) | |
tree | f7caa27311d6a7291be66cf98376223f7f283179 /src/ocean/ocean_alt.cpp | |
parent | eb8af873097ce73a22139db4924ebd41d766f011 (diff) |
add more accurate foam height saturation, poppping bubble effect
Diffstat (limited to 'src/ocean/ocean_alt.cpp')
-rw-r--r-- | src/ocean/ocean_alt.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/ocean/ocean_alt.cpp b/src/ocean/ocean_alt.cpp index 5dcfd74..20c663c 100644 --- a/src/ocean/ocean_alt.cpp +++ b/src/ocean/ocean_alt.cpp @@ -332,10 +332,12 @@ std::vector<Eigen::Vector3f> ocean_alt::get_vertices() // m_foam_constants.wavelengths[i] = 2.f* M_PI * m_slopes[i].dot(m_slopes[i]) / Lx; - m_foam_constants.wavelengths[i] = ((height -200 ) / (1000.f -200 )); + float h_0 = m_waveIndexConstants[i].h0_prime[0]; // min*.2f; + float h_max = max*.01f; // the smaller the constant, the more foam there is + m_foam_constants.wavelengths[i] = (height - h_0 ) / (h_max - h_0); // if (i < 5){ -// //std::cout << min << ", " << max << std::endl; +// std::cout << h_0 << ", " << h_max << std::endl; // std::cout << m_foam_constants.wavelengths[i] << std::endl; // } |