#[non_exhaustive]pub enum ChainPiece2 {
Intrinsic {
curvature: CurvatureLaw,
length: Scalar,
},
Parametric {
curve: Curve2,
start: Scalar,
length: Scalar,
},
}Expand description
One piece of a Chain2, written in its own local frame: origin at the
piece start, +x along the start tangent.
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.
Intrinsic
A natural-equation piece: curvature as a function of arc length from
the piece start, over length.
Fields
§
curvature: CurvatureLawCurvature law, in the piece’s own arc length.
Parametric
A parametric curve read by arc length.
curve is written in the piece’s local frame: it passes through the
origin at parameter start with its tangent along +x there, and the
piece is the stretch of it from start, in increasing parameter,
whose arc length is length.
Implementations§
Trait Implementations§
Source§impl Clone for ChainPiece2
impl Clone for ChainPiece2
Source§fn clone(&self) -> ChainPiece2
fn clone(&self) -> ChainPiece2
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ChainPiece2
impl Debug for ChainPiece2
Source§impl<'de> Deserialize<'de> for ChainPiece2
impl<'de> Deserialize<'de> for ChainPiece2
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl PartialEq for ChainPiece2
impl PartialEq for ChainPiece2
Source§impl Serialize for ChainPiece2
impl Serialize for ChainPiece2
impl StructuralPartialEq for ChainPiece2
Auto Trait Implementations§
impl Freeze for ChainPiece2
impl RefUnwindSafe for ChainPiece2
impl Send for ChainPiece2
impl Sync for ChainPiece2
impl Unpin for ChainPiece2
impl UnsafeUnpin for ChainPiece2
impl UnwindSafe for ChainPiece2
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