Curves: initial surface collision for curves sculpt mode #104469

Merged
Jacques Lucke merged 29 commits from JacquesLucke/blender:temp-curves-surface-collision into main 2023-02-11 13:46:39 +01:00
3 changed files with 5 additions and 1 deletions
Showing only changes of commit 8bcb13f610 - Show all commits

View File

@ -71,6 +71,9 @@ IndexMask find_indices_from_virtual_array(IndexMask indices_to_check,
int64_t parallel_grain_size,
Vector<int64_t> &r_indices);
/**
* Find the true indices in a boolean span.
*/
IndexMask find_indices_from_array(Span<bool> array, Vector<int64_t> &r_indices);
} // namespace blender::index_mask_ops

View File

@ -241,7 +241,7 @@ IndexMask find_indices_from_virtual_array(const IndexMask indices_to_check,
return detail::find_indices_based_on_predicate__merge(indices_to_check, sub_masks, r_indices);
}
IndexMask find_indices_from_array(Span<bool> array, Vector<int64_t> &r_indices)
IndexMask find_indices_from_array(const Span<bool> array, Vector<int64_t> &r_indices)
JacquesLucke marked this conversation as resolved
Review

Can't seem to add a comment there, but this can replace

find_indices_based_on_predicate(indices_to_check, 4096, r_indices, [&](const int64_t i) { return span[i]; });

above.

Can't seem to add a comment there, but this can replace ``` find_indices_based_on_predicate(indices_to_check, 4096, r_indices, [&](const int64_t i) { return span[i]; }); ``` above.
{
return find_indices_based_on_predicate(
array.index_range(), 2048, r_indices, [array](const int64_t i) { return array[i]; });

View File

@ -1,6 +1,7 @@
/* SPDX-License-Identifier: GPL-2.0-or-later */
#include "BLI_math_matrix.hh"
#include "BLI_task.hh"
#include "GEO_curve_constraint_solver.hh"