diff options
author | Hans Goudey <h.goudey@me.com> | 2022-04-14 01:13:30 +0300 |
---|---|---|
committer | Hans Goudey <h.goudey@me.com> | 2022-04-14 01:13:30 +0300 |
commit | 5a98e3827559c9363c2e942daf05c09a8f0f7863 (patch) | |
tree | 00cb5d6aa5a57641705e99f871699f3a55422280 /source/blender/blenkernel/BKE_curves.hh | |
parent | 078aa677b69216d5a222a927d52e0f011b416bef (diff) |
Curves: Avoid duplicating evaluated positions with all poly curves
If all of the curves are poly curves, the evaluated positions are the
same as the original positions. In this case just reuse the original
positions span as the evaluated positions.
Diffstat (limited to 'source/blender/blenkernel/BKE_curves.hh')
-rw-r--r-- | source/blender/blenkernel/BKE_curves.hh | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/blenkernel/BKE_curves.hh b/source/blender/blenkernel/BKE_curves.hh index 9dafe2095e7..06971a2243a 100644 --- a/source/blender/blenkernel/BKE_curves.hh +++ b/source/blender/blenkernel/BKE_curves.hh @@ -76,6 +76,11 @@ class CurvesGeometryRuntime { mutable Vector<float3> evaluated_position_cache; mutable std::mutex position_cache_mutex; mutable bool position_cache_dirty = true; + /** + * The evaluated positions result, using a separate span in case all curves are poly curves, + * in which case a separate array of evaluated positions is unnecessary. + */ + mutable Span<float3> evaluated_positions_span; /** * Cache of lengths along each evaluated curve for for each evaluated point. If a curve is |