pub struct Line { /* private fields */ }Expand description
Component for a line entity — the physical path an elevator car travels.
In a building this is a hoistway/shaft. For a space elevator it is a
tether or cable. For a metro or people-mover (with the loop_lines
feature) it is a closed loop. The term “line” is domain-neutral.
A line belongs to exactly one GroupId at a time but can be
reassigned at runtime (swing-car pattern). Multiple cars may share
a line (multi-car shafts); collision avoidance is left to game hooks
for Linear lines and enforced by headway clamping for Loop lines.
Intrinsic properties only — relationship data (which elevators, which
stops) lives in LineInfo on the
ElevatorGroup.
Implementations§
Source§impl Line
impl Line
Sourcepub const fn orientation(&self) -> Orientation
pub const fn orientation(&self) -> Orientation
Physical orientation.
Sourcepub const fn position(&self) -> Option<&SpatialPosition>
pub const fn position(&self) -> Option<&SpatialPosition>
Optional floor-plan position. For LineKind::Loop this is the
geometric center of the loop; hosts derive a rendering radius
from Self::circumference.
Sourcepub const fn linear_min(&self) -> Option<f64>
pub const fn linear_min(&self) -> Option<f64>
Lowest reachable position on a LineKind::Linear line. Returns
None for LineKind::Loop — loops have no endpoints.
Replaces the former min_position() accessor. Callers that
blindly dereferenced the old f64 should now decide whether
they want Linear-only behavior (linear_min().expect("linear"))
or to handle Loop explicitly.
Sourcepub const fn linear_max(&self) -> Option<f64>
pub const fn linear_max(&self) -> Option<f64>
Highest reachable position on a LineKind::Linear line. Returns
None for LineKind::Loop.
Sourcepub const fn circumference(&self) -> Option<f64>
pub const fn circumference(&self) -> Option<f64>
Total path length of a LineKind::Loop line. Returns None
for LineKind::Linear.
Sourcepub const fn min_headway(&self) -> Option<f64>
pub const fn min_headway(&self) -> Option<f64>
Minimum forward distance between successive cars on a
LineKind::Loop line. Returns None for LineKind::Linear.