diff options
author | Johnny Matthews <johnny.matthews@gmail.com> | 2021-11-22 21:07:59 +0300 |
---|---|---|
committer | Johnny Matthews <johnny.matthews@gmail.com> | 2021-11-22 21:07:59 +0300 |
commit | 5ad4ca4e02236dbd2a188789bfef196c62d9047e (patch) | |
tree | 83887a1e42012e18911de13fb597d1dc5ead8820 /source/blender/blenkernel/BKE_spline.hh | |
parent | 012917837649676e9ec4b9c2d7d4f7bdfd408739 (diff) |
CurveEval: Add total_length() and total_control_point_size() methods
Add the following methods to the CurveEval class:
total_length() : returns the total length of the curve without needing to
allocate a new array
total_control_point_size() : returns the total number of control points without
needing to allocate a new array
Diffstat (limited to 'source/blender/blenkernel/BKE_spline.hh')
-rw-r--r-- | source/blender/blenkernel/BKE_spline.hh | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/source/blender/blenkernel/BKE_spline.hh b/source/blender/blenkernel/BKE_spline.hh index c332e9a8dac..67eaa7c12c9 100644 --- a/source/blender/blenkernel/BKE_spline.hh +++ b/source/blender/blenkernel/BKE_spline.hh @@ -580,6 +580,9 @@ struct CurveEval { blender::Array<int> evaluated_point_offsets() const; blender::Array<float> accumulated_spline_lengths() const; + float total_length() const; + int total_control_point_size() const; + void mark_cache_invalid(); void assert_valid_point_attributes() const; |