diff options
author | Hans Goudey <h.goudey@me.com> | 2021-12-23 02:39:35 +0300 |
---|---|---|
committer | Hans Goudey <h.goudey@me.com> | 2021-12-23 02:39:35 +0300 |
commit | 60c59d7d611dfd72652d9f7ffef519f983703349 (patch) | |
tree | 2d5b51089820069ad2d9a4eaebfd931ea7ec8670 /source/blender/blenkernel/intern/spline_nurbs.cc | |
parent | c593db5a2ffc2f0ad993e8d2a839f87404d2f4a6 (diff) |
Cleanup: Remove spline add_point method, refactor mesh to curve node
It's better to calculate the size of a spline before creating it, and this
should simplify refactoring to a data structure that stores all point
attribute contiguously (see T94193). The mesh to curve conversion is
simplified slightly now, it creates the curve output after gathering all
of the result vertex indices. This should be more efficient too, since
it only grows an index vector for each spline, not a whole spline.
Diffstat (limited to 'source/blender/blenkernel/intern/spline_nurbs.cc')
-rw-r--r-- | source/blender/blenkernel/intern/spline_nurbs.cc | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/source/blender/blenkernel/intern/spline_nurbs.cc b/source/blender/blenkernel/intern/spline_nurbs.cc index e9d4ba7c7ef..719ba4b7ecd 100644 --- a/source/blender/blenkernel/intern/spline_nurbs.cc +++ b/source/blender/blenkernel/intern/spline_nurbs.cc @@ -81,19 +81,6 @@ void NURBSpline::set_order(const uint8_t value) this->mark_cache_invalid(); } -void NURBSpline::add_point(const float3 position, - const float radius, - const float tilt, - const float weight) -{ - positions_.append(position); - radii_.append(radius); - tilts_.append(tilt); - weights_.append(weight); - knots_dirty_ = true; - this->mark_cache_invalid(); -} - void NURBSpline::resize(const int size) { positions_.resize(size); |