pub struct DirectionalExtent { /* private fields */ }Expand description
The lowest and highest positions of one object’s body projected onto a direction, in metres along it, with evidence.
Positions are coordinates along direction from the canonical origin, so
only their difference, the extent, means anything on its own.
Implementations§
Source§impl DirectionalExtent
impl DirectionalExtent
Sourcepub fn try_new(
object: ObjectId,
direction: MetricDirection,
lower: ElevationInterval,
upper: ElevationInterval,
evidence: Evidence,
) -> Result<Self, VerticalExtentError>
pub fn try_new( object: ObjectId, direction: MetricDirection, lower: ElevationInterval, upper: ElevationInterval, evidence: Evidence, ) -> Result<Self, VerticalExtentError>
The extent of object along direction.
As for a VerticalExtent, the lowest position may not lie above
the highest at either bound, and the evidence is exact exactly when
both positions are points.
Sourcepub fn direction(&self) -> MetricDirection
pub fn direction(&self) -> MetricDirection
The direction the body was projected onto.
Sourcepub fn lower(&self) -> ElevationInterval
pub fn lower(&self) -> ElevationInterval
Position of the body’s lowest point along the direction.
Sourcepub fn upper(&self) -> ElevationInterval
pub fn upper(&self) -> ElevationInterval
Position of the body’s highest point along the direction.
Sourcepub fn length_metres(&self) -> (f64, f64)
pub fn length_metres(&self) -> (f64, f64)
The extent, highest less lowest position, as (lower, upper) metres
sure to hold the exact difference of the two positions.
Trait Implementations§
Source§impl Clone for DirectionalExtent
impl Clone for DirectionalExtent
Source§impl Debug for DirectionalExtent
impl Debug for DirectionalExtent
Source§impl PartialEq for DirectionalExtent
impl PartialEq for DirectionalExtent
impl StructuralPartialEq for DirectionalExtent
Auto Trait Implementations§
impl Freeze for DirectionalExtent
impl RefUnwindSafe for DirectionalExtent
impl Send for DirectionalExtent
impl Sync for DirectionalExtent
impl Unpin for DirectionalExtent
impl UnsafeUnpin for DirectionalExtent
impl UnwindSafe for DirectionalExtent
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