pub struct VerticalExtent { /* private fields */ }Expand description
The elevations of one object’s lowest and highest points, with evidence.
Implementations§
Source§impl VerticalExtent
impl VerticalExtent
Sourcepub fn try_new(
object: ObjectId,
bottom: ElevationInterval,
top: ElevationInterval,
evidence: Evidence,
) -> Result<Self, VerticalExtentError>
pub fn try_new( object: ObjectId, bottom: ElevationInterval, top: ElevationInterval, evidence: Evidence, ) -> Result<Self, VerticalExtentError>
A vertical extent of object.
The bottom may not lie above the top at either bound, and the evidence is exact exactly when both elevations are: an interval cannot be exact evidence, and points cannot be approximate.
Sourcepub fn bottom(&self) -> ElevationInterval
pub fn bottom(&self) -> ElevationInterval
Elevation of the object’s lowest point.
Sourcepub fn top(&self) -> ElevationInterval
pub fn top(&self) -> ElevationInterval
Elevation of the object’s highest point.
Sourcepub fn height_metres(&self) -> (f64, f64)
pub fn height_metres(&self) -> (f64, f64)
The height, top less bottom, as (lower, upper) metres sure to hold
the exact difference of the two elevations.
Sourcepub fn uncovered_height(
&self,
cover: &[&VerticalExtent],
growth_metres: f64,
) -> Result<(f64, f64), VerticalExtentError>
pub fn uncovered_height( &self, cover: &[&VerticalExtent], growth_metres: f64, ) -> Result<(f64, f64), VerticalExtentError>
Bounds (lower, upper), in metres, on the height of this extent that
no member of cover spans once each is grown by growth_metres below
its bottom and above its top: the vertical difference between this
object and its counterparts.
The uncovered height only grows as this extent widens and as a cover narrows, so the upper bound measures this extent at its widest against every cover at its narrowest, and the lower bound the reverse; both hold the exact value whatever the elevations are within their intervals. A cover whose narrowest extent is empty spans nothing. A growth that is negative or not finite is refused.