#[non_exhaustive]pub enum OffsetLaw {
Planar {
distance: f64,
},
Directed {
distance: f64,
reference_direction: DVec3,
},
Linear {
start: PathOffsets,
end: PathOffsets,
frame: OffsetFrame,
},
}Expand description
How far, and which way, an offset lies from its base piece.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Planar
A constant offset in the plane of a 2D base: distance along its
left normal (an offset curve 2D, positive to the left).
Directed
A constant 3D offset: distance along normalise(V x T), V the
fixed reference_direction and T the base’s unit tangent (an
offset curve 3D). T must nowhere be parallel to V.
Fields
Linear
A displacement in the base’s frame, linear in the base’s measure
from start at the base piece’s start to end at its end: one
interval of an offset by distances at stations.
Fields
§
start: PathOffsetsThe displacement at the base piece’s start.
§
end: PathOffsetsThe displacement at the base piece’s end.
§
frame: OffsetFrameThe frame it is read in.
Implementations§
Trait Implementations§
impl Copy for OffsetLaw
impl StructuralPartialEq for OffsetLaw
Auto Trait Implementations§
impl Freeze for OffsetLaw
impl RefUnwindSafe for OffsetLaw
impl Send for OffsetLaw
impl Sync for OffsetLaw
impl Unpin for OffsetLaw
impl UnsafeUnpin for OffsetLaw
impl UnwindSafe for OffsetLaw
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more