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
1 changed files with 2 additions and 3 deletions
Showing only changes of commit d7b5175008 - Show all commits

View File

@ -208,8 +208,7 @@ IndexMask find_indices_from_virtual_array(const IndexMask indices_to_check,
}
if (virtual_array.is_span()) {
const Span<bool> span = virtual_array.get_internal_span();
return find_indices_based_on_predicate(
indices_to_check, 4096, r_indices, [&](const int64_t i) { return span[i]; });
return find_indices_from_array(span, r_indices);
}
threading::EnumerableThreadSpecific<Vector<bool>> materialize_buffers;
@ -244,7 +243,7 @@ IndexMask find_indices_from_virtual_array(const IndexMask indices_to_check,
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]; });
array.index_range(), 4096, r_indices, [array](const int64_t i) { return array[i]; });
}
} // namespace blender::index_mask_ops