#[non_exhaustive]pub struct CantFrame {
pub distance_along: f64,
pub left: f64,
pub right: f64,
pub cant: f64,
pub axis_elevation: f64,
pub bank_angle: f64,
pub lateral: Vec2,
pub up: Vec2,
}Expand description
The cant cross-section at one station.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.distance_along: f64Absolute distance along the horizontal alignment, in metres.
left: f64Left rail head above the vertical profile, in metres.
right: f64Right rail head above the vertical profile, in metres.
cant: f64Cant D = left - right, positive when the left rail is higher.
axis_elevation: f64Elevation of the section’s rotation point above the vertical
profile: (left + right) / 2.
bank_angle: f64Bank angle psi = arcsin(D / b) in radians, positive raising the
left rail (counter-clockwise looking along the tangent).
lateral: Vec2Rail-to-rail axis (towards the left rail) as (n, u) components.
up: Vec2Section up axis as (n, u) components.
Implementations§
Source§impl CantFrame
impl CantFrame
Sourcepub fn orient(&self, point: Point3, tangent: Vec3) -> AlignmentResult<Frame3>
pub fn orient(&self, point: Point3, tangent: Vec3) -> AlignmentResult<Frame3>
The section frame in world coordinates.
point and tangent are the gradient curve’s point and 3D tangent
at this frame’s station, from the caller’s evaluator. The origin is
point raised by Self::axis_elevation along world up (the cant
is measured vertically from the profile); x is the unit tangent,
y the rail-to-rail axis and z the section up axis.
§Errors
Refuses a non-finite point or tangent, and a vertical or zero tangent, which has no horizontal left normal.