pub struct CurveFitOptions {
pub degree: u16,
pub control_point_count: usize,
pub parameterisation: Parameterisation,
pub interpolate_endpoints: bool,
pub smoothing: f64,
pub parameter_correction_iterations: usize,
}Expand description
Options for fit_curve3.
Fields§
§degree: u16Degree of the fitted curve. Must be at least 1.
control_point_count: usizeNumber of control points to solve for. Must be strictly between
degree and the number of input points (inclusive of equality,
which degenerates to interpolation).
parameterisation: ParameterisationParameter assignment.
interpolate_endpoints: boolConstrain the first and last control points to equal the first and last input points exactly, by equality-constrained least squares rather than as an incidental consequence of the basis.
smoothing: f64Weight of an optional second-difference smoothing term on the control polygon (a discrete fairness energy). Zero disables it. Must be finite and non-negative.
parameter_correction_iterations: usizeNewton parameter-correction passes (Hoschek and Lasser, section 9.3) run after the initial solve: each pass projects every point onto the current curve and refits with the corrected parameters. Zero skips correction and uses the assigned parameters as-is.
Trait Implementations§
Source§impl Clone for CurveFitOptions
impl Clone for CurveFitOptions
Source§fn clone(&self) -> CurveFitOptions
fn clone(&self) -> CurveFitOptions
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for CurveFitOptions
impl Debug for CurveFitOptions
Source§impl Default for CurveFitOptions
impl Default for CurveFitOptions
Source§fn default() -> CurveFitOptions
fn default() -> CurveFitOptions
Source§impl PartialEq for CurveFitOptions
impl PartialEq for CurveFitOptions
impl StructuralPartialEq for CurveFitOptions
Auto Trait Implementations§
impl Freeze for CurveFitOptions
impl RefUnwindSafe for CurveFitOptions
impl Send for CurveFitOptions
impl Sync for CurveFitOptions
impl Unpin for CurveFitOptions
impl UnsafeUnpin for CurveFitOptions
impl UnwindSafe for CurveFitOptions
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
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,
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> ⓘ
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> ⓘ
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