Skip to main content

WindQuery

Trait WindQuery 

Source
pub trait WindQuery: Debug {
    // Required method
    fn wind_at(&self, position: DVec3) -> DVec3;
}
Expand description

What the air is doing at a point, right now.

The one question physics asks the wind. It is a velocity, in metres per second, in world space — not a force and not a direction-and-speed pair, because what a drag model needs is w − v and every other shape would have the caller rebuild that.

Implementations are expected to be pure: the same position at the same tick answers the same velocity, bit for bit. crcbl-wind’s field is, and its determinism test is what says so.

Required Methods§

Source

fn wind_at(&self, position: DVec3) -> DVec3

The wind velocity at a world-space position, in m/s.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§