summaryrefslogtreecommitdiff
path: root/src/ocean
diff options
context:
space:
mode:
Diffstat (limited to 'src/ocean')
-rw-r--r--src/ocean/ocean_alt.cpp2
-rw-r--r--src/ocean/ocean_alt.h7
2 files changed, 6 insertions, 3 deletions
diff --git a/src/ocean/ocean_alt.cpp b/src/ocean/ocean_alt.cpp
index 9ead324..751fca5 100644
--- a/src/ocean/ocean_alt.cpp
+++ b/src/ocean/ocean_alt.cpp
@@ -386,6 +386,8 @@ void ocean_alt::update_ocean()
OceanSpray s;
s.height = v;
s.slope = norm;
+ s.slope_vector = Eigen::Vector2f(m_slopes_x[i][0], m_slopes_z[i][0]);
+ //std::cout << s.slope_vector << std::endl;
m_heights.push_back(s);
}
diff --git a/src/ocean/ocean_alt.h b/src/ocean/ocean_alt.h
index bbfce9a..7e293f9 100644
--- a/src/ocean/ocean_alt.h
+++ b/src/ocean/ocean_alt.h
@@ -30,6 +30,7 @@ struct FoamConstants{
struct OceanSpray{
Eigen::Vector3f height;
Eigen::Vector3f slope;
+ Eigen::Vector2f slope_vector;
};
@@ -79,8 +80,8 @@ private:
const double Lx = 512.0;
const double Lz = 512.0;
- const int num_rows = 128;
- const int num_cols = 128;
+ const int num_rows = 256;
+ const int num_cols = 256;
const int num_tiles_x = 1;
const int num_tiles_z = 1;
@@ -91,7 +92,7 @@ private:
const double lambda = .5; // how much displacement matters
const double spacing = 1.0; // spacing between grid points
- const double A = 100; // numeric constant for the Phillips spectrum
+ const double A = 10000; // numeric constant for the Phillips spectrum
const double V = 100; // wind speed
const double gravity = 9.81;
const double L = V*V/gravity;