From 47769b5f402503d602e532b9c4dfb89173e5fc06 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sun, 30 Apr 2017 00:01:16 +1000 Subject: Curve Fitting: minor change to re-fitting method Avoid calculating a new split-index when re-fitting. While checking if a knot can be removed, the index with the highest error can be used as a candidate to replace the knot (in the case it can't be removed). --- extern/curve_fit_nd/curve_fit_nd.h | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'extern/curve_fit_nd/curve_fit_nd.h') diff --git a/extern/curve_fit_nd/curve_fit_nd.h b/extern/curve_fit_nd/curve_fit_nd.h index 7232f802e28..18244799b0f 100644 --- a/extern/curve_fit_nd/curve_fit_nd.h +++ b/extern/curve_fit_nd/curve_fit_nd.h @@ -36,7 +36,7 @@ /* curve_fit_cubic.c */ /** - * Takes a flat array of points and evalues that to calculate a bezier spline. + * Takes a flat array of points and evaluates that to calculate a bezier spline. * * \param points, points_len: The array of points to calculate a cubics from. * \param dims: The number of dimensions for for each element in \a points. @@ -82,7 +82,7 @@ int curve_fit_cubic_to_points_fl( unsigned int **r_corners_index_array, unsigned int *r_corners_index_len); /** - * Takes a flat array of points and evalues that to calculate handle lengths. + * Takes a flat array of points and evaluates that to calculate handle lengths. * * \param points, points_len: The array of points to calculate a cubics from. * \param dims: The number of dimensions for for each element in \a points. @@ -107,7 +107,8 @@ int curve_fit_cubic_to_points_single_db( double r_handle_l[], double r_handle_r[], - double *r_error_sq); + double *r_error_sq, + unsigned int *r_error_index); int curve_fit_cubic_to_points_single_fl( const float *points, @@ -120,7 +121,8 @@ int curve_fit_cubic_to_points_single_fl( float r_handle_l[], float r_handle_r[], - float *r_error_sq); + float *r_error_sq, + unsigned int *r_error_index); enum { CURVE_FIT_CALC_HIGH_QUALIY = (1 << 0), -- cgit v1.2.3