pub enum CurveKind {
Line {
start: PointId,
end: PointId,
},
Arc {
start: PointId,
end: PointId,
sweep: f64,
},
Circle {
center: PointId,
radius: f64,
},
Spline {
control_points: Vec<PointId>,
},
}Variants§
Line
Arc
A circular arc from start to end, turning counter-clockwise by
sweep radians (clockwise if negative, |sweep| < 2π). Equivalent to
giving its curvature 2 sin(sweep / 2) / |end - start| — see
crate::geometry for why the sweep is what is stored and solved.
Circle
Spline
A clamped, uniform, non-rational B-spline of degree
min(3, control_points.len() - 1) through its first and last control
points.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for CurveKind
impl<'de> Deserialize<'de> for CurveKind
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
impl StructuralPartialEq for CurveKind
Auto Trait Implementations§
impl Freeze for CurveKind
impl RefUnwindSafe for CurveKind
impl Send for CurveKind
impl Sync for CurveKind
impl Unpin for CurveKind
impl UnsafeUnpin for CurveKind
impl UnwindSafe for CurveKind
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