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>2021-05-16 01:44:33 +0300
committerHans Goudey <h.goudey@me.com>2021-05-16 01:44:33 +0300
commit038c6e229c4fb1518f726d7f6a828be026bae857 (patch)
tree1b46ee9a0e24ce5bce72584499960daee9df3c37 /source/blender/blenkernel/BKE_spline.hh
parentcb12fb78cad4be5fa18edf0de1f8891cd97a9bed (diff)
Splines: Convenience methods for point offsets of multiple splines
Since spline data is stored separately for each spline, the data often needs to be flattened into a separate array. It's helpful to have the necessarily-sequential part of that split off into a separate method. I've found myself using functions like these in quite a few places.
Diffstat (limited to 'source/blender/blenkernel/BKE_spline.hh')
-rw-r--r--source/blender/blenkernel/BKE_spline.hh3
1 files changed, 3 insertions, 0 deletions
diff --git a/source/blender/blenkernel/BKE_spline.hh b/source/blender/blenkernel/BKE_spline.hh
index acff2843806..35f21ccb897 100644
--- a/source/blender/blenkernel/BKE_spline.hh
+++ b/source/blender/blenkernel/BKE_spline.hh
@@ -493,6 +493,9 @@ class CurveEval {
void translate(const blender::float3 &translation);
void transform(const blender::float4x4 &matrix);
void bounds_min_max(blender::float3 &min, blender::float3 &max, const bool use_evaluated) const;
+
+ blender::Array<int> control_point_offsets() const;
+ blender::Array<int> evaluated_point_offsets() const;
};
std::unique_ptr<CurveEval> curve_eval_from_dna_curve(const Curve &curve);