pub struct SlopedRun { /* private fields */ }Expand description
One sloped run of a ramp: a planar upward-facing walking face.
start and end are the positions of its nearest and farthest points
along direction, the run’s horizontal direction of steepest ascent;
bottom and top the elevations of its lowest and highest points.
Implementations§
Source§impl SlopedRun
impl SlopedRun
Sourcepub fn try_new(
direction: MetricDirection,
bottom: ElevationInterval,
top: ElevationInterval,
start: ElevationInterval,
end: ElevationInterval,
) -> Result<Self, WalkingSurfaceError>
pub fn try_new( direction: MetricDirection, bottom: ElevationInterval, top: ElevationInterval, start: ElevationInterval, end: ElevationInterval, ) -> Result<Self, WalkingSurfaceError>
A run rising from bottom to top between start and end along
the horizontal direction. Both must be decidably ordered: a run
with no rise or no length is no sloped run.
Sourcepub fn with_sides(
self,
left: ElevationInterval,
right: ElevationInterval,
) -> Result<Self, WalkingSurfaceError>
pub fn with_sides( self, left: ElevationInterval, right: ElevationInterval, ) -> Result<Self, WalkingSurfaceError>
The run with the positions of its sides along across its
direction, stated only where its plan fills the rectangle between its
ends and those sides.
Sourcepub fn sides(&self) -> Option<(ElevationInterval, ElevationInterval)>
pub fn sides(&self) -> Option<(ElevationInterval, ElevationInterval)>
The positions of the run’s sides across its direction, when measured.
Sourcepub fn width(&self) -> Option<MeasuredInterval>
pub fn width(&self) -> Option<MeasuredInterval>
The run’s width across its direction, when its sides were measured.
Sourcepub fn direction(&self) -> MetricDirection
pub fn direction(&self) -> MetricDirection
The run’s horizontal direction of steepest ascent.
Sourcepub fn bottom(&self) -> ElevationInterval
pub fn bottom(&self) -> ElevationInterval
Elevation of the run’s lowest point.
Sourcepub fn top(&self) -> ElevationInterval
pub fn top(&self) -> ElevationInterval
Elevation of the run’s highest point.
Sourcepub fn start(&self) -> ElevationInterval
pub fn start(&self) -> ElevationInterval
Position of the run’s lowest end along its direction.
Sourcepub fn end(&self) -> ElevationInterval
pub fn end(&self) -> ElevationInterval
Position of the run’s highest end along its direction.
Sourcepub fn rise(&self) -> MeasuredInterval
pub fn rise(&self) -> MeasuredInterval
The run’s rise, top less bottom.
Sourcepub fn length(&self) -> MeasuredInterval
pub fn length(&self) -> MeasuredInterval
The run’s horizontal length along its direction, end less start.
Sourcepub fn slope(&self) -> MeasuredInterval
pub fn slope(&self) -> MeasuredInterval
The run’s slope, rise over horizontal length. On a planar face the height changes linearly along the direction of steepest ascent, so this is the face’s gradient.