pub enum BodyError {
TooFewPoints {
count: usize,
},
NonFinitePoint {
index: usize,
point: [f32; 2],
},
RepeatedPoint {
index: usize,
point: [f32; 2],
},
NonFiniteLevel {
level: f32,
},
InvalidMedium {
which: &'static str,
values: [f32; 3],
},
NoArea,
SelfIntersecting {
first: usize,
second: usize,
},
InvalidSpacing {
spacing: f32,
},
TooManyVertices,
TooManyCells {
cells: u64,
max: u64,
},
}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.
Why a WaterBody cannot be meshed.
Variants§
TooFewPoints
The outline has fewer than three points, so it encloses nothing.
NonFinitePoint
An outline point has a coordinate that is not a finite number.
RepeatedPoint
Two consecutive outline points are the same point, so the edge between them has no direction.
NonFiniteLevel
The level is not a finite number.
InvalidMedium
A medium coefficient is negative or not finite. A negative absorption would add light with depth rather than remove it.
Fields
NoArea
The outline’s points all lie on one line, so it encloses no area.
SelfIntersecting
Two edges of the outline touch or cross, so it is not a simple polygon.
Fields
InvalidSpacing
The grid spacing is not a finite, positive length.
TooManyVertices
The surface meshes to more vertices than a u32 index can address.
TooManyCells
The outline’s bounds hold more grid cells than crate::MAX_GRID_CELLS.
Trait Implementations§
Source§impl Error for BodyError
impl Error for BodyError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()