Blender
V5.3
source
blender
editors
curves
intern
curves_masks.cc
Go to the documentation of this file.
1
/* SPDX-FileCopyrightText: 2023 Blender Authors
2
*
3
* SPDX-License-Identifier: GPL-2.0-or-later */
4
8
9
#include "
BLI_offset_indices.hh
"
10
11
#include "
BKE_attribute.hh
"
12
#include "
BKE_curves.hh
"
13
14
#include "
ED_curves.hh
"
15
16
namespace
blender::ed::curves
{
17
18
IndexMask
end_points
(
const
bke::CurvesGeometry
&
curves
,
19
const
IndexMask
&curves_mask,
20
const
int
amount_start,
21
const
int
amount_end,
22
const
bool
inverted
,
23
IndexMaskMemory
&memory)
24
{
25
const
OffsetIndices
points_by_curve =
curves
.points_by_curve();
26
27
Array<bool>
end_points
(
curves
.points_num(),
inverted
?
false
:
true
);
28
curves_mask.
foreach_index
(
29
[&](
const
int64_t
curve_i) {
30
end_points
.as_mutable_span()
31
.
slice
(points_by_curve[curve_i].drop_front(amount_start).drop_back(amount_end))
32
.fill(
inverted
?
true
:
false
);
33
},
34
exec_mode::grain_size
(512));
35
36
return
IndexMask::from_bools
(
end_points
, memory);
37
}
38
39
IndexMask
end_points
(
const
bke::CurvesGeometry
&
curves
,
40
const
int
amount_start,
41
const
int
amount_end,
42
const
bool
inverted
,
43
IndexMaskMemory
&memory)
44
{
45
return
end_points
(
curves
,
curves
.curves_range(), amount_start, amount_end,
inverted
, memory);
46
}
47
48
}
// namespace blender::ed::curves
BKE_attribute.hh
BKE_curves.hh
Low-level operations for curves.
BLI_offset_indices.hh
ED_curves.hh
blender::Array
Definition
BLI_array.hh:50
blender::IndexMask::from_bools
static IndexMask from_bools(Span< bool > bools, LinearAllocator<> &memory)
Definition
index_mask.cc:593
blender::bke::CurvesGeometry
Definition
BKE_curves.hh:156
blender::index_mask::IndexMaskMemory
Definition
BLI_index_mask.hh:114
blender::index_mask::IndexMask
Definition
BLI_index_mask.hh:218
blender::index_mask::IndexMask::slice
IndexMask slice(IndexRange range) const
Definition
BLI_index_mask.hh:845
blender::index_mask::IndexMask::foreach_index
void foreach_index(Fn &&fn, Mode mode=exec_mode::serial) const
Definition
BLI_index_mask.hh:856
blender::offset_indices::OffsetIndices
Definition
BLI_offset_indices.hh:37
inverted
ccl_device_inline float3x3 inverted(const float3x3 m)
Definition
math_float3x3.h:122
blender::ed::curves
Definition
curves_add.cc:30
blender::ed::curves::end_points
IndexMask end_points(const bke::CurvesGeometry &curves, const IndexMask &curves_mask, const int amount_start, const int amount_end, const bool inverted, IndexMaskMemory &memory)
Definition
curves_masks.cc:18
blender::exec_mode::grain_size
constexpr ParallelGrainSize grain_size(int grain_size)
Definition
BLI_execution_mode.hh:79
blender::int64_t
__int64 int64_t
Definition
BKE_text.h:90
curves
Definition
draw_curves_interpolation.bsl.hh:22
Generated on
for Blender by
doxygen
1.18.0