pub struct Metric { /* private fields */ }Expand description
Metric — per-feature scalar × a scale. Use cases 5 and 6: node height IS betweenness centrality, or a Mímir risk score.
Implementations§
Trait Implementations§
Source§impl ElevationSource for Metric
impl ElevationSource for Metric
Source§fn elevation(&self, id: u32, _p: WorldPos) -> f64
fn elevation(&self, id: u32, _p: WorldPos) -> f64
Height of feature
id, given the world position the PositionSource
produced (a terrain source samples at p; a metric source ignores p).Source§fn z_range(&self) -> (f64, f64)
fn z_range(&self) -> (f64, f64)
The
[min, max] this source can ever emit — the culler needs it to grow
2D bounds into 3D ones without sampling every feature.fn kind(&self) -> &'static str
Auto Trait Implementations§
impl Freeze for Metric
impl RefUnwindSafe for Metric
impl Send for Metric
impl Sync for Metric
impl Unpin for Metric
impl UnsafeUnpin for Metric
impl UnwindSafe for Metric
Blanket Implementations§
impl<T> Allocation for T
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more