#[non_exhaustive]pub struct StationOrientation {
pub axis: Option<Vec3>,
pub ref_direction: Option<Vec3>,
}Expand description
An explicit in-section orientation at a station (#246).
Both vectors are components in the station’s base frame, (tangent, lateral, up); see the module documentation for their meaning,
defaults and orthonormalisation. Both absent is the base frame itself,
the Default.
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.axis: Option<Vec3>The oriented frame’s up (local Z), exact; None for (0, 0, 1).
ref_direction: Option<Vec3>The direction the oriented frame’s tangent role (local X) is
taken from, made perpendicular to the axis; None for (1, 0, 0).
Implementations§
Source§impl StationOrientation
impl StationOrientation
Sourcepub const fn new(axis: Option<Vec3>, ref_direction: Option<Vec3>) -> Self
pub const fn new(axis: Option<Vec3>, ref_direction: Option<Vec3>) -> Self
An orientation from an optional axis and reference direction, both in the base frame.
Sourcepub const fn is_base(&self) -> bool
pub const fn is_base(&self) -> bool
Whether neither vector is given, so the base frame is used as is.
Sourcepub fn unit_axes(&self) -> Result<(Vec3, Vec3), &'static str>
pub fn unit_axes(&self) -> Result<(Vec3, Vec3), &'static str>
The unit axis and unit reference direction, defaults filled in.
§Errors
Why there are none, worded for
GraphError::InvalidStation:
a zero or non-finite vector, or the two parallel or anti-parallel
within ORIENTATION_TOLERANCE.
Trait Implementations§
Source§impl Clone for StationOrientation
impl Clone for StationOrientation
Source§fn clone(&self) -> StationOrientation
fn clone(&self) -> StationOrientation
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more