Blender
V3.3
|
Namespaces | |
bezier | |
catmull_rom | |
nurbs | |
poly | |
void blender::bke::curves::accumulate_counts_to_offsets | ( | MutableSpan< int > | counts_to_offsets, |
int | start_offset = 0 |
||
) |
Turn an array of sizes into the offset at each index including all previous sizes.
Definition at line 28 of file curves_utils.cc.
References BLI_assert, count, blender::IndexRange::drop_back(), blender::MutableSpan< T >::index_range(), blender::MutableSpan< T >::last(), and offset.
Referenced by blender::geometry::resample_to_uniform().
bke::CurvesGeometry blender::bke::curves::copy_only_curve_domain | ( | const bke::CurvesGeometry & | src_curves | ) |
Copy only the information on the point domain, but not the offsets or any point attributes, meant for operations that change the number of points but not the number of curves.
Definition at line 87 of file curves_utils.cc.
References CD_DUPLICATE, CD_MASK_ALL, CurvesGeometry::curve_data, blender::bke::CurvesGeometry::curves_num(), CustomData_copy(), and CurvesGeometry::runtime.
Referenced by blender::geometry::convert_curves_to_bezier(), blender::geometry::convert_curves_to_nurbs(), blender::geometry::fillet_curves(), and blender::geometry::subdivide_curves().
void blender::bke::curves::copy_point_data | ( | const CurvesGeometry & | src_curves, |
const CurvesGeometry & | dst_curves, | ||
const IndexMask | src_curve_selection, | ||
const Span< T > | src, | ||
MutableSpan< T > | dst | ||
) |
Definition at line 35 of file BKE_curves_utils.hh.
References copy_point_data(), and src.
void blender::bke::curves::copy_point_data | ( | const CurvesGeometry & | src_curves, |
const CurvesGeometry & | dst_curves, | ||
IndexMask | src_curve_selection, | ||
GSpan | src, | ||
GMutableSpan | dst | ||
) |
Definition at line 56 of file curves_utils.cc.
References blender::IndexMask::index_range(), and blender::threading::parallel_for().
void blender::bke::curves::copy_point_data | ( | const CurvesGeometry & | src_curves, |
const CurvesGeometry & | dst_curves, | ||
Span< IndexRange > | curve_ranges, | ||
GSpan | src, | ||
GMutableSpan | dst | ||
) |
Copy the provided point attribute values between all curves in the #curve_ranges index ranges, assuming that all curves have the same number of control points in #src_curves and #dst_curves.
Definition at line 40 of file curves_utils.cc.
References blender::Span< T >::index_range(), and blender::threading::parallel_for().
Referenced by copy_point_data().
Definition at line 474 of file BKE_curves.hh.
References v.
Definition at line 468 of file BKE_curves.hh.
References blender::math::abs(), BLI_assert, and v.
void blender::bke::curves::fill_curve_counts | ( | const bke::CurvesGeometry & | curves, |
Span< IndexRange > | curve_ranges, | ||
MutableSpan< int > | counts | ||
) |
Copy the size of every curve in #curve_ranges to the corresponding index in #counts.
Definition at line 13 of file curves_utils.cc.
References blender::Span< T >::index_range(), and blender::threading::parallel_for().
Referenced by blender::geometry::calculate_result_offsets(), and blender::geometry::resample_to_uniform().
void blender::bke::curves::fill_points | ( | const CurvesGeometry & | curves, |
const IndexMask | curve_selection, | ||
const T & | value, | ||
MutableSpan< T > | dst | ||
) |
Definition at line 50 of file BKE_curves_utils.hh.
References curves, and fill_points().
void blender::bke::curves::fill_points | ( | const CurvesGeometry & | curves, |
IndexMask | curve_selection, | ||
GPointer | value, | ||
GMutableSpan | dst | ||
) |
Definition at line 72 of file curves_utils.cc.
References BLI_assert, blender::IndexMask::index_range(), blender::threading::parallel_for(), blender::GPointer::type(), blender::GMutableSpan::type(), and type.
Referenced by fill_points().
void blender::bke::curves::foreach_curve_by_type | ( | const VArray< int8_t > & | types, |
const std::array< int, CURVE_TYPES_NUM > & | type_counts, | ||
IndexMask | selection, | ||
FunctionRef< void(IndexMask)> | catmull_rom_fn, | ||
FunctionRef< void(IndexMask)> | poly_fn, | ||
FunctionRef< void(IndexMask)> | bezier_fn, | ||
FunctionRef< void(IndexMask)> | nurbs_fn | ||
) |
Definition at line 116 of file curves_utils.cc.
References CURVE_TYPE_BEZIER, CURVE_TYPE_CATMULL_ROM, CURVE_TYPE_NURBS, CURVE_TYPE_POLY, indices, indices_for_type(), mask(), type, types, and void.
IndexMask blender::bke::curves::indices_for_type | ( | const VArray< int8_t > & | types, |
const std::array< int, CURVE_TYPES_NUM > & | type_counts, | ||
const CurveType | type, | ||
const IndexMask | selection, | ||
Vector< int64_t > & | r_indices | ||
) |
Definition at line 99 of file curves_utils.cc.
References blender::index_mask_ops::find_indices_based_on_predicate(), type, and types.
Referenced by foreach_curve_by_type(), and blender::bke::CurvesGeometry::indices_for_curve_type().
|
inline |
The number of segments between control points, accounting for the last segment of cyclic curves. The logic is simple, but this function should be used to make intentions clearer.
Definition at line 462 of file BKE_curves.hh.
References BLI_assert.
Referenced by blender::bke::curves::nurbs::calculate_basis_cache(), blender::bke::curves::catmull_rom::calculate_evaluated_num(), blender::bke::curves::nurbs::calculate_evaluated_num(), blender::bke::calculate_result_offsets(), blender::ed::sculpt_paint::ScaleCurvesEffect::compute_poly_curve_length(), blender::geometry::create_nurbs_to_bezier_handles(), curve_eval_render_wire_verts_edges_len_get(), blender::bke::fill_mesh_topology(), blender::geometry::interpolate_position_with_interpolation(), blender::ed::sculpt_paint::move_last_point_and_resample(), and blender::nodes::node_geo_mesh_primitive_uv_sphere_cc::node_geo_exec().