Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans Goudey <h.goudey@me.com>2022-04-14 01:13:30 +0300
committerHans Goudey <h.goudey@me.com>2022-04-14 01:13:30 +0300
commit5a98e3827559c9363c2e942daf05c09a8f0f7863 (patch)
tree00cb5d6aa5a57641705e99f871699f3a55422280 /source/blender/blenkernel/BKE_curves.hh
parent078aa677b69216d5a222a927d52e0f011b416bef (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.hh5
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