#[non_exhaustive]pub enum ChainPiece2 {
Intrinsic {
curvature: CurvatureLaw,
length: f64,
},
Parametric {
curve: Curve2,
start: f64,
length: f64,
},
}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<ChainPiece2, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<ChainPiece2, <__D as Deserializer<'de>>::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
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more