Skip to main content

BankedSection

Struct BankedSection 

Source
#[non_exhaustive]
pub struct BankedSection { pub point: Point3, pub tangent: Vec3, pub lateral: Vec3, pub up: Vec3, pub cant: Scalar, pub bank_angle: Scalar, pub roll: Scalar, pub pivot: Scalar, pub grade: Scalar, pub rail_head_distance: Scalar, }
Expand description

The section of a banked curve at one station.

Fields (Non-exhaustive)§

This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.
§point: Point3

The rotation point: the centreline point raised by the pivot.

§tangent: Vec3

Unit tangent of the banked curve.

§lateral: Vec3

Unit lateral axis, square to the tangent, towards the left rail head.

§up: Vec3

Unit section up, tangent x lateral.

§cant: Scalar

Cant D: the left rail head above the right, as the law states it.

§bank_angle: Scalar

Nominal bank angle psi = asin(D / b), radians.

§roll: Scalar

The roll about the tangent the convention gives, radians: psi itself for a rotation about the tangent.

§pivot: Scalar

Elevation of the rotation point above the profile.

§grade: Scalar

Grade of the banked curve, dz/dd: the profile’s plus the pivot’s rate.

§rail_head_distance: Scalar

Rail-head distance b.

Implementations§

Source§

impl BankedSection

Source

pub fn frame(&self) -> Frame3

The section as a frame, in the curve-evaluation contract’s layout: x the tangent, y the section up, z = x x y (to the right).

Source

pub fn rail_heads(&self) -> (Point3, Point3)

Left and right rail heads, b / 2 either side of the rotation point along the lateral axis.

Trait Implementations§

Source§

impl Clone for BankedSection

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for BankedSection

Source§

impl Debug for BankedSection

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl PartialEq for BankedSection

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for BankedSection

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.