pub struct CurveFitOptions {
pub degree: u16,
pub control_point_count: usize,
pub parameterisation: Parameterisation,
pub interpolate_endpoints: bool,
pub smoothing: Scalar,
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: ScalarWeight 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 more