15namespace visual::scatter
21 double x = 0.0, y = 0.0,
z = 0.0;
31 double x = 0.0, y = 0.0,
z = 0.0;
48 std::uint32_t seed = 1;
54 std::vector<Rock> rocks;
55 std::vector<Kelp> kelp;
68Scatter ScatterSeabed(
const ScatterSpec& spec,
const std::function<
double(
double,
double)>& depth);
73 std::vector<std::array<float, 3>> positions;
74 std::vector<std::array<float, 3>> normals;
84Mesh MakeRock(std::uint32_t seed,
int subdivisions = 2);
One kelp plant (a few blades from one holdfast).
Definition SeabedScatter.h:30
double height
Length of the blades [m].
Definition SeabedScatter.h:32
int blades
Number of blades.
Definition SeabedScatter.h:33
double yaw
Turn of the blade fan [rad].
Definition SeabedScatter.h:35
double phase
Phase of its sway [rad].
Definition SeabedScatter.h:34
double z
Holdfast on the seabed [m].
Definition SeabedScatter.h:31
A triangle mesh with smooth normals.
Definition SeabedScatter.h:72
std::vector< std::uint32_t > indices
Three per triangle, counter-clockwise seen from outside.
Definition SeabedScatter.h:75
One loose rock.
Definition SeabedScatter.h:20
int variant
Which of the rock shapes.
Definition SeabedScatter.h:25
double z
Centre of the base, on the seabed [m].
Definition SeabedScatter.h:21
double tilt
Tilt [rad] about a horizontal axis at angle yaw.
Definition SeabedScatter.h:24
double yaw
Turn about the vertical [rad].
Definition SeabedScatter.h:23
double size
Diameter [m].
Definition SeabedScatter.h:22
Where to scatter, and how much.
Definition SeabedScatter.h:40
double centreY
Centre of the square [m].
Definition SeabedScatter.h:41
int variants
Number of rock shapes.
Definition SeabedScatter.h:47
double halfSize
Half the side of the square [m].
Definition SeabedScatter.h:42
double mudDepth
No rocks below about this depth (mud).
Definition SeabedScatter.h:46
double rockDensity
Rocks per m^2 on rocky ground (fewer on sand and mud).
Definition SeabedScatter.h:43
double kelpDensity
Kelp plants per m^2 inside a kelp patch.
Definition SeabedScatter.h:44
double kelpDepth
Kelp only where the seabed is shallower [m].
Definition SeabedScatter.h:45
The scattered elements.
Definition SeabedScatter.h:53