pub struct RailMeasurement { /* private fields */ }Expand description
One handrail measured along a stretch.
A rail is measured in the frame of one part of the stretch, the first
unless stated (Self::in_part). start and end are the positions
of its body’s nearest and farthest points along that part’s direction,
left and right of its lowest and highest points across it. lowest
and highest bound the height of the top of its body above the pitch
line (the nosing line of a flight, the surface of a run) where both run:
the least and the greatest height along it, each as an interval sure to
hold it. bottom_rise and top_rise are how much the top of its body
rises and falls over the requested extension beyond each end of the
pitch line, None where it does not reach that far or no extension was
requested.
Implementations§
Source§impl RailMeasurement
impl RailMeasurement
Sourcepub fn try_new(
(start, end): (ElevationInterval, ElevationInterval),
(left, right): (ElevationInterval, ElevationInterval),
lowest: MeasuredInterval,
highest: MeasuredInterval,
) -> Result<Self, WalkingSurfaceError>
pub fn try_new( (start, end): (ElevationInterval, ElevationInterval), (left, right): (ElevationInterval, ElevationInterval), lowest: MeasuredInterval, highest: MeasuredInterval, ) -> Result<Self, WalkingSurfaceError>
A rail spanning start to end along the stretch and left to
right across it, its top lowest to highest above the pitch
line. Each pair must be ordered.
Sourcepub fn in_part(self, part: usize) -> Self
pub fn in_part(self, part: usize) -> Self
The rail measured in the frame of the stretch’s part part, by its
index in HandrailEvidence::parts.
Sourcepub fn with_rises(
self,
bottom: Option<MeasuredInterval>,
top: Option<MeasuredInterval>,
) -> Result<Self, WalkingSurfaceError>
pub fn with_rises( self, bottom: Option<MeasuredInterval>, top: Option<MeasuredInterval>, ) -> Result<Self, WalkingSurfaceError>
The rail with the rise of its top over the extension beyond the bottom and the top of the pitch line. A rise is never negative.
Sourcepub fn start(&self) -> ElevationInterval
pub fn start(&self) -> ElevationInterval
Position of the rail’s nearest point along the stretch.
Sourcepub fn end(&self) -> ElevationInterval
pub fn end(&self) -> ElevationInterval
Position of the rail’s farthest point along the stretch.
Sourcepub fn sides(&self) -> (ElevationInterval, ElevationInterval)
pub fn sides(&self) -> (ElevationInterval, ElevationInterval)
Positions of the rail’s lowest and highest points across the stretch.
Sourcepub fn lowest(&self) -> MeasuredInterval
pub fn lowest(&self) -> MeasuredInterval
The least height of the rail’s top above the pitch line.
Sourcepub fn highest(&self) -> MeasuredInterval
pub fn highest(&self) -> MeasuredInterval
The greatest height of the rail’s top above the pitch line.
Sourcepub fn bottom_rise(&self) -> Option<MeasuredInterval>
pub fn bottom_rise(&self) -> Option<MeasuredInterval>
How much the rail’s top rises and falls over the extension beyond the bottom of the pitch line, when it reaches that far.
Sourcepub fn top_rise(&self) -> Option<MeasuredInterval>
pub fn top_rise(&self) -> Option<MeasuredInterval>
The same beyond the top of the pitch line.