From e7e183aa2b99b8c787a2d2c357cdc4f61f0f6bf1 Mon Sep 17 00:00:00 2001 From: Hans Goudey Date: Fri, 14 May 2021 16:37:05 -0500 Subject: Cleanup: Update / improve comments --- source/blender/blenkernel/BKE_spline.hh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'source/blender/blenkernel/BKE_spline.hh') diff --git a/source/blender/blenkernel/BKE_spline.hh b/source/blender/blenkernel/BKE_spline.hh index 54a8e97d5c6..acff2843806 100644 --- a/source/blender/blenkernel/BKE_spline.hh +++ b/source/blender/blenkernel/BKE_spline.hh @@ -48,10 +48,12 @@ using SplinePtr = std::unique_ptr; * evaluation happens in a layer on top of the evaluated points generated by the derived types. * * There are a few methods to evaluate a spline: - * 1. #evaluated_positions and #interpolate_to_evaluated_points give data at the initial + * 1. #evaluated_positions and #interpolate_to_evaluated_points give data for the initial * evaluated points, depending on the resolution. * 2. #lookup_evaluated_factor and #lookup_evaluated_factor are meant for one-off lookups * along the length of a curve. + * 3. #sample_uniform_index_factors returns an array that stores uniform-length samples + * along the spline which can be used to interpolate data from method 1. * * Commonly used evaluated data is stored in caches on the spline itself so that operations on * splines don't need to worry about taking ownership of evaluated data when they don't need to. @@ -288,7 +290,7 @@ class BezierSpline final : public Spline { int next_control_point_index; /** * Linear interpolation weight between the two indices, from 0 to 1. - * Higher means next control point. + * Higher means closer to next control point. */ float factor; }; @@ -319,6 +321,8 @@ class NURBSpline final : public Spline { EndPoint, Bezier, }; + + /** Method used to recalculate the knots vector when points are added or removed. */ KnotsMode knots_mode; struct BasisCache { -- cgit v1.2.3