pub struct WaterBody {
pub outline: Vec<[f32; 2]>,
pub level: f32,
pub medium: Medium,
}Expand description
Re-exported because ForwardRenderer::set_water is spelled in them, on
SampleMode’s terms below: a caller setting water should not need a
dependency of its own to name what it sets.
One body of water: a closed outline on the XZ plane, the height its surface
sits at, and what it is made of.
The outline is a simple polygon — convex or not, wound either way, with
no edge touching or crossing another — and it is closed implicitly: the last
point joins the first. crate::surface_mesh refuses one that is not,
rather than drawing a surface with a hole or a fold in it.
Fields§
§outline: Vec<[f32; 2]>The surface’s boundary, as [x, z] points in metres.
level: f32The surface’s height, in metres.
medium: MediumWhat the water is made of.
Trait Implementations§
impl StructuralPartialEq for WaterBody
Auto Trait Implementations§
impl Freeze for WaterBody
impl RefUnwindSafe for WaterBody
impl Send for WaterBody
impl Sync for WaterBody
impl Unpin for WaterBody
impl UnsafeUnpin for WaterBody
impl UnwindSafe for WaterBody
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more