raisin::WaterFlowSample
struct · #include <rayrai/Water.hpp>
Simulated water at one horizontal position (RayraiWindow::sampleWaterFlow()).
Moving bodies are not part of the bed it reports. Where one stands or floats in the water the sample holds the water around it: the surface and velocity of the nearest water the moving bodies leave uncovered and the depth of that surface over the bed below the body, so a body can sample the water it sits in to apply buoyancy and drag.
Public attributes
inside
bool insideThe position lies within a simulated body.
wet
bool wetThe water there is deeper than 1 mm.
surfaceHeight
double surfaceHeightWorld z of the water surface (the bed where dry), metres.
bedHeight
double bedHeightWorld z of the bed without the moving bodies, metres.
depth
double depthWater depth, metres.
velocity
glm::dvec2 velocityDepth-averaged horizontal velocity in the world frame, m/s.
timeSeconds
double timeSecondsWater time of the simulated state sampled; it trails the last render by a frame or two.