diff options
author | Hans Goudey <h.goudey@me.com> | 2022-03-25 04:58:01 +0300 |
---|---|---|
committer | Hans Goudey <h.goudey@me.com> | 2022-03-25 04:58:01 +0300 |
commit | 797a1356caadc8df4b81d065d68dcc2ae4ce8f4b (patch) | |
tree | d08967d3b9d50ac5319c8341ab06d81141c82aef /source/blender/blenkernel/BKE_curves.hh | |
parent | 6e72e3fdb295fdfd3e252bd48be96e2d832e43f2 (diff) |
Curves: Tweak evaluated offset functions
Add a function to retrieve the points for an index range of curves,
and move "ensuring" the offsets to a separate function, since it's
often nicer to call that if you don't need the result span immediately.
Diffstat (limited to 'source/blender/blenkernel/BKE_curves.hh')
-rw-r--r-- | source/blender/blenkernel/BKE_curves.hh | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/blenkernel/BKE_curves.hh b/source/blender/blenkernel/BKE_curves.hh index 6a95bc7d2d2..0f2ae8a02a6 100644 --- a/source/blender/blenkernel/BKE_curves.hh +++ b/source/blender/blenkernel/BKE_curves.hh @@ -250,6 +250,7 @@ class CurvesGeometry : public ::CurvesGeometry { * Call #evaluated_offsets() first to ensure that the evaluated offsets cache is current. */ IndexRange evaluated_points_for_curve(int index) const; + IndexRange evaluated_points_for_curves(IndexRange curves) const; /** * The index of the first evaluated point for every curve. The size of this span is one larger @@ -258,6 +259,9 @@ class CurvesGeometry : public ::CurvesGeometry { */ Span<int> evaluated_offsets() const; + /** Makes sure the data described by #evaluated_offsets if necessary. */ + void ensure_evaluated_offsets() const; + Span<float3> evaluated_positions() const; private: |