From 3e16f3b3ef4b8f385b30fe4a1e00860620f610ee Mon Sep 17 00:00:00 2001 From: Jacques Lucke Date: Sat, 19 Mar 2022 08:26:29 +0100 Subject: BLI: move generic data structures to blenlib This is a follow up to rB2252bc6a5527cd7360d1ccfe7a2d1bc640a8dfa6. --- source/blender/blenkernel/BKE_spline.hh | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 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 87f4ad6dc61..32330244c08 100644 --- a/source/blender/blenkernel/BKE_spline.hh +++ b/source/blender/blenkernel/BKE_spline.hh @@ -8,11 +8,10 @@ #include -#include "FN_generic_virtual_array.hh" - #include "DNA_curves_types.h" #include "BLI_float4x4.hh" +#include "BLI_generic_virtual_array.hh" #include "BLI_math_vec_types.hh" #include "BLI_vector.hh" @@ -205,16 +204,16 @@ class Spline { * points) to arbitrary parameters in between the evaluated points. The interpolation is quite * simple, but this handles the cyclic and end point special cases. */ - void sample_with_index_factors(const blender::fn::GVArray &src, + void sample_with_index_factors(const blender::GVArray &src, blender::Span index_factors, - blender::fn::GMutableSpan dst) const; + blender::GMutableSpan dst) const; template void sample_with_index_factors(const blender::VArray &src, blender::Span index_factors, blender::MutableSpan dst) const { this->sample_with_index_factors( - blender::fn::GVArray(src), index_factors, blender::fn::GMutableSpan(dst)); + blender::GVArray(src), index_factors, blender::GMutableSpan(dst)); } template void sample_with_index_factors(blender::Span src, @@ -229,11 +228,11 @@ class Spline { * evaluated points. For poly splines, the lifetime of the returned virtual array must not * exceed the lifetime of the input data. */ - virtual blender::fn::GVArray interpolate_to_evaluated(const blender::fn::GVArray &src) const = 0; - blender::fn::GVArray interpolate_to_evaluated(blender::fn::GSpan data) const; + virtual blender::GVArray interpolate_to_evaluated(const blender::GVArray &src) const = 0; + blender::GVArray interpolate_to_evaluated(blender::GSpan data) const; template blender::VArray interpolate_to_evaluated(blender::Span data) const { - return this->interpolate_to_evaluated(blender::fn::GSpan(data)).typed(); + return this->interpolate_to_evaluated(blender::GSpan(data)).typed(); } protected: @@ -386,8 +385,7 @@ class BezierSpline final : public Spline { */ InterpolationData interpolation_data_from_index_factor(float index_factor) const; - virtual blender::fn::GVArray interpolate_to_evaluated( - const blender::fn::GVArray &src) const override; + virtual blender::GVArray interpolate_to_evaluated(const blender::GVArray &src) const override; void evaluate_segment(int index, int next_index, @@ -541,7 +539,7 @@ class NURBSpline final : public Spline { blender::Span evaluated_positions() const final; - blender::fn::GVArray interpolate_to_evaluated(const blender::fn::GVArray &src) const final; + blender::GVArray interpolate_to_evaluated(const blender::GVArray &src) const final; protected: void correct_end_tangents() const final; @@ -599,7 +597,7 @@ class PolySpline final : public Spline { * the original data. Therefore the lifetime of the returned virtual array must not be longer * than the source data. */ - blender::fn::GVArray interpolate_to_evaluated(const blender::fn::GVArray &src) const final; + blender::GVArray interpolate_to_evaluated(const blender::GVArray &src) const final; protected: void correct_end_tangents() const final; -- cgit v1.2.3