|
Blender V4.3
|
Namespaces | |
| namespace | bezier |
| namespace | catmull_rom |
| namespace | nurbs |
| namespace | poly |
Classes | |
| struct | CurvePoint |
| struct | CurveSegment |
| class | IndexRangeCyclic |
Functions | |
Inline Curve Methods | |
| int | segments_num (const int points_num, const bool cyclic) |
| float2 | encode_surface_bary_coord (const float3 &v) |
| float3 | decode_surface_bary_coord (const float2 &v) |
| IndexRange | per_curve_point_offsets_range (const IndexRange points, const int curve_index) |
Utility Functions | |
| void | fill_points (OffsetIndices< int > points_by_curve, const IndexMask &curve_selection, GPointer value, GMutableSpan dst) |
| template<typename T > | |
| void | fill_points (const OffsetIndices< int > points_by_curve, const IndexMask &curve_selection, const T &value, MutableSpan< T > dst) |
| bke::CurvesGeometry | copy_only_curve_domain (const bke::CurvesGeometry &src_curves) |
| IndexMask | indices_for_type (const VArray< int8_t > &types, const std::array< int, CURVE_TYPES_NUM > &type_counts, const CurveType type, const IndexMask &selection, IndexMaskMemory &memory) |
| void | foreach_curve_by_type (const VArray< int8_t > &types, const std::array< int, CURVE_TYPES_NUM > &type_counts, const IndexMask &selection, FunctionRef< void(IndexMask)> catmull_rom_fn, FunctionRef< void(IndexMask)> poly_fn, FunctionRef< void(IndexMask)> bezier_fn, FunctionRef< void(IndexMask)> nurbs_fn) |
| CurvesGeometry blender::bke::curves::copy_only_curve_domain | ( | const bke::CurvesGeometry & | src_curves | ) |
Create new curves with the same number of curves as the input, but no points. Copy all curve domain attributes to the new curves, except the offsets encoding the size of each curve.
Used for operations that change the number of points but not the number of curves, allowing creation of the new offsets directly inside the new array.
Definition at line 27 of file curves_utils.cc.
References CD_MASK_ALL, CurvesGeometry::curve_data, blender::bke::CurvesGeometry::curves_num(), CustomData_init_from(), and CurvesGeometry::runtime.
Referenced by blender::geometry::convert_curves_to_bezier(), blender::geometry::convert_curves_to_catmull_rom_or_poly(), blender::geometry::convert_curves_to_nurbs(), blender::ed::greasepencil::curves_merge_by_distance(), blender::geometry::extend_curves(), blender::geometry::resample_to_count(), blender::geometry::resample_to_evaluated(), blender::geometry::resample_to_length(), blender::geometry::resample_to_uniform(), and blender::ed::curves::resize_curves().
Definition at line 505 of file BKE_curves.hh.
References v.
Definition at line 499 of file BKE_curves.hh.
References BLI_assert, and v.
| void blender::bke::curves::fill_points | ( | const OffsetIndices< int > | points_by_curve, |
| const IndexMask & | curve_selection, | ||
| const T & | value, | ||
| MutableSpan< T > | dst ) |
Definition at line 479 of file BKE_curves_utils.hh.
References fill_points().
| void blender::bke::curves::fill_points | ( | OffsetIndices< int > | points_by_curve, |
| const IndexMask & | curve_selection, | ||
| GPointer | value, | ||
| GMutableSpan | dst ) |
Definition at line 14 of file curves_utils.cc.
References BLI_assert, blender::GMutableSpan::data(), blender::index_mask::IndexMask::foreach_index(), blender::GMutableSpan::slice(), and blender::GMutableSpan::type().
Referenced by blender::geometry::convert_curves_to_bezier(), blender::geometry::convert_curves_to_nurbs(), blender::geometry::copy_or_defaults_for_unselected_curves(), blender::geometry::fill_nurbs_data(), and fill_points().
| void blender::bke::curves::foreach_curve_by_type | ( | const VArray< int8_t > & | types, |
| const std::array< int, CURVE_TYPES_NUM > & | type_counts, | ||
| const 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 54 of file curves_utils.cc.
References CURVE_TYPE_BEZIER, CURVE_TYPE_CATMULL_ROM, CURVE_TYPE_NURBS, CURVE_TYPE_POLY, and indices_for_type().
Referenced by blender::geometry::convert_curves_to_bezier(), blender::geometry::convert_curves_to_catmull_rom_or_poly(), blender::geometry::convert_curves_to_nurbs(), and blender::bke::curve_legacy_to_curves().
| 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, | ||
| IndexMaskMemory & | memory ) |
Definition at line 36 of file curves_utils.cc.
References blender::index_mask::IndexMask::from_predicate(), and selection.
Referenced by blender::ed::transform::curves::createTransCurvesVerts(), blender::ed::transform::greasepencil::createTransGreasePencilVerts(), and foreach_curve_by_type().
|
inline |
Return a range used to retrieve values from an array of values stored per point, but with an extra element at the end of each curve. This is useful for offsets within curves, where it is convenient to store the first 0 and have the last offset be the total result curve size, using the same rules as #OffsetIndices.
Definition at line 516 of file BKE_curves.hh.
References blender::IndexRange::start().
Referenced by blender::bke::CurvesGeometry::bezier_evaluated_offsets_for_curve(), blender::geometry::calculate_result_offsets(), blender::geometry::calculate_result_offsets(), blender::geometry::duplicate_fillet_point_data(), and blender::geometry::subdivide_attribute_linear().
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 493 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::draw::curve_eval_render_wire_verts_edges_len_get(), blender::bke::fill_mesh_topology(), blender::bke::curves::bezier::has_vector_handles(), and blender::bke::segments_num_no_duplicate_edge().