|
Blender V5.3
|
#include <BKE_curves.hh>
Inherits blender::CurvesGeometry.
Classes | |
| struct | BlendWriteData |
#CurvesGeometry Inline Methods | |
| int | points_num () const |
| int | curves_num () const |
| bool | is_empty () const |
| IndexRange | points_range () const |
| IndexRange | curves_range () const |
| OffsetIndices< int > | points_by_curve () const |
| bool | has_curve_with_type (CurveType type) const |
| bool | has_curve_with_type (Span< CurveType > types) const |
| bool | is_single_type (CurveType type) const |
| const std::array< int, CURVE_TYPES_NUM > & | curve_type_counts () const |
| bool | nurbs_has_custom_knots () const |
| int | evaluated_points_num () const |
| Span< int > | bezier_evaluated_offsets_for_curve (int curve_index) const |
| Span< float > | evaluated_lengths_for_curve (int curve_index, bool cyclic) const |
| float | evaluated_length_total_for_curve (int curve_index, bool cyclic) const |
Evaluation | |
| IndexMask | indices_for_curve_type (CurveType type, IndexMaskMemory &memory) const |
| IndexMask | indices_for_curve_type (CurveType type, const IndexMask &selection, IndexMaskMemory &memory) const |
| Array< int > | point_to_curve_map () const |
| OffsetIndices< int > | evaluated_points_by_curve () const |
| bool | has_cyclic_curve () const |
| Span< float3 > | evaluated_positions () const |
| Span< float3 > | evaluated_tangents () const |
| Span< float3 > | evaluated_normals () const |
| void | ensure_evaluated_lengths () const |
| void | ensure_can_interpolate_to_evaluated () const |
| void | interpolate_to_evaluated (int curve_index, GSpan src, GMutableSpan dst) const |
| void | interpolate_to_evaluated (GSpan src, GMutableSpan dst) const |
Additional Inherited Members | |
| Public Attributes inherited from blender::CurvesGeometry | |
| int * | curve_offsets = nullptr |
| struct AttributeStorage | attribute_storage |
| CustomData | point_data |
| CustomData | curve_data_legacy |
| int | point_num = 0 |
| int | curve_num = 0 |
| ListBaseT< struct bDeformGroup > | vertex_group_names = {nullptr, nullptr} |
| int | vertex_group_active_index = 0 |
| int | attributes_active_index = -1 |
| bke::CurvesGeometryRuntime * | runtime = nullptr |
| float * | custom_knots = nullptr |
| int | custom_knot_num = 0 |
| char | _pad [4] = {} |
A C++ class that wraps the DNA struct for better encapsulation and ease of use. It inherits directly from the struct rather than storing a pointer to avoid more complicated ownership handling.
Definition at line 156 of file BKE_curves.hh.
| blender::bke::CurvesGeometry::CurvesGeometry | ( | ) |
Definition at line 68 of file curves_geometry.cc.
References CurvesGeometry().
Referenced by CurvesGeometry(), CurvesGeometry(), CurvesGeometry(), operator=(), operator=(), and blender::bke::bake::serialize_geometry_set().
| blender::bke::CurvesGeometry::CurvesGeometry | ( | int | point_num, |
| int | curve_num ) |
Create curves with the given size. Only the position attribute is created, along with the offsets.
Definition at line 70 of file curves_geometry.cc.
References blender::bke::MutableAttributeAccessor::add(), blender::CurvesGeometry::attribute_storage, blender::bke::AttributeInitConstruct::AttributeInitConstruct(), attributes_for_write(), blender::CurvesGeometry::curve_data_legacy, blender::CurvesGeometry::curve_num, blender::CurvesGeometry::curve_offsets, blender::bke::CurvesGeometryRuntime::curve_offsets_sharing_info, blender::CURVE_TYPE_CATMULL_ROM, blender::CurvesGeometry::custom_knot_num, blender::CurvesGeometry::custom_knots, blender::CustomData_reset(), blender::implicit_sharing::info_for_mem_free(), blender::MEM_new_array_uninitialized(), offsets_for_write(), blender::bke::Point, blender::CurvesGeometry::point_data, blender::CurvesGeometry::point_num, blender::CurvesGeometry::runtime, blender::bke::CurvesGeometryRuntime::type_counts, and blender::CurvesGeometry::vertex_group_names.
| blender::bke::CurvesGeometry::CurvesGeometry | ( | const CurvesGeometry & | other | ) |
Definition at line 106 of file curves_geometry.cc.
References blender::ImplicitSharingInfo::add_user(), blender::CurvesGeometry::attribute_storage, blender::CurvesGeometry::attributes_active_index, blender::bke::AttributeStorage::AttributeStorage(), blender::bke::CurvesGeometryRuntime::bake_materials, blender::BKE_defgroup_copy_list(), blender::bke::CurvesGeometryRuntime::bounds_cache, blender::bke::CurvesGeometryRuntime::bounds_with_radius_cache, CD_MASK_MDEFORMVERT, blender::CurvesGeometry::curve_num, blender::CurvesGeometry::curve_offsets, blender::bke::CurvesGeometryRuntime::curve_offsets_sharing_info, CurvesGeometry(), blender::CurvesGeometry::custom_knot_num, blender::bke::CurvesGeometryRuntime::custom_knot_offsets_cache, blender::CurvesGeometry::custom_knots, blender::bke::CurvesGeometryRuntime::custom_knots_sharing_info, blender::CustomData_init_from(), blender::bke::CurvesGeometryRuntime::evaluated_length_cache, blender::bke::CurvesGeometryRuntime::evaluated_normal_cache, blender::bke::CurvesGeometryRuntime::evaluated_offsets_cache, blender::bke::CurvesGeometryRuntime::evaluated_position_cache, blender::bke::CurvesGeometryRuntime::evaluated_tangent_cache, blender::bke::CurvesGeometryRuntime::has_cyclic_curve_cache, blender::bke::CurvesGeometryRuntime::max_material_index_cache, blender::bke::CurvesGeometryRuntime::nurbs_basis_cache, blender::CurvesGeometry::point_data, blender::CurvesGeometry::point_num, blender::CurvesGeometry::runtime, blender::bke::CurvesGeometryRuntime::type_counts, blender::CurvesGeometry::vertex_group_active_index, and blender::CurvesGeometry::vertex_group_names.
| blender::bke::CurvesGeometry::CurvesGeometry | ( | CurvesGeometry && | other | ) |
Definition at line 166 of file curves_geometry.cc.
References blender::CurvesGeometry::attribute_storage, blender::CurvesGeometry::attributes_active_index, blender::bke::AttributeStorage::AttributeStorage(), blender::CurvesGeometry::curve_num, blender::CurvesGeometry::curve_offsets, CurvesGeometry(), blender::CurvesGeometry::custom_knot_num, blender::CurvesGeometry::custom_knots, blender::CustomData_reset(), blender::CurvesGeometry::point_data, blender::CurvesGeometry::point_num, blender::CurvesGeometry::runtime, blender::CurvesGeometry::vertex_group_active_index, and blender::CurvesGeometry::vertex_group_names.
| blender::bke::CurvesGeometry::~CurvesGeometry | ( | ) |
Definition at line 212 of file curves_geometry.cc.
References blender::CurvesGeometry::attribute_storage, blender::CurvesGeometry::curve_offsets, blender::bke::CurvesGeometryRuntime::curve_offsets_sharing_info, blender::CurvesGeometry::custom_knots, blender::bke::CurvesGeometryRuntime::custom_knots_sharing_info, blender::CustomData_free(), blender::implicit_sharing::free_shared_data(), blender::CurvesGeometry::point_data, blender::CurvesGeometry::runtime, blender::CurvesGeometry::vertex_group_names, and blender::bke::AttributeStorage::~AttributeStorage().
Referenced by blender::bke::greasepencil::Drawing::~Drawing().
| GVArray blender::bke::CurvesGeometry::adapt_domain | ( | const GVArray & | varray, |
| AttrDomain | from, | ||
| AttrDomain | to ) const |
Definition at line 1921 of file curves_geometry.cc.
References blender::bke::adapt_curve_domain_curve_to_point(), blender::bke::adapt_curve_domain_point_to_curve(), BLI_assert_unreachable, BUFFER_FOR_CPP_TYPE_VALUE, blender::bke::Curve, blender::GVArray::from_single(), blender::GVArrayCommon::get_internal_single(), blender::GVArrayCommon::is_empty(), blender::GVArrayCommon::is_single(), blender::bke::Point, and blender::GVArrayCommon::type().
|
inline |
Definition at line 500 of file BKE_curves.hh.
References blender::GVArray::GVArray(), T, and blender::GVArray::typed().
| AttributeAccessor blender::bke::CurvesGeometry::attributes | ( | ) | const |
Definition at line 1951 of file curves_geometry.cc.
References blender::bke::AttributeAccessor::AttributeAccessor(), and blender::bke::curves::get_attribute_accessor_functions().
Referenced by blender::ed::greasepencil::apply_color_operation_for_mode(), attr_create_generic(), blender::ed::greasepencil::bake_grease_pencil_animation_exec(), blender::BKE_grease_pencil_material_index_used(), blender::bke::build_mesh_positions(), blender::ed::spreadsheet::GreasePencilLayerCurvesDomainViewItem::build_row(), blender::bke::compare_geometry::compare_curves(), blender::geometry::convert_curves_to_bezier(), blender::geometry::convert_curves_to_catmull_rom_or_poly(), blender::geometry::convert_curves_to_nurbs(), blender::geometry::copy_and_reorder_curves(), blender::nodes::node_geo_duplicate_elements_cc::copy_curve_attributes_without_id(), blender::ed::curves::copy_data_to_geometry(), blender::bke::curves::copy_only_curve_domain(), blender::nodes::node_geo_duplicate_elements_cc::copy_stable_id_curves(), blender::ed::greasepencil::boolean::create_curves_from_segments(), blender::ed::greasepencil::create_curves_outline(), blender::create_dashes(), blender::create_envelope_strokes(), blender::bke::curve_to_mesh_sweep(), blender::ed::greasepencil::curves_geometry_is_equal(), blender::ed::greasepencil::curves_merge_endpoints_by_distance(), blender::ed::greasepencil::tests::draw_results(), blender::draw::DRW_curves_batch_cache_create_requested(), blender::nodes::node_geo_duplicate_elements_cc::duplicate_points_CurvesGeometry(), evaluated_normals(), blender::ed::sculpt_paint::AddOperationExecutor::execute(), blender::ed::sculpt_paint::CombOperationExecutor::execute(), blender::ed::sculpt_paint::CurvesEffectOperationExecutor::execute(), blender::ed::sculpt_paint::CutOperationExecutor::execute(), blender::ed::sculpt_paint::PinchOperationExecutor::execute(), blender::ed::sculpt_paint::PuffOperationExecutor::execute(), blender::ed::sculpt_paint::SlideOperationExecutor::execute(), blender::ed::sculpt_paint::SmoothOperationExecutor::execute(), blender::ed::sculpt_paint::SnakeHookOperatorExecutor::execute(), export_hair_curves(), export_hair_curves_motion(), blender::geometry::extend_curves(), blender::geometry::extract_curves(), blender::geometry::extract_curves_points(), blender::geometry::extract_greasepencil_layer_curves(), blender::geometry::extract_greasepencil_layer_points(), blender::ed::curves::pen_tool::extrude_curves(), blender::ed::greasepencil::extrude_grease_pencil_curves(), blender::bke::greasepencil::Drawing::fill_colors(), blender::geometry::fillet_curves(), blender::geometry::gather_curve_attributes_to_interpolate(), blender::geometry::gather_point_attributes_to_interpolate(), blender::geometry::gather_point_attributes_to_interpolate(), blender::ed::greasepencil::get_boundary_bounds(), blender::ed::sculpt_paint::greasepencil::get_single_stroke(), blender::bke::AttributeExistsFieldInput::get_varray_for_context(), blender::ed::greasepencil::get_visible_boundary_strokes(), blender::ed::sculpt_paint::grease_pencil_apply_fill(), blender::ed::sculpt_paint::greasepencil::EraseOperationExecutor::hard_eraser(), blender::geometry::initialize_curves_builtin_attribute_defaults(), blender::ed::curves::pen_tool::insert_point_to_curve(), blender::nodes::node_geo_interpolate_curves_cc::interpolate_curve_attributes(), blender::geometry::join_curves_ranges(), material_index_max(), blender::modify_curves(), blender::nodes::node_geo_deform_curves_on_surface_cc::node_geo_exec(), blender::nodes::node_geo_instance_on_points_cc::node_geo_exec(), blender::nodes::node_geo_transfer_attributes_cc::node_geo_exec(), blender::ed::sculpt_paint::greasepencil::EraseOperation::on_stroke_done(), blender::bke::greasepencil::Drawing::opacities(), blender::bke::greasepencil::Drawing::radii(), remove_attributes_based_on_types(), blender::nodes::node_geo_remove_attribute_cc::remove_attributes_recursive(), blender::ed::greasepencil::render_strokes(), blender::geometry::reorder_and_flip_curves(), blender::reorder_cyclic_curve_points(), blender::draw::request_attribute(), blender::geometry::retrieve_attribute_spans(), blender::geometry::retrieve_attribute_spans(), reverse_curves(), blender::geometry::separate_curves_selection(), blender::ed::sculpt_paint::greasepencil::EraseOperationExecutor::soft_eraser(), blender::ed::sculpt_paint::greasepencil::EraseOperationExecutor::stroke_eraser(), blender::geometry::subdivide_curves(), blender::geometry::tests::TEST_F(), blender::geometry::tests::TEST_F(), blender::geometry::tests::TEST_F(), blender::geometry::tests::TEST_F(), blender::geometry::tests::TEST_F(), blender::geometry::tests::TEST_F(), blender::geometry::tests::TEST_F(), transform(), blender::geometry::trim_curves(), and blender::bke::greasepencil::Drawing::vertex_colors().
| MutableAttributeAccessor blender::bke::CurvesGeometry::attributes_for_write | ( | ) |
Definition at line 1956 of file curves_geometry.cc.
References blender::bke::curves::get_attribute_accessor_functions(), and blender::bke::MutableAttributeAccessor::MutableAttributeAccessor().
Referenced by blender::ed::greasepencil::apply_eval_grease_pencil_data(), blender::nodes::ForeachElementComponent::attributes_for_write(), blender::BKE_grease_pencil_material_index_remove(), blender::BKE_grease_pencil_material_remap(), blender::build_concurrent(), blender::build_sequential(), blender::ed::greasepencil::clipboard_paste_strokes_ex(), blender::ed::object::convert_curves_legacy_to_grease_pencil(), blender::geometry::convert_curves_to_bezier(), blender::geometry::convert_curves_to_catmull_rom_or_poly(), blender::ed::object::convert_curves_to_grease_pencil(), blender::geometry::convert_curves_to_nurbs(), blender::ed::object::convert_font_to_grease_pencil(), blender::geometry::copy_and_reorder_curves(), blender::nodes::node_geo_duplicate_elements_cc::copy_curve_attributes_without_id(), blender::ed::curves::copy_data_to_geometry(), blender::bke::curves::copy_only_curve_domain(), blender::nodes::node_geo_duplicate_elements_cc::copy_stable_id_curves(), blender::create_array_copies(), blender::ed::greasepencil::boolean::create_curves_from_segments(), blender::ed::greasepencil::trim::create_curves_from_segments(), blender::create_dashes(), blender::create_envelope_strokes(), blender::nodes::node_geo_curves_to_grease_pencil_cc::curve_instances_to_grease_pencil_layers(), blender::bke::curves_copy_curve_selection(), CurvesGeometry(), blender::ed::greasepencil::segment::cut_caps(), blender::deform_drawing(), blender::nodes::node_geo_duplicate_elements_cc::duplicate_curves_CurveGeometry(), blender::nodes::node_geo_duplicate_elements_cc::duplicate_points_CurvesGeometry(), blender::ed::sculpt_paint::AddOperationExecutor::execute(), blender::geometry::execute_realize_curve_tasks(), blender::geometry::execute_realize_grease_pencil_task(), blender::geometry::extend_curves(), blender::geometry::extract_greasepencil_layer_curves(), blender::geometry::extract_greasepencil_layer_points(), blender::ed::curves::pen_tool::extrude_curves(), blender::ed::greasepencil::extrude_grease_pencil_curves(), fill_curve_types(), blender::geometry::fillet_curves(), blender::geometry::gather_point_attributes_to_interpolate(), blender::ed::sculpt_paint::greasepencil::get_single_stroke(), blender::ed::sculpt_paint::grease_pencil_apply_fill(), blender::geometry::grease_pencil_remove_points_and_split(), blender::ed::curves::pen_tool::insert_point_to_curve(), blender::nodes::node_geo_interpolate_curves_cc::interpolate_curve_attributes(), blender::geometry::join_curves_ranges(), blender::MOD_lineart_gpencil_generate_v3(), blender::modify_fill_color(), blender::nodes::node_geo_transfer_attributes_cc::node_geo_exec(), blender::ed::sculpt_paint::greasepencil::EraseOperation::on_stroke_done(), blender::ed::sculpt_paint::greasepencil::PaintOperation::on_stroke_done(), remove_attributes_based_on_types(), blender::geometry::remove_points_and_split(), blender::geometry::reorder_and_flip_curves(), blender::reorder_cyclic_curve_points(), blender::ed::curves::resize_curves(), blender::geometry::retrieve_attribute_spans(), blender::geometry::retrieve_attribute_spans(), reverse_curves(), blender::ed::greasepencil::boolean::separate_fill_islands(), blender::ed::curves::separate_points(), blender::ed::sculpt_paint::set_fill_attributes(), blender::nodes::node_geo_set_material_index_cc::set_material_index_in_grease_pencil(), blender::ed::sculpt_paint::greasepencil::EraseOperationExecutor::soft_eraser(), blender::nodes::node_geo_interpolate_curves_cc::store_output_attributes(), blender::geometry::subdivide_curves(), transform(), and blender::geometry::trim_curves().
|
inline |
Retrieve offsets into a Bezier curve's evaluated points for each control point. Stored in the same format as OffsetIndices. Call evaluated_points_by_curve() first to ensure that the evaluated offsets cache is current.
Definition at line 1070 of file BKE_curves.hh.
References blender::bke::CurvesGeometryRuntime::evaluated_offsets_cache, offsets(), blender::bke::curves::per_curve_point_offsets_range(), points_by_curve(), blender::CurvesGeometry::runtime, and blender::Span< T >::slice().
Referenced by blender::geometry::lookup_point_bezier(), blender::geometry::sample_curve_attribute(), and blender::bke::write_sharp_bezier_edges().
| void blender::bke::CurvesGeometry::blend_read | ( | BlendDataReader & | reader | ) |
Definition at line 1967 of file curves_geometry.cc.
References blender::bke::ATTR_CURVE_TYPE, blender::CurvesGeometry::attribute_storage, blender::bke::AttributeStorage::blend_read(), blender::BLO_read_array(), blender::BLO_read_array_and_validate_size(), blender::BLO_read_data_invalidate(), blender::BLO_read_data_reports(), blender::BLO_read_shared(), BLO_read_struct_list, blender::BLO_reportf_wrap(), blender::CD_PROP_INT8, blender::CurvesGeometry::curve_data_legacy, blender::CurvesGeometry::curve_num, blender::CurvesGeometry::curve_offsets, blender::bke::CurvesGeometryRuntime::curve_offsets_sharing_info, curve_types(), blender::bke::curve_types_are_valid(), curve_types_for_write(), blender::CurvesGeometry::custom_knot_num, blender::bke::CurvesGeometryRuntime::custom_knots_sharing_info, blender::CustomData_blend_read(), blender::CustomData_get_layer_named(), blender::CustomData_get_layer_named_for_write(), blender::VArray< T >::from_span(), blender::implicit_sharing::info_for_mem_free(), blender::CurvesGeometry::point_data, blender::CurvesGeometry::point_num, blender::bke::AttributeStorage::remove(), RPT_, blender::RPT_ERROR, blender::bke::sanitize_curve_types(), blender::VArrayCommon< T >::size(), update_curve_types(), and blender::CurvesGeometry::vertex_group_names.
| void blender::bke::CurvesGeometry::blend_write | ( | BlendWriter & | writer, |
| ID & | id, | ||
| const BlendWriteData & | write_data ) |
Definition at line 2070 of file curves_geometry.cc.
References blender::bke::CurvesGeometry::BlendWriteData::attribute_data, blender::CurvesGeometry::attribute_storage, blender::BKE_defbase_blend_write(), blender::bke::AttributeStorage::blend_write(), CD_MASK_ALL, blender::CurvesGeometry::curve_num, blender::CurvesGeometry::curve_offsets, blender::bke::CurvesGeometryRuntime::curve_offsets_sharing_info, blender::CurvesGeometry::custom_knot_num, blender::bke::CurvesGeometryRuntime::custom_knots_sharing_info, blender::CustomData_blend_write(), blender::CurvesGeometry::point_data, blender::bke::CurvesGeometry::BlendWriteData::point_layers, blender::CurvesGeometry::vertex_group_names, and blender::BlendWriter::write_shared().
| void blender::bke::CurvesGeometry::blend_write_prepare | ( | CurvesGeometry::BlendWriteData & | write_data, |
| bool | use_5_0_compatibility ) |
This function needs to be called before blend_write and before the CurvesGeometry struct is written because it can mutate the CustomData and AttributeStorage structs.
Definition at line 2048 of file curves_geometry.cc.
References blender::bke::CurvesGeometry::BlendWriteData::attribute_data, blender::CurvesGeometry::attribute_storage, blender::bke::attribute_storage_blend_write_prepare(), blender::bke::AttributeStorage::BlendWriteData::attributes, blender::CurvesGeometry::curve_data_legacy, blender::CustomData_blend_write_prepare(), blender::CustomData_reset(), blender::AttributeStorage::dna_attributes, blender::AttributeStorage::dna_attributes_num, blender::BlendWriter::generated_pointer_tag(), blender::CurvesGeometry::point_data, blender::bke::CurvesGeometry::BlendWriteData::point_layers, and blender::bke::AttributeStorage::BlendWriteData::writer.
| std::optional< Bounds< float3 > > blender::bke::CurvesGeometry::bounds_min_max | ( | bool | use_radius = true | ) | const |
The largest and smallest position values of evaluated points.
Definition at line 1430 of file curves_geometry.cc.
References blender::Array< T, InlineBufferCapacity, Allocator >::as_mutable_span(), blender::Array< T, InlineBufferCapacity, Allocator >::as_span(), blender::bke::CurvesGeometryRuntime::bounds_cache, bounds_min_max(), blender::bke::CurvesGeometryRuntime::bounds_with_radius_cache, blender::CURVE_TYPE_POLY, ensure_can_interpolate_to_evaluated(), evaluated_points_num(), evaluated_positions(), interpolate_to_evaluated(), is_empty(), is_single_type(), blender::bounds::min_max(), blender::bounds::min_max_with_radii(), blender::Bounds< T >::pad(), positions(), and radius().
Referenced by bounds_min_max(), blender::create_array_copies(), blender::io::grease_pencil::shift_to_bounds_center(), blender::bke::tests::TEST_F(), and blender::bke::tests::TEST_F().
| void blender::bke::CurvesGeometry::calculate_bezier_aligned_handles | ( | ) |
Calculate handle positions for Align handle types. Ensure that both handles position fall on the same line, both handle will be moved unless the handles are already aligned.
Definition at line 1363 of file curves_geometry.cc.
References blender::BEZIER_HANDLE_ALIGN, blender::bke::curves::bezier::calculate_aligned_handles(), blender::CURVE_TYPE_BEZIER, blender::bke::curves::curve_type_point_selection(), blender::IndexMask::from_predicate(), handle_positions_left(), handle_positions_left_for_write(), handle_positions_right(), handle_positions_right_for_write(), handle_types_left(), handle_types_right(), has_curve_with_type(), and positions().
| void blender::bke::CurvesGeometry::calculate_bezier_auto_handles | ( | ) |
Calculate handle positions for Auto, Vector handle types.
Definition at line 1331 of file curves_geometry.cc.
References blender::bke::curves::bezier::calculate_auto_handles(), blender::CURVE_TYPE_BEZIER, curve_types(), curves_range(), cyclic(), handle_positions_left(), handle_positions_left_for_write(), handle_positions_right(), handle_positions_right_for_write(), handle_types_left(), handle_types_right(), has_curve_with_type(), blender::threading::parallel_for(), points_by_curve(), positions(), blender::blender::Span< T >::slice(), blender::MutableSpan< T >::slice(), and blender::Span< T >::slice().
Referenced by blender::geometry::convert_curves_to_bezier(), blender::ed::curves::pen_tool::extrude_curves(), blender::geometry::fillet_curves(), blender::ed::curves::pen_tool::insert_point_to_curve(), and blender::geometry::interpolate_curves_with_samples().
| void blender::bke::CurvesGeometry::count_memory | ( | MemoryCounter & | memory | ) | const |
Definition at line 1477 of file curves_geometry.cc.
References blender::memory_counter::MemoryCounter::add_shared(), blender::CurvesGeometry::attribute_storage, blender::bke::AttributeStorage::count_memory(), blender::bke::CurvesGeometryRuntime::curve_offsets_sharing_info, blender::bke::CurvesGeometryRuntime::custom_knots_sharing_info, blender::CustomData_count_memory(), blender::CurvesGeometry::point_data, and blender::CurvesGeometry::point_num.
|
inline |
Return the number of curves with each type.
Definition at line 1044 of file BKE_curves.hh.
References blender::BLI_assert(), blender::bke::calculate_type_counts(), blender::bke::CurvesGeometryRuntime::check_type_counts, curve_types(), blender::CurvesGeometry::runtime, and blender::bke::CurvesGeometryRuntime::type_counts.
Referenced by blender::geometry::convert_curves_to_bezier(), blender::geometry::convert_curves_to_catmull_rom_or_poly(), blender::geometry::convert_curves_to_nurbs(), blender::draw::DRW_curves_batch_cache_create_requested(), evaluated_positions(), blender::geometry::gather_point_attributes_to_interpolate(), blender::geometry::gather_point_attributes_to_interpolate(), has_curve_with_type(), indices_for_curve_type(), is_single_type(), blender::geometry::subdivide_curves(), and blender::geometry::trim_curves().
The type (CurveType) of each curve, or potentially a single if all are the same type.
Definition at line 232 of file curves_geometry.cc.
References blender::bke::ATTR_CURVE_TYPE, blender::CurvesGeometry::attribute_storage, blender::bke::Curve, blender::CURVE_TYPE_CATMULL_ROM, and blender::bke::get_varray_attribute().
Referenced by blend_read(), calculate_bezier_auto_handles(), blender::geometry::convert_bezier_or_catmull_rom_to_poly_before_conversion_to_nurbs(), blender::geometry::convert_curves_to_bezier(), blender::geometry::convert_curves_to_catmull_rom_or_poly(), blender::geometry::convert_curves_to_nurbs(), curve_type_counts(), blender::draw::DRW_curves_batch_cache_create_requested(), evaluated_normals(), evaluated_positions(), blender::ed::curves::pen_tool::extrude_curves(), blender::ed::greasepencil::extrude_grease_pencil_curves(), fill_curve_types(), blender::io::grease_pencil::GreasePencilExporter::foreach_shape_in_layer(), indices_for_curve_type(), blender::ed::curves::pen_tool::insert_point_to_curve(), blender::geometry::interpolate_curves_with_samples(), interpolate_to_evaluated(), interpolate_to_evaluated(), nurbs_custom_knot_curves(), nurbs_custom_knots_by_curve(), blender::geometry::resample_to_uniform(), blender::geometry::sample_curve_attribute(), blender::geometry::sample_curve_positions_and_handles(), blender::geometry::subdivide_curves(), blender::geometry::trim_curves(), update_curve_types(), and blender::bke::write_sharp_bezier_edges().
| MutableSpan< int8_t > blender::bke::CurvesGeometry::curve_types_for_write | ( | ) |
Mutable access to curve types. Call tag_topology_changed and update_curve_types after changing any type. Consider using the other methods to change types below.
Definition at line 241 of file curves_geometry.cc.
References blender::bke::ATTR_CURVE_TYPE, blender::CurvesGeometry::attribute_storage, blender::bke::Curve, and blender::bke::get_mutable_attribute().
Referenced by blend_read(), fill_curve_types(), blender::geometry::fit_poly_to_bezier_curves(), and blender::geometry::interpolate_curves_with_samples().
|
inline |
The number of curves in the data-block.
Definition at line 1005 of file BKE_curves.hh.
References blender::CurvesGeometry::curve_num.
Referenced by blender::ed::curves::append_primitive_curve(), blender::build_drawing(), blender::bke::calculate_result_offsets(), blender::ed::greasepencil::clipboard_paste_strokes_ex(), blender::bke::compare_geometry::compare_curves(), blender::ed::greasepencil::compute_topology_change(), blender::geometry::convert_curves_to_bezier(), blender::geometry::convert_curves_to_catmull_rom_or_poly(), blender::geometry::convert_curves_to_nurbs(), blender::bke::curves::nurbs::copy_custom_knots(), blender::bke::curves::copy_only_curve_domain(), blender::create_envelope_strokes(), blender::bke::curves_copy_curve_selection(), blender::bke::curves_copy_point_selection(), blender::ed::greasepencil::curves_geometry_is_equal(), blender::ed::greasepencil::curves_merge_by_distance(), blender::geometry::curves_merge_endpoints(), blender::ed::greasepencil::curves_merge_endpoints_by_distance(), curves_range(), blender::ed::greasepencil::tests::draw_results(), blender::duplicate_strokes(), blender::ed::sculpt_paint::AddOperationExecutor::ensure_curve_roots_kdtree(), ensure_evaluated_lengths(), evaluated_points_by_curve(), blender::ed::sculpt_paint::CombOperationExecutor::execute(), blender::ed::sculpt_paint::CurvesEffectOperationExecutor::execute(), blender::ed::sculpt_paint::CutOperationExecutor::execute(), blender::ed::sculpt_paint::DeleteOperationExecutor::execute(), blender::ed::sculpt_paint::DensityAddOperationExecutor::execute(), blender::ed::sculpt_paint::DensitySubtractOperationExecutor::execute(), blender::ed::sculpt_paint::PinchOperationExecutor::execute(), blender::ed::sculpt_paint::PuffOperationExecutor::execute(), blender::ed::greasepencil::execute_carver_on_drawing(), blender::ed::greasepencil::tests::expect_boolean_result_coord(), blender::geometry::extend_curves(), blender::ed::curves::extrude_curves(), blender::ed::curves::pen_tool::extrude_curves(), blender::ed::greasepencil::extrude_grease_pencil_curves(), fill_curve_types(), blender::geometry::fillet_curves(), blender::ed::sculpt_paint::greasepencil::find_curve_mapping_from_index(), blender::ed::sculpt_paint::SlideOperationExecutor::find_curves_to_slide_with_symmetry(), blender::geometry::fit_poly_to_bezier_curves(), blender::io::grease_pencil::GreasePencilExporter::foreach_shape_in_layer(), blender::ed::sculpt_paint::grease_pencil_apply_fill(), blender::ed::greasepencil::grease_pencil_copy_strokes_exec(), blender::ed::curves::pen_tool::insert_point_to_curve(), blender::geometry::interpolate_curves_with_samples(), is_single_type(), blender::nodes::node_geo_curve_spline_type_cc::node_geo_exec(), blender::nodes::node_geo_interpolate_curves_cc::parameterize_guide_curves(), blender::ed::sculpt_paint::DensityAddOperationExecutor::prepare_curve_roots_kdtrees(), blender::ed::sculpt_paint::DensitySubtractOperationExecutor::reduce_density_projected(), blender::ed::sculpt_paint::DensitySubtractOperationExecutor::reduce_density_spherical(), blender::geometry::reorder_curves_geometry(), blender::reorder_cyclic_curve_points(), blender::geometry::resample_to_count(), blender::geometry::resample_to_evaluated(), blender::geometry::resample_to_evaluated(), blender::geometry::resample_to_length(), blender::geometry::resample_to_uniform(), resize(), blender::ed::curves::resize_curves(), blender::geometry::subdivide_curves(), blender::ed::greasepencil::tests::test_curve_boolean(), blender::ed::curves::tests::TEST_F(), blender::ed::curves::tests::TEST_F(), blender::ed::curves::tests::TEST_F(), blender::ed::curves::tests::TEST_F(), blender::ed::curves::tests::TEST_F(), blender::ed::curves::tests::TEST_F(), blender::geometry::tests::TEST_F(), blender::geometry::tests::TEST_F(), blender::geometry::tests::TEST_F(), blender::geometry::tests::TEST_F(), blender::geometry::tests::TEST_F(), blender::geometry::tests::TEST_F(), blender::geometry::tests::TEST_F(), blender::geometry::tests::TEST_F(), blender::ed::greasepencil::trim::trim_curve_segment_ends(), blender::ed::greasepencil::trim::trim_curve_segments(), blender::geometry::trim_curves(), and blender::nodes::node_geo_curve_trim_cc::trim_curves().
|
inline |
Definition at line 1023 of file BKE_curves.hh.
References curves_num(), and blender::IndexRange::IndexRange().
Referenced by blender::ed::greasepencil::bake_grease_pencil_animation_exec(), calculate_bezier_auto_handles(), blender::ed::greasepencil::compute_topology_change(), blender::geometry::convert_curves_to_bezier(), blender::geometry::convert_curves_to_catmull_rom_or_poly(), blender::geometry::convert_curves_to_nurbs(), blender::create_envelope_strokes(), blender::ed::greasepencil::boolean::curve_boolean_with_planes(), blender::ed::greasepencil::curves_merge_by_distance(), blender::geometry::curves_merge_endpoints(), blender::ed::greasepencil::curves_merge_endpoints_by_distance(), blender::draw::DRW_curves_batch_cache_create_requested(), ensure_evaluated_lengths(), evaluated_normals(), evaluated_positions(), evaluated_tangents(), blender::ed::sculpt_paint::DensitySubtractOperationExecutor::execute(), blender::ed::greasepencil::execute_carver_on_drawing(), blender::geometry::extend_curves(), blender::ed::curves::pen_tool::extrude_curves(), blender::ed::greasepencil::extrude_grease_pencil_curves(), blender::nodes::node_geo_curve_fillet_cc::fillet_curve(), blender::geometry::fillet_curves(), blender::geometry::find_connected_ranges(), blender::ed::sculpt_paint::greasepencil::find_curve_mapping_from_index(), blender::geometry::fit_poly_to_bezier_curves(), blender::io::grease_pencil::GreasePencilExporter::foreach_shape_in_layer(), blender::ed::greasepencil::get_visible_boundary_strokes(), blender::ed::sculpt_paint::grease_pencil_apply_fill(), blender::ed::sculpt_paint::greasepencil::grease_pencil_interpolate_sequence_exec(), blender::ed::sculpt_paint::greasepencil::grease_pencil_interpolate_update(), blender::ed::greasepencil::grease_pencil_primitive_exit(), blender::ed::sculpt_paint::greasepencil::EraseOperationExecutor::hard_eraser(), has_cyclic_curve(), indices_for_curve_type(), blender::ed::curves::pen_tool::insert_point_to_curve(), blender::nodes::node_geo_interpolate_curves_cc::interpolate_curve_attributes(), blender::nodes::node_geo_interpolate_curves_cc::interpolate_curve_shapes(), blender::ed::sculpt_paint::greasepencil::PaintOperation::interpolate_stroke_depth(), interpolate_to_evaluated(), blender::modify_drawing(), nurbs_custom_knot_curves(), nurbs_custom_knots_by_curve(), blender::ed::sculpt_paint::greasepencil::PaintOperation::on_stroke_done(), blender::nodes::node_geo_interpolate_curves_cc::parameterize_guide_curves(), blender::ed::sculpt_paint::DensitySubtractOperationExecutor::reduce_density_projected(), blender::ed::sculpt_paint::DensitySubtractOperationExecutor::reduce_density_spherical(), remove_curves(), blender::geometry::remove_points_and_split(), blender::geometry::resample_to_count(), blender::geometry::resample_to_evaluated(), blender::geometry::resample_to_evaluated(), blender::geometry::resample_to_length(), blender::geometry::resample_to_uniform(), blender::geometry::resample_to_uniform(), blender::ed::curves::resize_curves(), blender::ed::greasepencil::retrieve_visible_strokes(), blender::ed::sculpt_paint::set_fill_attributes(), blender::ed::sculpt_paint::greasepencil::EraseOperationExecutor::soft_eraser(), blender::nodes::node_geo_interpolate_curves_cc::store_output_attributes(), blender::ed::sculpt_paint::greasepencil::EraseOperationExecutor::stroke_eraser(), blender::geometry::subdivide_curves(), blender::nodes::node_geo_curve_subdivide_cc::subdivide_curves(), blender::subdivide_drawing(), blender::nodes::node_geo_curve_subdivide_cc::subdivide_grease_pencil_curves(), blender::ed::greasepencil::tests::TEST_F(), blender::ed::greasepencil::tests::TEST_F(), blender::ed::greasepencil::tests::TEST_F(), blender::ed::greasepencil::tests::TEST_F(), blender::ed::greasepencil::tests::TEST_F(), blender::ed::greasepencil::tests::TEST_F(), blender::ed::greasepencil::tests::TEST_F(), blender::ed::greasepencil::tests::TEST_F(), blender::ed::greasepencil::tests::TEST_F(), blender::ed::greasepencil::tests::TEST_F(), blender::ed::greasepencil::tests::TEST_F(), blender::ed::greasepencil::tests::TEST_F(), blender::ed::greasepencil::tests::TEST_F(), and blender::geometry::trim_curves().
| VArray< bool > blender::bke::CurvesGeometry::cyclic | ( | ) | const |
Whether the curve loops around to connect to itself, on the curve domain.
Definition at line 405 of file curves_geometry.cc.
References blender::bke::ATTR_CYCLIC, blender::CurvesGeometry::attribute_storage, blender::bke::Curve, and blender::bke::get_varray_attribute().
Referenced by calculate_bezier_auto_handles(), blender::ed::greasepencil::compute_topology_change(), blender::geometry::convert_curves_to_bezier(), blender::geometry::convert_curves_to_catmull_rom_or_poly(), blender::geometry::convert_curves_to_nurbs(), blender::ed::greasepencil::boolean::create_curves_from_segments(), blender::create_dashes(), blender::ed::sculpt_paint::greasepencil::EraseOperationExecutor::curves_intersections_and_points_sides(), blender::ed::greasepencil::curves_merge_by_distance(), blender::geometry::curves_merge_endpoints(), blender::ed::greasepencil::tests::draw_results(), blender::draw::DRW_curves_batch_cache_create_requested(), ensure_evaluated_lengths(), evaluated_length_total_for_curve(), evaluated_lengths_for_curve(), evaluated_normals(), evaluated_positions(), evaluated_tangents(), blender::ed::sculpt_paint::CutOperationExecutor::execute(), blender::ed::curves::pen_tool::extrude_curves(), blender::ed::greasepencil::extrude_grease_pencil_curves(), blender::geometry::fillet_curves(), blender::geometry::fit_poly_to_bezier_curves(), blender::io::grease_pencil::GreasePencilExporter::foreach_shape_in_layer(), blender::ed::sculpt_paint::greasepencil::grease_pencil_interpolate_sequence_exec(), blender::ed::sculpt_paint::greasepencil::grease_pencil_interpolate_update(), blender::ed::sculpt_paint::greasepencil::EraseOperationExecutor::hard_eraser(), has_cyclic_curve(), blender::ed::sculpt_paint::greasepencil::interpolate_between_curves(), blender::geometry::interpolate_curves(), blender::geometry::resample_to_length(), blender::geometry::resample_to_uniform(), blender::io::obj::OBJCurvesTest::run_nurbs_test(), blender::geometry::sample_curve_positions_and_handles(), blender::ed::sculpt_paint::greasepencil::EraseOperationExecutor::stroke_eraser(), blender::geometry::subdivide_curves(), blender::subdivide_drawing(), blender::bke::tests::TEST_F(), blender::ed::curves::tests::TEST_F(), blender::ed::curves::tests::TEST_F(), blender::ed::curves::tests::TEST_F(), blender::ed::greasepencil::tests::TEST_F(), blender::ed::greasepencil::tests::TEST_F(), blender::ed::greasepencil::tests::TEST_F(), blender::ed::greasepencil::tests::TEST_F(), blender::ed::greasepencil::tests::TEST_F(), blender::geometry::tests::TEST_F(), blender::geometry::tests::TEST_F(), blender::geometry::tests::TEST_F(), blender::geometry::tests::TEST_F(), blender::geometry::tests::TEST_F(), blender::geometry::tests::TEST_F(), blender::geometry::tests::TEST_F(), blender::geometry::tests::TEST_F(), blender::geometry::trim_catmull_rom_curves(), and blender::ed::greasepencil::trim::trim_curve_segments().
| MutableSpan< bool > blender::bke::CurvesGeometry::cyclic_for_write | ( | ) |
Mutable access to curve cyclic values. Call tag_topology_changed after changes.
Definition at line 410 of file curves_geometry.cc.
References blender::bke::ATTR_CYCLIC, blender::CurvesGeometry::attribute_storage, blender::bke::Curve, and blender::bke::get_mutable_attribute().
Referenced by blender::ed::curves::copy_data_to_geometry(), blender::ed::greasepencil::boolean::create_curves_from_segments(), blender::ed::greasepencil::trim::create_curves_from_segments(), blender::geometry::curves_merge_endpoints(), blender::ed::curves::pen_tool::extrude_curves(), blender::ed::greasepencil::extrude_grease_pencil_curves(), blender::ed::space_node::node_draw_zones_and_frames(), and blender::geometry::remove_points_and_split().
| Span< MDeformVert > blender::bke::CurvesGeometry::deform_verts | ( | ) | const |
Vertex group data, encoded as an array of indices and weights for every vertex.
Definition at line 654 of file curves_geometry.cc.
References blender::CD_MDEFORMVERT, blender::CustomData_get_layer(), blender::CurvesGeometry::point_data, and blender::CurvesGeometry::point_num.
Referenced by blender::modify_curves().
| MutableSpan< MDeformVert > blender::bke::CurvesGeometry::deform_verts_for_write | ( | ) |
Definition at line 664 of file curves_geometry.cc.
References blender::CD_MDEFORMVERT, blender::CD_SET_DEFAULT, blender::CustomData_add_layer(), blender::CustomData_get_layer_for_write(), blender::CurvesGeometry::point_data, and blender::CurvesGeometry::point_num.
Referenced by blender::MOD_lineart_gpencil_generate_v3().
| void blender::bke::CurvesGeometry::ensure_can_interpolate_to_evaluated | ( | ) | const |
Definition at line 1254 of file curves_geometry.cc.
Referenced by bounds_min_max(), blender::bke::curve_to_mesh_sweep(), blender::geometry::interpolate_curves_with_samples(), and blender::geometry::resample_to_evaluated().
| void blender::bke::CurvesGeometry::ensure_evaluated_lengths | ( | ) | const |
Calculates the data described by evaluated_lengths_for_curve if necessary.
Definition at line 1226 of file curves_geometry.cc.
References blender::length_parameterize::accumulate_lengths(), curves_num(), curves_range(), cyclic(), blender::Default, blender::bke::CurvesGeometryRuntime::evaluated_length_cache, evaluated_points_by_curve(), evaluated_points_num(), evaluated_positions(), blender::threading::parallel_for(), PRF_scope_with_name, blender::Vector< T, InlineBufferCapacity, Allocator >::resize(), blender::CurvesGeometry::runtime, blender::MutableSpan< T >::slice(), and blender::Span< T >::slice().
Referenced by blender::ed::greasepencil::curves_merge_by_distance(), blender::geometry::extend_curves(), blender::geometry::interpolate_curves(), blender::geometry::resample_to_length(), blender::geometry::resample_to_uniform(), and blender::geometry::trim_curves().
|
inline |
Definition at line 1095 of file BKE_curves.hh.
References cyclic(), evaluated_lengths_for_curve(), blender::Span< T >::is_empty(), and blender::Span< T >::last().
Referenced by blender::geometry::extend_curves(), and blender::geometry::resample_to_length().
|
inline |
Return a cache of accumulated lengths along the curve. Each item is the length of the subsequent segment (the first value is the length of the first segment rather than 0). This calculation is rather trivial, and only depends on the evaluated positions, but the results are used often, and it is necessarily single threaded per curve, so it is cached.
| cyclic | This argument is redundant with the data stored for the curve, but is passed for performance reasons to avoid looking up the attribute. |
Definition at line 1088 of file BKE_curves.hh.
References cyclic(), blender::bke::CurvesGeometryRuntime::evaluated_length_cache, and blender::CurvesGeometry::runtime.
Referenced by evaluated_length_total_for_curve(), and blender::geometry::resample_to_uniform().
Definition at line 1084 of file curves_geometry.cc.
References blender::Vector< T, InlineBufferCapacity, Allocator >::as_mutable_span(), blender::Vector< T, InlineBufferCapacity, Allocator >::as_span(), attributes(), blender::bke::curves::poly::calculate_normals_minimum(), blender::bke::curves::poly::calculate_normals_z_up(), blender::CURVE_TYPE_POLY, curve_types(), curves_range(), cyclic(), blender::bke::evaluate_generic_data_for_curve(), blender::bke::CurvesGeometryRuntime::evaluated_normal_cache, evaluated_normals(), blender::bke::CurvesGeometryRuntime::evaluated_offsets_cache, evaluated_points_by_curve(), evaluated_points_num(), evaluated_tangents(), blender::VArrayCommon< T >::get_internal_single(), blender::blender::Span< T >::is_empty(), blender::VArrayCommon< T >::is_single(), blender::bke::AttributeAccessor::lookup(), normal_mode(), blender::NORMAL_MODE_FREE, blender::NORMAL_MODE_MINIMUM_TWIST, blender::NORMAL_MODE_Z_UP, blender::bke::normalize_span(), blender::bke::CurvesGeometryRuntime::nurbs_basis_cache, nurbs_orders(), nurbs_weights(), blender::threading::parallel_for(), blender::bke::Point, points_by_curve(), blender::Vector< T, InlineBufferCapacity, Allocator >::reinitialize(), blender::Vector< T, InlineBufferCapacity, Allocator >::resize(), resolution(), blender::bke::rotate_directions_around_axes(), blender::CurvesGeometry::runtime, blender::IndexRange::size(), blender::blender::Span< T >::slice(), blender::MutableSpan< T >::slice(), blender::Span< T >::slice(), and tilt().
Referenced by blender::bke::build_mesh_positions(), evaluated_normals(), and blender::geometry::gather_point_attributes_to_interpolate().
| OffsetIndices< int > blender::bke::CurvesGeometry::evaluated_points_by_curve | ( | ) | const |
The offsets of every curve's evaluated points.
Definition at line 749 of file curves_geometry.cc.
References blender::bke::CurvesGeometryRuntime::EvaluatedOffsets::all_bezier_offsets, blender::bke::calculate_evaluated_offsets(), blender::Vector< T, InlineBufferCapacity, Allocator >::clear_and_shrink(), blender::CURVE_TYPE_BEZIER, blender::CURVE_TYPE_POLY, curves_num(), blender::bke::CurvesGeometryRuntime::EvaluatedOffsets::evaluated_offsets, blender::bke::CurvesGeometryRuntime::evaluated_offsets_cache, has_curve_with_type(), is_single_type(), points_by_curve(), points_num(), blender::Vector< T, InlineBufferCapacity, Allocator >::resize(), and blender::CurvesGeometry::runtime.
Referenced by blender::bke::calculate_result_offsets(), blender::draw::DRW_curves_batch_cache_create_requested(), ensure_evaluated_lengths(), evaluated_normals(), evaluated_points_num(), evaluated_positions(), evaluated_tangents(), blender::bke::foreach_curve_combination(), interpolate_to_evaluated(), blender::geometry::resample_to_evaluated(), blender::geometry::resample_to_uniform(), blender::geometry::sample_curve_attribute(), and blender::geometry::trim_evaluated_curves().
|
inline |
The total number of points in the evaluated poly curve. This can depend on the resolution attribute if it exists.
Definition at line 1064 of file BKE_curves.hh.
References evaluated_points_by_curve().
Referenced by bounds_min_max(), ensure_evaluated_lengths(), evaluated_normals(), evaluated_positions(), and evaluated_tangents().
Definition at line 872 of file curves_geometry.cc.
References blender::bke::curves::bezier::calculate_evaluated_positions(), blender::Vector< T, InlineBufferCapacity, Allocator >::clear_and_shrink(), blender::array_utils::copy_group_to_group(), curve_type_counts(), blender::CURVE_TYPE_POLY, curve_types(), curves_range(), cyclic(), blender::Default, blender::bke::CurvesGeometryRuntime::evaluated_offsets_cache, evaluated_points_by_curve(), evaluated_points_num(), blender::bke::CurvesGeometryRuntime::evaluated_position_cache, evaluated_positions(), blender::bke::curves::fill_points(), blender::bke::curves::foreach_curve_by_type(), blender::exec_mode::grain_size(), handle_positions_left(), handle_positions_right(), blender::bke::curves::catmull_rom::interpolate_to_evaluated(), blender::bke::curves::nurbs::interpolate_to_evaluated(), is_single_type(), blender::bke::CurvesGeometryRuntime::nurbs_basis_cache, nurbs_orders(), nurbs_weights(), offsets(), blender::bke::curves::per_curve_point_offsets_range(), points_by_curve(), positions(), PRF_scope_with_name, blender::Vector< T, InlineBufferCapacity, Allocator >::resize(), resolution(), blender::CurvesGeometry::runtime, blender::MutableSpan< T >::slice(), and blender::Span< T >::slice().
Referenced by bounds_min_max(), blender::bke::build_mesh_positions(), ensure_evaluated_lengths(), evaluated_positions(), evaluated_tangents(), blender::geometry::resample_to_evaluated(), blender::geometry::resample_to_uniform(), blender::geometry::trim_curves(), and blender::geometry::trim_evaluated_curves().
Definition at line 961 of file curves_geometry.cc.
References blender::math::almost_equal_relative(), blender::bke::curves::poly::calculate_tangents(), blender::CURVE_TYPE_BEZIER, curves_range(), cyclic(), blender::Default, evaluated_points_by_curve(), evaluated_points_num(), evaluated_positions(), blender::bke::CurvesGeometryRuntime::evaluated_tangent_cache, blender::IndexRange::first(), blender::index_mask::IndexMask::foreach_index(), blender::exec_mode::grain_size(), handle_positions_left(), handle_positions_right(), indices_for_curve_type(), blender::index_mask::IndexMask::is_empty(), blender::IndexRange::last(), blender::math::normalize(), blender::threading::parallel_for(), points_by_curve(), positions(), PRF_scope_with_name, blender::Vector< T, InlineBufferCapacity, Allocator >::resize(), blender::CurvesGeometry::runtime, blender::MutableSpan< T >::slice(), and blender::Span< T >::slice().
Referenced by blender::bke::build_mesh_positions(), blender::deform_drawing(), evaluated_normals(), and blender::geometry::gather_point_attributes_to_interpolate().
Set the types for the curves in the selection and call update_curve_types.
Definition at line 270 of file curves_geometry.cc.
References curve_types(), curve_types_for_write(), fill_curve_types(), blender::index_mask::masked_fill(), blender::index_mask::IndexMask::size(), tag_topology_changed(), and update_curve_types().
| void blender::bke::CurvesGeometry::fill_curve_types | ( | CurveType | type | ) |
Set all curve types to the value and call update_curve_types.
Definition at line 247 of file curves_geometry.cc.
References blender::bke::AttributeStorage::add(), blender::CurvesGeometry::attribute_storage, attributes_for_write(), blender::bke::Curve, blender::CURVE_TYPE_CATMULL_ROM, curves_num(), blender::data, blender::bke::Attribute::SingleData::from_value(), blender::CPPType::get(), blender::bke::Int8, blender::bke::AttributeStorage::lookup(), blender::bke::MutableAttributeAccessor::remove(), blender::CurvesGeometry::runtime, tag_topology_changed(), and blender::bke::CurvesGeometryRuntime::type_counts.
Referenced by blender::geometry::convert_curves_to_bezier(), blender::geometry::convert_curves_to_catmull_rom_or_poly(), blender::geometry::convert_curves_to_nurbs(), blender::geometry::convert_curves_trivial(), fill_curve_types(), blender::MOD_lineart_gpencil_generate_v3(), blender::ed::space_node::node_draw_zones_and_frames(), blender::geometry::resample_to_evaluated(), blender::geometry::resample_to_uniform(), and blender::geometry::trim_curves().
The positions of Bezier curve handles. Though these are really control points for the Bezier segments, they are stored in separate arrays to better reflect user expectations. Note that values may be generated automatically based on the handle types. Call tag_positions_changed after changes.
Definition at line 483 of file curves_geometry.cc.
References blender::bke::ATTR_HANDLE_POSITION_LEFT, blender::CurvesGeometry::attribute_storage, blender::bke::get_span_attribute(), and blender::bke::Point.
Referenced by calculate_bezier_aligned_handles(), calculate_bezier_auto_handles(), blender::geometry::convert_curves_to_bezier(), blender::geometry::convert_curves_to_catmull_rom_or_poly(), blender::geometry::convert_curves_to_nurbs(), evaluated_positions(), evaluated_tangents(), blender::geometry::fillet_curves(), blender::geometry::fit_poly_to_bezier_curves(), blender::io::grease_pencil::GreasePencilExporter::foreach_shape_in_layer(), blender::ed::curves::pen_tool::insert_point_to_curve(), blender::geometry::sample_curve_positions_and_handles(), blender::geometry::subdivide_curves(), transform(), translate(), blender::geometry::trim_bezier_curves(), and blender::ed::sculpt_paint::greasepencil::view_positions_left_from_point_mask().
| MutableSpan< float3 > blender::bke::CurvesGeometry::handle_positions_left_for_write | ( | ) |
Definition at line 490 of file curves_geometry.cc.
References blender::bke::ATTR_HANDLE_POSITION_LEFT, blender::CurvesGeometry::attribute_storage, blender::bke::get_mutable_attribute(), and blender::bke::Point.
Referenced by calculate_bezier_aligned_handles(), calculate_bezier_auto_handles(), blender::geometry::convert_curves_to_bezier(), blender::geometry::fill_bezier_data(), blender::geometry::fillet_curves(), blender::geometry::fit_poly_to_bezier_curves(), blender::ed::curves::pen_tool::insert_point_to_curve(), blender::geometry::interpolate_curves_with_samples(), reverse_curves(), blender::geometry::subdivide_curves(), transform(), translate(), and blender::geometry::trim_bezier_curves().
Definition at line 498 of file curves_geometry.cc.
References blender::bke::ATTR_HANDLE_POSITION_RIGHT, blender::CurvesGeometry::attribute_storage, blender::bke::get_span_attribute(), and blender::bke::Point.
Referenced by calculate_bezier_aligned_handles(), calculate_bezier_auto_handles(), blender::geometry::convert_curves_to_bezier(), blender::geometry::convert_curves_to_catmull_rom_or_poly(), blender::geometry::convert_curves_to_nurbs(), evaluated_positions(), evaluated_tangents(), blender::geometry::fillet_curves(), blender::geometry::fit_poly_to_bezier_curves(), blender::io::grease_pencil::GreasePencilExporter::foreach_shape_in_layer(), blender::ed::curves::pen_tool::insert_point_to_curve(), blender::geometry::sample_curve_positions_and_handles(), blender::geometry::subdivide_curves(), transform(), translate(), blender::geometry::trim_bezier_curves(), and blender::ed::sculpt_paint::greasepencil::view_positions_right_from_point_mask().
| MutableSpan< float3 > blender::bke::CurvesGeometry::handle_positions_right_for_write | ( | ) |
Definition at line 505 of file curves_geometry.cc.
References blender::bke::ATTR_HANDLE_POSITION_RIGHT, blender::CurvesGeometry::attribute_storage, blender::bke::get_mutable_attribute(), and blender::bke::Point.
Referenced by calculate_bezier_aligned_handles(), calculate_bezier_auto_handles(), blender::geometry::convert_curves_to_bezier(), blender::geometry::fill_bezier_data(), blender::geometry::fillet_curves(), blender::geometry::fit_poly_to_bezier_curves(), blender::ed::curves::pen_tool::insert_point_to_curve(), blender::geometry::interpolate_curves_with_samples(), reverse_curves(), blender::geometry::subdivide_curves(), transform(), translate(), and blender::geometry::trim_bezier_curves().
Handle types for Bezier control points. Call tag_topology_changed after changes.
Definition at line 449 of file curves_geometry.cc.
References blender::bke::ATTR_HANDLE_TYPE_LEFT, blender::CurvesGeometry::attribute_storage, blender::bke::get_varray_attribute(), and blender::bke::Point.
Referenced by calculate_bezier_aligned_handles(), calculate_bezier_auto_handles(), blender::geometry::convert_curves_to_bezier(), blender::geometry::fillet_curves(), blender::geometry::fit_poly_to_bezier_curves(), blender::geometry::sample_curve_positions_and_handles(), blender::geometry::subdivide_curves(), blender::geometry::trim_bezier_curves(), and blender::bke::write_sharp_bezier_edges().
| MutableSpan< int8_t > blender::bke::CurvesGeometry::handle_types_left_for_write | ( | ) |
Definition at line 457 of file curves_geometry.cc.
References blender::bke::ATTR_HANDLE_TYPE_LEFT, blender::CurvesGeometry::attribute_storage, blender::bke::get_mutable_attribute(), and blender::bke::Point.
Referenced by blender::geometry::convert_curves_to_bezier(), blender::ed::curves::pen_tool::extrude_curves(), blender::geometry::fill_bezier_data(), blender::geometry::fillet_curves(), blender::geometry::fit_poly_to_bezier_curves(), blender::ed::curves::pen_tool::insert_point_to_curve(), blender::geometry::interpolate_curves_with_samples(), reverse_curves(), blender::geometry::subdivide_curves(), and blender::geometry::trim_bezier_curves().
Definition at line 466 of file curves_geometry.cc.
References blender::bke::ATTR_HANDLE_TYPE_RIGHT, blender::CurvesGeometry::attribute_storage, blender::bke::get_varray_attribute(), and blender::bke::Point.
Referenced by calculate_bezier_aligned_handles(), calculate_bezier_auto_handles(), blender::geometry::convert_curves_to_bezier(), blender::geometry::fillet_curves(), blender::geometry::fit_poly_to_bezier_curves(), blender::geometry::sample_curve_positions_and_handles(), blender::geometry::subdivide_curves(), blender::geometry::trim_bezier_curves(), and blender::bke::write_sharp_bezier_edges().
| MutableSpan< int8_t > blender::bke::CurvesGeometry::handle_types_right_for_write | ( | ) |
Definition at line 474 of file curves_geometry.cc.
References blender::bke::ATTR_HANDLE_TYPE_RIGHT, blender::CurvesGeometry::attribute_storage, blender::bke::get_mutable_attribute(), and blender::bke::Point.
Referenced by blender::geometry::convert_curves_to_bezier(), blender::ed::curves::pen_tool::extrude_curves(), blender::geometry::fill_bezier_data(), blender::geometry::fillet_curves(), blender::geometry::fit_poly_to_bezier_curves(), blender::ed::curves::pen_tool::insert_point_to_curve(), blender::geometry::interpolate_curves_with_samples(), reverse_curves(), blender::geometry::subdivide_curves(), and blender::geometry::trim_bezier_curves().
|
inline |
Definition at line 1033 of file BKE_curves.hh.
References curve_type_counts().
Referenced by blender::bke::build_mesh_positions(), calculate_bezier_aligned_handles(), calculate_bezier_auto_handles(), blender::geometry::convert_curves_to_bezier(), blender::geometry::convert_curves_to_catmull_rom_or_poly(), evaluated_points_by_curve(), blender::geometry::fill_bezier_data(), blender::geometry::fill_nurbs_data(), blender::geometry::fillet_curves(), blender::modify_curves(), nurbs_custom_knots_by_curve(), remove_attributes_based_on_types(), blender::geometry::trim_curves(), and blender::bke::write_sharp_bezier_edges().
Definition at line 1038 of file BKE_curves.hh.
References blender::Span< T >::begin(), and blender::Span< T >::end().
| bool blender::bke::CurvesGeometry::has_cyclic_curve | ( | ) | const |
| IndexMask blender::bke::CurvesGeometry::indices_for_curve_type | ( | CurveType | type, |
| const IndexMask & | selection, | ||
| IndexMaskMemory & | memory ) const |
Definition at line 792 of file curves_geometry.cc.
References curve_type_counts(), curve_types(), and blender::bke::curves::indices_for_type().
| IndexMask blender::bke::CurvesGeometry::indices_for_curve_type | ( | CurveType | type, |
| IndexMaskMemory & | memory ) const |
All of the curve indices for curves with a specific type.
Definition at line 786 of file curves_geometry.cc.
References curves_range(), and indices_for_curve_type().
Referenced by evaluated_tangents(), and indices_for_curve_type().
| void blender::bke::CurvesGeometry::interpolate_to_evaluated | ( | GSpan | src, |
| GMutableSpan | dst ) const |
Evaluate generic data for curve control points to the standard evaluated points of the curves.
Definition at line 1199 of file curves_geometry.cc.
References curve_types(), curves_range(), blender::Default, blender::bke::evaluate_generic_data_for_curve(), blender::bke::CurvesGeometryRuntime::evaluated_offsets_cache, evaluated_points_by_curve(), blender::bke::CurvesGeometryRuntime::nurbs_basis_cache, nurbs_orders(), nurbs_weights(), blender::threading::parallel_for(), points_by_curve(), PRF_scope_with_name, resolution(), blender::CurvesGeometry::runtime, blender::GMutableSpan::slice(), and blender::GSpan::slice().
| void blender::bke::CurvesGeometry::interpolate_to_evaluated | ( | int | curve_index, |
| GSpan | src, | ||
| GMutableSpan | dst ) const |
Evaluate a generic data to the standard evaluated points of a specific curve, defined by the resolution attribute or other factors, depending on the curve type.
Definition at line 1179 of file curves_geometry.cc.
References blender::BLI_assert(), curve_types(), blender::bke::evaluate_generic_data_for_curve(), blender::bke::CurvesGeometryRuntime::evaluated_offsets_cache, blender::bke::CurvesGeometryRuntime::nurbs_basis_cache, nurbs_orders(), nurbs_weights(), resolution(), blender::CurvesGeometry::runtime, blender::GMutableSpan::size(), and blender::GSpan::size().
Referenced by bounds_min_max(), blender::geometry::resample_to_evaluated(), blender::geometry::resample_to_uniform(), and blender::geometry::sample_curve_attribute().
|
inline |
Return true if there are no curves in the geometry.
Definition at line 1013 of file BKE_curves.hh.
References blender::BLI_assert(), blender::CurvesGeometry::curve_num, and blender::CurvesGeometry::point_num.
Referenced by bounds_min_max(), blender::ed::curves::copy_data_to_geometry(), blender::nodes::node_geo_curve_fill_cc::curve_fill_calculate(), blender::ed::greasepencil::curves_geometry_is_equal(), blender::deform_drawing(), blender::nodes::node_geo_duplicate_elements_cc::duplicate_points_CurvesGeometry(), blender::ed::sculpt_paint::CombOperationExecutor::execute(), blender::ed::sculpt_paint::CurvesEffectOperationExecutor::execute(), blender::ed::sculpt_paint::CutOperationExecutor::execute(), blender::ed::sculpt_paint::DensitySubtractOperationExecutor::execute(), blender::ed::sculpt_paint::PinchOperationExecutor::execute(), blender::ed::sculpt_paint::PuffOperationExecutor::execute(), blender::ed::sculpt_paint::SelectionPaintOperationExecutor::execute(), blender::ed::sculpt_paint::SlideOperationExecutor::execute(), blender::ed::sculpt_paint::SmoothOperationExecutor::execute(), blender::ed::sculpt_paint::SnakeHookOperatorExecutor::execute(), blender::geometry::fillet_curves(), blender::nodes::node_geo_curve_fillet_cc::fillet_grease_pencil(), blender::ed::sculpt_paint::grease_pencil_apply_fill(), blender::geometry::interpolate_curves_with_samples(), blender::ed::greasepencil::join_curves(), blender::geometry::join_curves(), blender::nodes::node_geo_instance_on_points_cc::node_geo_exec(), blender::nodes::node_geo_set_position_cc::set_position_in_grease_pencil(), blender::geometry::subdivide_curves(), blender::bke::tests::TEST_F(), blender::ed::greasepencil::trim::trim_curve_segment_ends(), blender::ed::greasepencil::trim::trim_curve_segments(), blender::nodes::node_geo_curve_trim_cc::trim_curves(), and blender::ed::sculpt_paint::greasepencil::trim_stroke_ends().
|
inline |
Return true if all of the curves have the provided type.
Definition at line 1028 of file BKE_curves.hh.
References curve_type_counts(), and curves_num().
Referenced by bounds_min_max(), evaluated_points_by_curve(), evaluated_positions(), and blender::nodes::node_geo_curve_spline_type_cc::node_geo_exec().
| std::optional< int > blender::bke::CurvesGeometry::material_index_max | ( | ) | const |
Get the largest material index used by the geometry or nullopt if there are none. The returned value is clamped between 0 and MAXMAT even if the stored material indices may be out of that range.
Definition at line 1463 of file curves_geometry.cc.
References attributes(), blender::bke::Curve, blender::SharedCache< T >::data(), blender::SharedCache< T >::ensure(), blender::bounds::max(), blender::bke::CurvesGeometryRuntime::max_material_index_cache, and MAXMAT.
Which method to use for calculating the normals of evaluated points (NormalMode). Call tag_normals_changed after changes.
Definition at line 427 of file curves_geometry.cc.
References blender::bke::ATTR_NORMAL_MODE, blender::CurvesGeometry::attribute_storage, blender::bke::Curve, and blender::bke::get_varray_attribute().
Referenced by evaluated_normals().
| MutableSpan< int8_t > blender::bke::CurvesGeometry::normal_mode_for_write | ( | ) |
Definition at line 432 of file curves_geometry.cc.
References blender::bke::ATTR_NORMAL_MODE, blender::CurvesGeometry::attribute_storage, blender::bke::Curve, and blender::bke::get_mutable_attribute().
| IndexMask blender::bke::CurvesGeometry::nurbs_custom_knot_curves | ( | IndexMaskMemory & | memory | ) | const |
Builds mask of NURBS curves with knot mode NURBS_KNOT_MODE_CUSTOM.
Definition at line 589 of file curves_geometry.cc.
References blender::CURVE_TYPE_NURBS, curve_types(), curves_range(), blender::IndexMask::from_predicate(), blender::NURBS_KNOT_MODE_CUSTOM, and nurbs_knots_modes().
Referenced by blender::bke::curves::nurbs::copy_custom_knots().
Custom knots for NURBS curves with knots mode NURBS_KNOT_MODE_CUSTOM.
Definition at line 571 of file curves_geometry.cc.
References blender::CurvesGeometry::custom_knot_num, and blender::CurvesGeometry::custom_knots.
Referenced by blender::ed::curves::append_point_knots(), and blender::bke::curves::nurbs::gather_custom_knots().
| OffsetIndices< int > blender::bke::CurvesGeometry::nurbs_custom_knots_by_curve | ( | ) | const |
The offsets of every curve into arrays on #CurvesGeometry::nurbs_custom_knots. Curves with knot mode other than NURBS_KNOT_MODE_CUSTOM will have zero sized IndexRange.
Definition at line 598 of file curves_geometry.cc.
References blender::offset_indices::accumulate_counts_to_offsets(), blender::Vector< T, InlineBufferCapacity, Allocator >::as_mutable_span(), blender::CurvesGeometry::curve_num, blender::CURVE_TYPE_NURBS, curve_types(), curves_range(), blender::bke::CurvesGeometryRuntime::custom_knot_offsets_cache, has_curve_with_type(), blender::NURBS_KNOT_MODE_CUSTOM, nurbs_knots_modes(), nurbs_orders(), blender::threading::parallel_for(), points_by_curve(), blender::Vector< T, InlineBufferCapacity, Allocator >::resize(), blender::CurvesGeometry::runtime, and blender::offset_indices::OffsetIndices< T >::size().
Referenced by blender::ed::curves::append_point_knots(), blender::ed::curves::extrude_knots(), blender::bke::curves::nurbs::gather_custom_knots(), nurbs_custom_knots_update_size(), and reverse_curves().
| MutableSpan< float > blender::bke::CurvesGeometry::nurbs_custom_knots_for_write | ( | ) |
Definition at line 579 of file curves_geometry.cc.
References blender::CurvesGeometry::custom_knot_num, blender::CurvesGeometry::custom_knots, blender::bke::CurvesGeometryRuntime::custom_knots_sharing_info, blender::implicit_sharing::make_trivial_data_mutable(), and blender::CurvesGeometry::runtime.
Referenced by blender::bke::copy_curve_selection_custom_knots(), blender::bke::copy_point_selection_custom_knots(), blender::ed::curves::extrude_knots(), blender::bke::curves::nurbs::gather_custom_knots(), and reverse_curves().
| void blender::bke::CurvesGeometry::nurbs_custom_knots_resize | ( | int | knots_num | ) |
Resizes custom knots array. Used when knots number is known in advance and knot values are set together with topological data.
Definition at line 644 of file curves_geometry.cc.
References blender::CurvesGeometry::custom_knot_num, blender::bke::CurvesGeometryRuntime::custom_knot_offsets_cache, blender::CurvesGeometry::custom_knots, blender::bke::CurvesGeometryRuntime::custom_knots_sharing_info, blender::implicit_sharing::resize_trivial_array(), and blender::CurvesGeometry::runtime.
Referenced by blender::geometry::execute_realize_curve_tasks().
| void blender::bke::CurvesGeometry::nurbs_custom_knots_update_size | ( | ) |
Resizes custom knots array depending on topological data. Depends on curve offsets, knot modes, orders and cyclic data. Used to resize internal knots array before writing knots.
Definition at line 630 of file curves_geometry.cc.
References blender::CurvesGeometry::custom_knot_num, blender::bke::CurvesGeometryRuntime::custom_knot_offsets_cache, blender::CurvesGeometry::custom_knots, blender::bke::CurvesGeometryRuntime::custom_knots_sharing_info, nurbs_custom_knots_by_curve(), blender::implicit_sharing::resize_trivial_array(), blender::CurvesGeometry::runtime, and blender::offset_indices::OffsetIndices< T >::total_size().
Referenced by blender::geometry::copy_and_reorder_curves(), blender::bke::copy_curve_selection_custom_knots(), blender::bke::copy_point_selection_custom_knots(), and blender::ed::curves::extrude_knots().
|
inline |
Definition at line 1009 of file BKE_curves.hh.
References blender::CurvesGeometry::custom_knot_num.
Referenced by blender::geometry::copy_and_reorder_curves(), blender::bke::curves::nurbs::copy_custom_knots(), blender::ed::curves::copy_data_to_geometry(), blender::geometry::curves_merge_endpoints(), blender::ed::curves::pen_tool::extrude_curves(), blender::ed::greasepencil::extrude_grease_pencil_curves(), blender::geometry::fillet_curves(), blender::ed::curves::pen_tool::insert_point_to_curve(), blender::ed::curves::resize_curves(), reverse_curves(), and blender::geometry::trim_curves().
The automatic generation mode for each NURBS curve's knots vector, on the curve domain. Call tag_topology_changed after changes.
Definition at line 538 of file curves_geometry.cc.
References blender::bke::ATTR_NURBS_KNOTS_MODE, blender::CurvesGeometry::attribute_storage, blender::bke::Curve, and blender::bke::get_varray_attribute().
Referenced by blender::geometry::convert_curves_to_bezier(), blender::ed::curves::pen_tool::extrude_curves(), blender::ed::greasepencil::extrude_grease_pencil_curves(), blender::ed::curves::pen_tool::insert_point_to_curve(), nurbs_custom_knot_curves(), nurbs_custom_knots_by_curve(), and blender::io::obj::OBJCurvesTest::run_nurbs_test().
| MutableSpan< int8_t > blender::bke::CurvesGeometry::nurbs_knots_modes_for_write | ( | ) |
Definition at line 546 of file curves_geometry.cc.
References blender::bke::ATTR_NURBS_KNOTS_MODE, blender::CurvesGeometry::attribute_storage, blender::bke::Curve, and blender::bke::get_mutable_attribute().
Referenced by blender::geometry::convert_curves_to_nurbs().
The order (degree plus one) of each NURBS curve, on the curve domain. Call tag_topology_changed after changes.
Definition at line 513 of file curves_geometry.cc.
References blender::bke::ATTR_NURBS_ORDER, blender::CurvesGeometry::attribute_storage, blender::bke::Curve, and blender::bke::get_varray_attribute().
Referenced by blender::ed::curves::append_point_knots(), evaluated_normals(), evaluated_positions(), interpolate_to_evaluated(), interpolate_to_evaluated(), nurbs_custom_knots_by_curve(), and blender::io::obj::OBJCurvesTest::run_nurbs_test().
| MutableSpan< int8_t > blender::bke::CurvesGeometry::nurbs_orders_for_write | ( | ) |
Definition at line 518 of file curves_geometry.cc.
References blender::bke::ATTR_NURBS_ORDER, blender::CurvesGeometry::attribute_storage, blender::bke::Curve, and blender::bke::get_mutable_attribute().
Referenced by blender::geometry::convert_curves_to_nurbs().
The weight for each control point for NURBS curves. Call tag_positions_changed after changes.
Definition at line 524 of file curves_geometry.cc.
References blender::bke::ATTR_NURBS_WEIGHT, blender::CurvesGeometry::attribute_storage, blender::bke::get_span_attribute(), and blender::bke::Point.
Referenced by blender::geometry::convert_curves_to_nurbs(), evaluated_normals(), evaluated_positions(), interpolate_to_evaluated(), and interpolate_to_evaluated().
| MutableSpan< float > blender::bke::CurvesGeometry::nurbs_weights_for_write | ( | ) |
Definition at line 529 of file curves_geometry.cc.
References blender::bke::ATTR_NURBS_WEIGHT, blender::CurvesGeometry::attribute_storage, blender::bke::get_mutable_attribute(), and blender::bke::Point.
Referenced by blender::geometry::convert_curves_to_nurbs(), and blender::geometry::fill_nurbs_data().
| Span< int > blender::bke::CurvesGeometry::offsets | ( | ) | const |
The index of the first point in every curve. The size of this span is one larger than the number of curves, but the spans will be empty if there are no curves/points.
Consider using points_by_curve rather than these offsets directly.
Definition at line 388 of file curves_geometry.cc.
References blender::CurvesGeometry::curve_num, and blender::CurvesGeometry::curve_offsets.
Referenced by bezier_evaluated_offsets_for_curve(), blender::bke::compare_geometry::compare_curves(), blender::geometry::copy_and_reorder_curves(), blender::create_envelope_strokes(), blender::ed::greasepencil::curves_geometry_is_equal(), blender::ed::sculpt_paint::AddOperationExecutor::ensure_curve_roots_kdtree(), evaluated_positions(), blender::ed::sculpt_paint::DensitySubtractOperationExecutor::execute(), blender::geometry::fillet_curves(), blender::ed::sculpt_paint::SlideOperationExecutor::find_curves_to_slide(), blender::ed::sculpt_paint::SlideOperationExecutor::find_curves_to_slide_with_symmetry(), blender::geometry::fit_poly_to_bezier_curves(), blender::ed::sculpt_paint::DensityAddOperationExecutor::prepare_curve_roots_kdtrees(), blender::geometry::reorder_and_flip_curves(), blender::ed::curves::resize_curves(), blender::geometry::subdivide_curves(), blender::bke::tests::TEST_F(), blender::geometry::tests::TEST_F(), blender::geometry::tests::TEST_F(), blender::geometry::tests::TEST_F(), blender::geometry::tests::TEST_F(), blender::geometry::tests::TEST_F(), blender::geometry::tests::TEST_F(), blender::geometry::tests::TEST_F(), blender::geometry::tests::TEST_F(), and blender::geometry::trim_curves().
| MutableSpan< int > blender::bke::CurvesGeometry::offsets_for_write | ( | ) |
Definition at line 395 of file curves_geometry.cc.
References blender::CurvesGeometry::curve_num, blender::CurvesGeometry::curve_offsets, blender::bke::CurvesGeometryRuntime::curve_offsets_sharing_info, blender::implicit_sharing::make_trivial_data_mutable(), and blender::CurvesGeometry::runtime.
Referenced by blender::build_concurrent(), blender::build_sequential(), blender::geometry::convert_curves_to_bezier(), blender::geometry::convert_curves_to_catmull_rom_or_poly(), blender::geometry::convert_curves_to_nurbs(), blender::geometry::copy_and_reorder_curves(), blender::ed::curves::copy_data_to_geometry(), blender::ed::greasepencil::boolean::create_curves_from_segments(), blender::ed::greasepencil::trim::create_curves_from_segments(), blender::create_dashes(), blender::create_envelope_strokes(), blender::bke::curves_copy_curve_selection(), blender::bke::curves_copy_point_selection(), blender::ed::greasepencil::curves_merge_by_distance(), CurvesGeometry(), blender::nodes::node_geo_duplicate_elements_cc::duplicate_curves_CurveGeometry(), blender::nodes::node_geo_duplicate_elements_cc::duplicate_points_CurvesGeometry(), blender::geometry::execute_realize_curve_task(), blender::geometry::execute_realize_curve_tasks(), blender::geometry::extend_curves(), blender::geometry::extract_greasepencil_layer_points(), blender::ed::curves::extrude_curves(), blender::ed::curves::pen_tool::extrude_curves(), blender::ed::greasepencil::extrude_grease_pencil_curves(), blender::geometry::fillet_curves(), blender::geometry::fit_poly_to_bezier_curves(), blender::ed::curves::pen_tool::insert_point_to_curve(), blender::ed::sculpt_paint::greasepencil::interpolate_between_curves(), blender::geometry::join_curves_ranges(), blender::MOD_lineart_gpencil_generate_v3(), blender::ed::space_node::node_draw_zones_and_frames(), blender::geometry::remove_points_and_split(), blender::geometry::reorder_and_flip_curves(), blender::geometry::resample_to_count(), blender::geometry::resample_to_evaluated(), blender::geometry::resample_to_length(), blender::geometry::resample_to_uniform(), blender::ed::curves::resize_curves(), blender::geometry::subdivide_curves(), and blender::geometry::trim_curves().
| CurvesGeometry & blender::bke::CurvesGeometry::operator= | ( | const CurvesGeometry & | other | ) |
Definition at line 156 of file curves_geometry.cc.
References CurvesGeometry().
| CurvesGeometry & blender::bke::CurvesGeometry::operator= | ( | CurvesGeometry && | other | ) |
Definition at line 202 of file curves_geometry.cc.
References CurvesGeometry().
| Array< int > blender::bke::CurvesGeometry::point_to_curve_map | ( | ) | const |
Definition at line 800 of file curves_geometry.cc.
References blender::offset_indices::build_reverse_map(), points_by_curve(), and points_num().
Referenced by blender::nodes::node_geo_duplicate_elements_cc::duplicate_points_CurvesGeometry(), blender::geometry::extract_curves_points(), blender::geometry::extract_greasepencil_layer_points(), and blender::ed::curves::pen_tool::extrude_curves().
|
inline |
The offsets of every curve into arrays on the points domain.
Definition at line 1058 of file BKE_curves.hh.
References blender::CurvesGeometry::curve_num, and blender::CurvesGeometry::curve_offsets.
Referenced by blender::ed::curves::append_point_knots(), bezier_evaluated_offsets_for_curve(), calculate_bezier_auto_handles(), blender::geometry::calculate_result_offsets(), blender::ed::sculpt_paint::CombOperationExecutor::comb_projected(), blender::ed::sculpt_paint::CombOperationExecutor::comb_spherical(), blender::nodes::node_geo_interpolate_curves_cc::compute_point_counts_per_child(), blender::nodes::node_geo_interpolate_curves_cc::compute_points_per_curve_by_group(), blender::ed::greasepencil::compute_topology_change(), blender::geometry::convert_curves_to_bezier(), blender::geometry::convert_curves_to_catmull_rom_or_poly(), blender::geometry::convert_curves_to_nurbs(), blender::nodes::node_geo_duplicate_elements_cc::copy_curve_attributes_without_id(), blender::geometry::copy_or_defaults_for_unselected_curves(), blender::nodes::node_geo_duplicate_elements_cc::copy_stable_id_curves(), blender::ed::greasepencil::boolean::create_curves_from_segments(), blender::create_dashes(), blender::create_envelope_strokes(), blender::ed::greasepencil::boolean::curve_boolean_with_planes(), blender::ed::sculpt_paint::greasepencil::EraseOperationExecutor::curves_intersections_and_points_sides(), blender::ed::greasepencil::curves_merge_by_distance(), blender::ed::greasepencil::curves_merge_endpoints_by_distance(), blender::ed::sculpt_paint::CutOperationExecutor::cut_curves(), blender::deform_drawing(), blender::ed::sculpt_paint::DeleteOperationExecutor::delete_projected(), blender::ed::sculpt_paint::DeleteOperationExecutor::delete_spherical(), blender::ed::sculpt_paint::greasepencil::deselect_stroke(), blender::ed::greasepencil::tests::draw_results(), blender::draw::DRW_curves_batch_cache_create_requested(), evaluated_normals(), evaluated_points_by_curve(), evaluated_positions(), evaluated_tangents(), blender::ed::sculpt_paint::CombOperationExecutor::execute(), blender::ed::sculpt_paint::DeleteOperationExecutor::execute(), blender::ed::greasepencil::execute_carver_on_drawing(), blender::ed::greasepencil::tests::expect_boolean_result_coord(), export_hair_curves(), export_hair_curves_motion(), blender::geometry::extend_curves(), blender::geometry::extract_curves(), blender::geometry::extract_greasepencil_layer_curves(), blender::ed::curves::pen_tool::extrude_curves(), blender::ed::greasepencil::extrude_grease_pencil_curves(), blender::geometry::fill_bezier_data(), blender::geometry::fill_nurbs_data(), blender::geometry::fillet_curves(), blender::ed::sculpt_paint::PuffOperationExecutor::find_curve_weights_projected(), blender::ed::sculpt_paint::PuffOperationExecutor::find_curves_weights_spherical(), blender::ed::sculpt_paint::CutOperationExecutor::find_projected_points_in_stroke(), blender::ed::sculpt_paint::SmoothOperationExecutor::find_projected_smooth_factors(), blender::ed::sculpt_paint::CutOperationExecutor::find_spherical_points_in_stroke(), blender::ed::sculpt_paint::SmoothOperationExecutor::find_spherical_smooth_factors(), blender::io::grease_pencil::GreasePencilExporter::foreach_shape_in_layer(), blender::ed::sculpt_paint::CurvesEffectOperationExecutor::gather_influences_projected(), blender::ed::sculpt_paint::CurvesEffectOperationExecutor::gather_influences_spherical(), blender::ed::greasepencil::get_boundary_bounds(), blender::ed::sculpt_paint::greasepencil::get_single_stroke(), blender::ed::greasepencil::get_visible_boundary_strokes(), blender::ed::sculpt_paint::greasepencil::grease_pencil_interpolate_sequence_exec(), blender::ed::sculpt_paint::greasepencil::grease_pencil_interpolate_update(), hair_topology_matches(), blender::ed::sculpt_paint::greasepencil::EraseOperationExecutor::hard_eraser(), blender::ed::curves::pen_tool::insert_point_to_curve(), blender::ed::sculpt_paint::greasepencil::interpolate_between_curves(), blender::nodes::node_geo_interpolate_curves_cc::interpolate_curve_attributes(), blender::nodes::node_geo_interpolate_curves_cc::interpolate_curve_shapes(), blender::geometry::interpolate_curves(), blender::geometry::interpolate_curves_with_samples(), blender::ed::sculpt_paint::greasepencil::PaintOperation::interpolate_stroke_depth(), interpolate_to_evaluated(), blender::geometry::join_curves_ranges(), nurbs_custom_knots_by_curve(), blender::ed::sculpt_paint::greasepencil::PaintOperation::on_stroke_done(), blender::ed::sculpt_paint::greasepencil::VertexAverageOperation::on_stroke_extended(), blender::ed::sculpt_paint::greasepencil::VertexBlurOperation::on_stroke_extended(), blender::nodes::node_geo_interpolate_curves_cc::parameterize_guide_curves(), blender::ed::sculpt_paint::PinchOperationExecutor::pinch_projected(), blender::ed::sculpt_paint::PinchOperationExecutor::pinch_spherical(), point_to_curve_map(), blender::ed::sculpt_paint::SnakeHookOperatorExecutor::projected_snake_hook(), blender::ed::sculpt_paint::PuffOperationExecutor::puff(), blender::reorder_cyclic_curve_points(), blender::geometry::resample_to_count(), blender::geometry::resample_to_evaluated(), blender::geometry::resample_to_length(), blender::geometry::resample_to_uniform(), blender::geometry::resample_to_uniform(), blender::ed::curves::resize_curves(), blender::geometry::sample_curve_attribute(), blender::geometry::sample_curve_positions_and_handles(), blender::ed::curves::select_linked_pick(), blender::ed::greasepencil::boolean::separate_fill_islands(), blender::ed::sculpt_paint::SlideOperationExecutor::slide(), blender::ed::sculpt_paint::SmoothOperationExecutor::smooth(), blender::ed::sculpt_paint::greasepencil::smooth_stroke(), blender::ed::sculpt_paint::greasepencil::EraseOperationExecutor::soft_eraser(), blender::ed::sculpt_paint::SnakeHookOperatorExecutor::spherical_snake_hook(), blender::ed::sculpt_paint::greasepencil::EraseOperationExecutor::stroke_eraser(), blender::geometry::subdivide_curves(), blender::subdivide_drawing(), blender::ed::curves::tests::TEST_F(), blender::ed::curves::tests::TEST_F(), blender::ed::curves::tests::TEST_F(), blender::ed::curves::tests::TEST_F(), blender::ed::curves::tests::TEST_F(), blender::ed::curves::tests::TEST_F(), blender::geometry::trim_attribute_linear(), blender::geometry::trim_bezier_curves(), blender::geometry::trim_catmull_rom_curves(), blender::ed::greasepencil::trim::trim_curve_segment_ends(), blender::ed::greasepencil::trim::trim_curve_segments(), blender::geometry::trim_curves(), blender::ed::sculpt_paint::greasepencil::trim_end_points(), blender::geometry::trim_evaluated_curves(), blender::geometry::trim_polygonal_curves(), blender::ed::sculpt_paint::greasepencil::view_positions_from_curve_mask(), and blender::bke::write_sharp_bezier_edges().
|
inline |
The total number of control points in all curves.
Definition at line 1001 of file BKE_curves.hh.
References blender::CurvesGeometry::point_num.
Referenced by blender::ed::curves::append_primitive_curve(), blender::bke::build_mesh_positions(), blender::bke::compare_geometry::compare_curves(), blender::create_envelope_strokes(), blender::ed::greasepencil::curves_geometry_is_equal(), blender::ed::sculpt_paint::greasepencil::EraseOperationExecutor::curves_intersections_and_points_sides(), blender::ed::greasepencil::curves_merge_by_distance(), blender::ed::sculpt_paint::CutOperationExecutor::cut_curves(), blender::ed::greasepencil::tests::draw_results(), blender::nodes::node_geo_duplicate_elements_cc::duplicate_points_CurvesGeometry(), blender::duplicate_strokes(), evaluated_points_by_curve(), blender::ed::sculpt_paint::CutOperationExecutor::execute(), blender::ed::sculpt_paint::greasepencil::EraseOperationExecutor::execute(), blender::ed::sculpt_paint::SmoothOperationExecutor::execute(), blender::ed::greasepencil::execute_trim_on_drawing(), blender::ed::greasepencil::tests::expect_boolean_result_coord(), blender::geometry::extend_curves(), blender::ed::curves::pen_tool::extrude_curves(), blender::ed::greasepencil::extrude_grease_pencil_curves(), blender::nodes::node_geo_curve_fillet_cc::fillet_curve(), blender::geometry::fillet_curves(), blender::geometry::fillet_curves_bezier(), blender::geometry::fit_poly_to_bezier_curves(), blender::bke::crazyspace::get_evaluated_curves_deformation(), blender::bke::crazyspace::get_evaluated_grease_pencil_drawing_deformation(), blender::ed::greasepencil::grease_pencil_copy_strokes_exec(), blender::ed::sculpt_paint::greasepencil::grease_pencil_interpolate_sequence_exec(), blender::ed::sculpt_paint::greasepencil::grease_pencil_interpolate_update(), hair_topology_matches(), blender::ed::sculpt_paint::greasepencil::EraseOperationExecutor::hard_eraser(), blender::ed::curves::pen_tool::insert_point_to_curve(), blender::geometry::interpolate_curves(), blender::geometry::interpolate_curves_with_samples(), blender::geometry::join_curves_ranges(), blender::modify_curves(), blender::ed::sculpt_paint::greasepencil::TintOperation::on_stroke_begin(), point_to_curve_map(), points_range(), blender::bke::remember_deformed_grease_pencil_if_necessary(), blender::geometry::reorder_curves_geometry(), blender::reorder_cyclic_curve_points(), blender::geometry::resample_to_uniform(), resize(), blender::ed::greasepencil::select_random_exec(), blender::ed::greasepencil::boolean::separate_fill_islands(), blender::ed::sculpt_paint::greasepencil::simplify_stroke(), blender::ed::sculpt_paint::greasepencil::EraseOperationExecutor::soft_eraser(), blender::geometry::subdivide_curves(), blender::nodes::node_geo_curve_subdivide_cc::subdivide_curves(), blender::subdivide_drawing(), blender::nodes::node_geo_curve_subdivide_cc::subdivide_grease_pencil_curves(), blender::geometry::tests::TEST_F(), blender::geometry::tests::TEST_F(), blender::geometry::tests::TEST_F(), blender::geometry::tests::TEST_F(), blender::geometry::tests::TEST_F(), blender::geometry::tests::TEST_F(), blender::geometry::tests::TEST_F(), blender::geometry::tests::TEST_F(), and blender::geometry::transform_grease_pencil_edit_hints().
|
inline |
Definition at line 1019 of file BKE_curves.hh.
References blender::IndexRange::IndexRange(), and points_num().
Referenced by blender::create_envelope_strokes(), blender::ed::sculpt_paint::greasepencil::EraseOperationExecutor::curves_intersections_and_points_sides(), blender::ed::greasepencil::tests::draw_results(), blender::ed::sculpt_paint::greasepencil::EraseOperationExecutor::execute(), blender::ed::greasepencil::execute_trim_on_drawing(), blender::ed::greasepencil::tests::expect_boolean_result_coord(), blender::ed::sculpt_paint::greasepencil::TintOperation::on_stroke_begin(), blender::ed::sculpt_paint::greasepencil::SmoothOperation::on_stroke_extended(), blender::ed::sculpt_paint::SelectionPaintOperationExecutor::paint_point_selection_projected(), remove_points(), blender::ed::greasepencil::retrieve_visible_points(), blender::ed::greasepencil::boolean::separate_fill_islands(), blender::ed::sculpt_paint::set_fill_attributes(), and blender::ed::sculpt_paint::greasepencil::EraseOperationExecutor::soft_eraser().
Definition at line 366 of file curves_geometry.cc.
References blender::bke::ATTR_POSITION, blender::CurvesGeometry::attribute_storage, blender::bke::get_span_attribute(), and blender::bke::Point.
Referenced by bounds_min_max(), calculate_bezier_aligned_handles(), calculate_bezier_auto_handles(), blender::geometry::convert_curves_to_bezier(), blender::geometry::convert_curves_to_catmull_rom_or_poly(), blender::geometry::convert_curves_to_nurbs(), blender::geometry::copy_or_defaults_for_unselected_curves(), blender::ed::greasepencil::create_curves_outline(), blender::ed::greasepencil::curves_merge_endpoints_by_distance(), blender::ed::sculpt_paint::CutOperationExecutor::cut_curves(), blender::ed::greasepencil::tests::draw_results(), blender::ed::sculpt_paint::AddOperationExecutor::ensure_curve_roots_kdtree(), evaluated_positions(), evaluated_tangents(), blender::ed::sculpt_paint::AddOperationExecutor::execute(), blender::ed::sculpt_paint::SlideOperationExecutor::execute(), blender::ed::greasepencil::tests::expect_boolean_result_coord(), export_hair_curves(), export_hair_curves_motion(), blender::ed::curves::pen_tool::extrude_curves(), blender::geometry::fillet_curves(), blender::geometry::fit_poly_to_bezier_curves(), blender::io::grease_pencil::GreasePencilExporter::foreach_shape_in_layer(), blender::bke::crazyspace::get_evaluated_curves_deformation(), blender::bke::crazyspace::get_evaluated_grease_pencil_drawing_deformation(), blender::ed::curves::pen_tool::insert_point_to_curve(), blender::ed::sculpt_paint::greasepencil::interpolate_between_curves(), blender::nodes::node_geo_interpolate_curves_cc::interpolate_curve_shapes(), blender::ed::sculpt_paint::greasepencil::outline_stroke(), blender::ed::sculpt_paint::DensityAddOperationExecutor::prepare_curve_roots_kdtrees(), blender::io::obj::OBJCurvesTest::run_nurbs_test(), blender::geometry::sample_curve_positions_and_handles(), blender::ed::greasepencil::boolean::separate_fill_islands(), blender::ed::sculpt_paint::set_fill_attributes(), blender::geometry::subdivide_curves(), blender::subdivide_drawing(), blender::bke::tests::TEST_F(), blender::ed::curves::tests::TEST_F(), blender::ed::curves::tests::TEST_F(), blender::ed::curves::tests::TEST_F(), blender::ed::curves::tests::TEST_F(), blender::ed::curves::tests::TEST_F(), blender::ed::curves::tests::TEST_F(), blender::ed::greasepencil::tests::TEST_F(), blender::ed::greasepencil::tests::TEST_F(), blender::ed::greasepencil::tests::TEST_F(), blender::ed::greasepencil::tests::TEST_F(), blender::ed::greasepencil::tests::TEST_F(), blender::ed::greasepencil::tests::TEST_F(), blender::ed::greasepencil::tests::TEST_F(), blender::ed::greasepencil::tests::TEST_F(), blender::ed::greasepencil::tests::TEST_F(), blender::ed::greasepencil::tests::TEST_F(), blender::ed::greasepencil::tests::TEST_F(), blender::ed::greasepencil::tests::TEST_F(), blender::ed::greasepencil::tests::TEST_F(), blender::geometry::trim_bezier_curves(), blender::geometry::trim_catmull_rom_curves(), and blender::geometry::trim_polygonal_curves().
| MutableSpan< float3 > blender::bke::CurvesGeometry::positions_for_write | ( | ) |
Definition at line 371 of file curves_geometry.cc.
References blender::bke::ATTR_POSITION, blender::CurvesGeometry::attribute_storage, blender::bke::get_mutable_attribute(), and blender::bke::Point.
Referenced by blender::ed::sculpt_paint::CombOperationExecutor::comb_projected(), blender::ed::sculpt_paint::CombOperationExecutor::comb_spherical(), blender::geometry::convert_curves_to_bezier(), blender::geometry::convert_curves_to_catmull_rom_or_poly(), blender::geometry::convert_curves_to_nurbs(), blender::ed::object::convert_grease_pencil_to_mesh(), blender::geometry::copy_or_defaults_for_unselected_curves(), blender::ed::greasepencil::boolean::curve_boolean_with_planes(), blender::deform_drawing(), blender::ed::sculpt_paint::CurvesEffectOperationExecutor::execute(), blender::geometry::execute_realize_curve_task(), blender::geometry::extend_curves(), blender::ed::curves::pen_tool::extrude_curves(), blender::geometry::fillet_curves(), blender::geometry::fit_poly_to_bezier_curves(), blender::ed::sculpt_paint::greasepencil::grease_pencil_interpolate_sequence_exec(), blender::ed::sculpt_paint::greasepencil::grease_pencil_interpolate_update(), blender::ed::curves::pen_tool::insert_point_to_curve(), blender::nodes::node_geo_interpolate_curves_cc::interpolate_curve_shapes(), blender::geometry::interpolate_curves_with_samples(), blender::ed::sculpt_paint::greasepencil::PaintOperation::interpolate_stroke_depth(), blender::MOD_lineart_gpencil_generate_v3(), blender::ed::space_node::node_draw_zones_and_frames(), blender::ed::sculpt_paint::greasepencil::outline_stroke(), blender::ed::sculpt_paint::PinchOperationExecutor::pinch_projected(), blender::ed::sculpt_paint::PinchOperationExecutor::pinch_spherical(), blender::ed::sculpt_paint::SnakeHookOperatorExecutor::projected_snake_hook(), blender::ed::sculpt_paint::PuffOperationExecutor::puff(), blender::geometry::resample_to_evaluated(), blender::geometry::resample_to_uniform(), blender::ed::sculpt_paint::SlideOperationExecutor::slide(), blender::ed::sculpt_paint::SmoothOperationExecutor::smooth(), blender::ed::sculpt_paint::SnakeHookOperatorExecutor::spherical_snake_hook(), blender::geometry::subdivide_curves(), blender::subdivide_drawing(), transform(), translate(), blender::geometry::trim_bezier_curves(), blender::geometry::trim_catmull_rom_curves(), blender::geometry::trim_evaluated_curves(), and blender::geometry::trim_polygonal_curves().
Definition at line 377 of file curves_geometry.cc.
References blender::bke::ATTR_RADIUS, blender::CurvesGeometry::attribute_storage, blender::bke::get_varray_attribute(), and blender::bke::Point.
Referenced by bounds_min_max().
| MutableSpan< float > blender::bke::CurvesGeometry::radius_for_write | ( | ) |
Definition at line 382 of file curves_geometry.cc.
References blender::bke::ATTR_RADIUS, blender::CurvesGeometry::attribute_storage, blender::bke::get_mutable_attribute(), and blender::bke::Point.
Referenced by blender::ed::curves::pen_tool::extrude_curves().
| void blender::bke::CurvesGeometry::remove_attributes_based_on_types | ( | ) |
Remove any attributes that are unused based on the types in the curves.
Definition at line 1807 of file curves_geometry.cc.
References blender::bke::ATTR_HANDLE_POSITION_LEFT, blender::bke::ATTR_HANDLE_POSITION_RIGHT, blender::bke::ATTR_HANDLE_TYPE_LEFT, blender::bke::ATTR_HANDLE_TYPE_RIGHT, blender::bke::ATTR_NURBS_KNOTS_MODE, blender::bke::ATTR_NURBS_ORDER, blender::bke::ATTR_NURBS_WEIGHT, blender::bke::ATTR_RESOLUTION, attributes(), attributes_for_write(), blender::CURVE_TYPE_BEZIER, blender::CURVE_TYPE_CATMULL_ROM, blender::CURVE_TYPE_NURBS, has_curve_with_type(), and blender::bke::MutableAttributeAccessor::remove().
Referenced by blender::geometry::convert_curves_trivial(), blender::bke::curves_copy_curve_selection(), blender::geometry::remove_points_and_split(), and blender::geometry::trim_curves().
| void blender::bke::CurvesGeometry::remove_curves | ( | const IndexMask & | curves_to_delete, |
| const AttributeFilter & | attribute_filter ) |
Definition at line 1679 of file curves_geometry.cc.
References blender::index_mask::IndexMask::complement(), blender::bke::curves_copy_curve_selection(), curves_range(), blender::index_mask::IndexMask::is_empty(), resize(), blender::index_mask::IndexMask::size(), and update_curve_types().
Referenced by blender::ed::greasepencil::grease_pencil_join_fills_exec(), blender::ed::greasepencil::grease_pencil_move_to_layer_exec(), blender::ed::greasepencil::grease_pencil_outline_exec(), blender::ed::greasepencil::grease_pencil_separate_layer(), blender::ed::greasepencil::grease_pencil_separate_material(), blender::ed::sculpt_paint::greasepencil::outline_stroke(), and blender::ed::sculpt_paint::greasepencil::trim_stroke_ends().
| void blender::bke::CurvesGeometry::remove_points | ( | const IndexMask & | points_to_delete, |
| const AttributeFilter & | attribute_filter ) |
Definition at line 1599 of file curves_geometry.cc.
References blender::index_mask::IndexMask::complement(), blender::bke::curves_copy_point_selection(), blender::index_mask::IndexMask::is_empty(), points_range(), resize(), blender::index_mask::IndexMask::size(), and update_curve_types().
Referenced by blender::ed::greasepencil::grease_pencil_stroke_simplify_exec(), blender::simplify_drawing(), and blender::ed::sculpt_paint::greasepencil::simplify_stroke().
| void blender::bke::CurvesGeometry::resize | ( | int | points_num, |
| int | curves_num ) |
Change the number of curves and/or points.
Definition at line 1266 of file curves_geometry.cc.
References blender::CurvesGeometry::attribute_storage, blender::BLI_assert(), blender::bke::Curve, blender::CurvesGeometry::curve_num, blender::CurvesGeometry::curve_offsets, blender::bke::CurvesGeometryRuntime::curve_offsets_sharing_info, curves_num(), blender::CustomData_realloc(), blender::bke::Point, blender::CurvesGeometry::point_data, blender::CurvesGeometry::point_num, points_num(), blender::bke::AttributeStorage::resize(), blender::implicit_sharing::resize_trivial_array(), and tag_topology_changed().
Referenced by blender::ed::greasepencil::compute_topology_change(), blender::geometry::convert_curves_to_bezier(), blender::geometry::convert_curves_to_catmull_rom_or_poly(), blender::geometry::convert_curves_to_nurbs(), blender::bke::curves_copy_curve_selection(), blender::geometry::extend_curves(), blender::geometry::extract_greasepencil_layer_curves(), blender::geometry::extract_greasepencil_layer_points(), blender::ed::curves::extrude_curves(), blender::geometry::fillet_curves(), blender::geometry::fit_poly_to_bezier_curves(), blender::ed::object::mesh_data_to_grease_pencil(), remove_curves(), remove_points(), blender::geometry::resample_to_count(), blender::geometry::resample_to_evaluated(), blender::geometry::resample_to_length(), blender::geometry::resample_to_uniform(), blender::ed::curves::resize_curves(), blender::geometry::subdivide_curves(), blender::ed::greasepencil::tests::TEST_F(), and blender::geometry::trim_curves().
| VArray< int > blender::bke::CurvesGeometry::resolution | ( | ) | const |
How many evaluated points to create for each segment when evaluating Bezier, Catmull Rom, and NURBS curves. On the curve domain. Values must be one or greater.
Definition at line 416 of file curves_geometry.cc.
References blender::bke::ATTR_RESOLUTION, blender::CurvesGeometry::attribute_storage, blender::bke::Curve, and blender::bke::get_varray_attribute().
Referenced by evaluated_normals(), evaluated_positions(), interpolate_to_evaluated(), interpolate_to_evaluated(), and blender::geometry::sample_curve_attribute().
| MutableSpan< int > blender::bke::CurvesGeometry::resolution_for_write | ( | ) |
Mutable access to curve resolution. Call tag_topology_changed after changes.
Definition at line 421 of file curves_geometry.cc.
References blender::bke::ATTR_RESOLUTION, blender::CurvesGeometry::attribute_storage, blender::bke::Curve, and blender::bke::get_mutable_attribute().
| void blender::bke::CurvesGeometry::reverse_curves | ( | const IndexMask & | curves_to_reverse | ) |
Change the direction of selected curves (switch the start and end) without changing their shape.
Definition at line 1740 of file curves_geometry.cc.
References blender::bke::ATTR_HANDLE_POSITION_LEFT, blender::bke::ATTR_HANDLE_POSITION_RIGHT, blender::bke::ATTR_HANDLE_TYPE_LEFT, blender::bke::ATTR_HANDLE_TYPE_RIGHT, attribute, attributes(), attributes_for_write(), blender::bke::AttributeAccessor::contains(), blender::Set< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::contains(), blender::CurvesGeometry::custom_knots, blender::bke::AttributeIter::data_type, blender::bke::AttributeIter::domain, blender::bke::AttributeAccessor::foreach_attribute(), blender::index_mask::IndexMask::foreach_index(), blender::exec_mode::grain_size(), handle_positions_left_for_write(), handle_positions_right_for_write(), handle_types_left_for_write(), handle_types_right_for_write(), blender::MutableSpan< T >::is_empty(), blender::bke::MutableAttributeAccessor::lookup_for_write_span(), blender::bke::AttributeIter::name, nurbs_custom_knots_by_curve(), nurbs_custom_knots_for_write(), nurbs_has_custom_knots(), blender::bke::Point, blender::bke::reverse_custom_knots(), blender::bke::reverse_swap_curve_point_data(), blender::bke::Single, blender::MutableSpan< T >::slice(), blender::bke::AttributeIter::storage_type, blender::bke::String, T, tag_topology_changed(), and blender::bke::attribute_math::to_static_type().
UV coordinate for each curve that encodes where the curve is attached to the surface mesh.
Definition at line 555 of file curves_geometry.cc.
References blender::bke::ATTR_SURFACE_UV_COORDINATE, blender::CurvesGeometry::attribute_storage, blender::bke::Curve, and blender::bke::get_span_attribute().
Referenced by blender::ed::sculpt_paint::SlideOperationExecutor::execute(), and blender::ed::sculpt_paint::SlideOperationExecutor::find_curves_to_slide().
| MutableSpan< float2 > blender::bke::CurvesGeometry::surface_uv_coords_for_write | ( | ) |
Definition at line 563 of file curves_geometry.cc.
References blender::bke::ATTR_SURFACE_UV_COORDINATE, blender::CurvesGeometry::attribute_storage, blender::bke::Curve, and blender::bke::get_mutable_attribute().
Referenced by blender::ed::sculpt_paint::SlideOperationExecutor::slide().
| void blender::bke::CurvesGeometry::tag_material_index_changed | ( | ) |
Call after changing the "material_index" attribute.
Definition at line 1317 of file curves_geometry.cc.
References blender::bke::CurvesGeometryRuntime::max_material_index_cache, and blender::SharedCache< T >::tag_dirty().
| void blender::bke::CurvesGeometry::tag_normals_changed | ( | ) |
Call after changing the "tilt" or "up" attributes.
Definition at line 1309 of file curves_geometry.cc.
References blender::bke::CurvesGeometryRuntime::evaluated_normal_cache.
| void blender::bke::CurvesGeometry::tag_positions_changed | ( | ) |
Call after deforming the position attribute.
Definition at line 1290 of file curves_geometry.cc.
References blender::bke::CurvesGeometryRuntime::bounds_cache, blender::bke::CurvesGeometryRuntime::bounds_with_radius_cache, blender::bke::CurvesGeometryRuntime::evaluated_length_cache, blender::bke::CurvesGeometryRuntime::evaluated_normal_cache, blender::bke::CurvesGeometryRuntime::evaluated_position_cache, and blender::bke::CurvesGeometryRuntime::evaluated_tangent_cache.
Referenced by blender::ed::sculpt_paint::CombOperationExecutor::execute(), blender::ed::sculpt_paint::CurvesEffectOperationExecutor::execute(), blender::ed::sculpt_paint::PinchOperationExecutor::execute(), blender::ed::sculpt_paint::PuffOperationExecutor::execute(), blender::ed::sculpt_paint::SlideOperationExecutor::execute(), blender::ed::sculpt_paint::SmoothOperationExecutor::execute(), blender::ed::sculpt_paint::SnakeHookOperatorExecutor::execute(), blender::ed::sculpt_paint::greasepencil::grease_pencil_interpolate_sequence_exec(), blender::ed::sculpt_paint::greasepencil::grease_pencil_interpolate_update(), blender::bke::greasepencil::Drawing::tag_positions_changed(), blender::bke::greasepencil::Drawing::tag_positions_changed(), tag_topology_changed(), blender::bke::greasepencil::Drawing::tag_topology_changed(), transform(), and translate().
| void blender::bke::CurvesGeometry::tag_radii_changed | ( | ) |
Call when making manual changes to the "radius" attribute. The attribute API will also call this in #finish() calls.
Definition at line 1313 of file curves_geometry.cc.
References blender::bke::CurvesGeometryRuntime::bounds_with_radius_cache.
| void blender::bke::CurvesGeometry::tag_topology_changed | ( | ) |
Call after any operation that changes the topology (number of points, evaluated points, or the total count).
Definition at line 1299 of file curves_geometry.cc.
References blender::bke::CurvesGeometryRuntime::check_type_counts, blender::bke::CurvesGeometryRuntime::custom_knot_offsets_cache, blender::bke::CurvesGeometryRuntime::evaluated_offsets_cache, blender::bke::CurvesGeometryRuntime::has_cyclic_curve_cache, blender::bke::CurvesGeometryRuntime::max_material_index_cache, blender::bke::CurvesGeometryRuntime::nurbs_basis_cache, blender::SharedCache< T >::tag_dirty(), and tag_positions_changed().
Referenced by blender::ed::curves::append_primitive_curve(), blender::geometry::copy_and_reorder_curves(), fill_curve_types(), fill_curve_types(), blender::geometry::interpolate_curves_with_samples(), blender::geometry::join_curves_ranges(), blender::geometry::reorder_and_flip_curves(), resize(), reverse_curves(), blender::bke::greasepencil::Drawing::tag_topology_changed(), and blender::geometry::trim_curves().
The angle used to rotate evaluated normals around the tangents after their calculation. Call tag_normals_changed after changes.
Definition at line 438 of file curves_geometry.cc.
References blender::bke::ATTR_TILT, blender::CurvesGeometry::attribute_storage, blender::bke::get_varray_attribute(), and blender::bke::Point.
Referenced by evaluated_normals().
| MutableSpan< float > blender::bke::CurvesGeometry::tilt_for_write | ( | ) |
Definition at line 443 of file curves_geometry.cc.
References blender::bke::ATTR_TILT, blender::CurvesGeometry::attribute_storage, blender::bke::get_mutable_attribute(), and blender::bke::Point.
| void blender::bke::CurvesGeometry::transform | ( | const float4x4 & | matrix | ) |
Definition at line 1416 of file curves_geometry.cc.
References attributes(), attributes_for_write(), handle_positions_left(), handle_positions_left_for_write(), handle_positions_right(), handle_positions_right_for_write(), positions_for_write(), tag_positions_changed(), blender::bke::transform_custom_normal_attribute(), and blender::math::transform_points().
Referenced by blender::ed::greasepencil::join_curves(), and blender::geometry::join_curves().
| void blender::bke::CurvesGeometry::translate | ( | const float3 & | translation | ) |
Definition at line 1389 of file curves_geometry.cc.
References blender::bke::CurvesGeometryRuntime::bounds_cache, handle_positions_left(), handle_positions_left_for_write(), handle_positions_right(), handle_positions_right_for_write(), blender::math::is_zero(), positions_for_write(), tag_positions_changed(), and blender::bke::translate_positions().
Referenced by blender::io::grease_pencil::shift_to_bounds_center().
| void blender::bke::CurvesGeometry::update_curve_types | ( | ) |
Update the cached count of curves of each type, necessary after curve_types_for_write.
Definition at line 361 of file curves_geometry.cc.
References blender::bke::calculate_type_counts(), curve_types(), blender::CurvesGeometry::runtime, blender::bke::CurvesGeometryRuntime::type_counts, and update_curve_types().
Referenced by blend_read(), blender::build_concurrent(), blender::build_sequential(), blender::ed::curves::copy_data_to_geometry(), blender::create_dashes(), blender::create_envelope_strokes(), blender::nodes::node_geo_duplicate_elements_cc::duplicate_curves_CurveGeometry(), blender::geometry::extract_greasepencil_layer_curves(), blender::geometry::extract_greasepencil_layer_points(), blender::ed::curves::pen_tool::extrude_curves(), blender::ed::greasepencil::extrude_grease_pencil_curves(), fill_curve_types(), blender::ed::curves::pen_tool::insert_point_to_curve(), blender::geometry::interpolate_curves_with_samples(), remove_curves(), remove_points(), blender::geometry::remove_points_and_split(), blender::ed::curves::resize_curves(), blender::ed::greasepencil::tests::TEST_F(), and update_curve_types().