|
Blender V4.5
|
#include <BKE_curves.hh>
Inherits 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 |
| 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 CurvesGeometry | |
| int * | curve_offsets |
| struct AttributeStorage | attribute_storage |
| CustomData | point_data |
| CustomData | curve_data |
| int | point_num |
| int | curve_num |
| ListBase | vertex_group_names |
| int | vertex_group_active_index |
| int | attributes_active_index |
| CurvesGeometryRuntimeHandle * | runtime |
| float * | custom_knots |
| int | custom_knot_num |
| 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 152 of file BKE_curves.hh.
| CurvesGeometry::CurvesGeometry | ( | ) |
Definition at line 62 of file curves_geometry.cc.
References CurvesGeometry().
Referenced by CurvesGeometry(), CurvesGeometry(), CurvesGeometry(), operator=(), and operator=().
| 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 64 of file curves_geometry.cc.
References blender::bke::MutableAttributeAccessor::add(), CurvesGeometry::attribute_storage, attributes_for_write(), BLI_listbase_clear(), CurvesGeometry::curve_data, CurvesGeometry::curve_num, CurvesGeometry::curve_offsets, CURVE_TYPE_CATMULL_ROM, CurvesGeometry::custom_knot_num, CurvesGeometry::custom_knots, CustomData_reset(), MutableSpan< T >::fill(), blender::implicit_sharing::info_for_mem_free(), MEM_malloc_arrayN(), offsets_for_write(), blender::bke::Point, CurvesGeometry::point_data, CurvesGeometry::point_num, CurvesGeometry::runtime, and CurvesGeometry::vertex_group_names.
| CurvesGeometry::CurvesGeometry | ( | const CurvesGeometry & | other | ) |
Definition at line 100 of file curves_geometry.cc.
References CurvesGeometry::attribute_storage, CurvesGeometry::attributes_active_index, BKE_defgroup_copy_list(), CD_MASK_ALL, CurvesGeometry::curve_data, CurvesGeometry::curve_num, CurvesGeometry::curve_offsets, CurvesGeometry(), CurvesGeometry::custom_knot_num, CurvesGeometry::custom_knots, CustomData_init_from(), CurvesGeometry::point_data, CurvesGeometry::point_num, CurvesGeometry::runtime, this, CurvesGeometry::vertex_group_active_index, and CurvesGeometry::vertex_group_names.
| CurvesGeometry::CurvesGeometry | ( | CurvesGeometry && | other | ) |
Definition at line 160 of file curves_geometry.cc.
References CurvesGeometry::attribute_storage, CurvesGeometry::attributes_active_index, BLI_listbase_clear(), CurvesGeometry::curve_data, CurvesGeometry::curve_num, CurvesGeometry::curve_offsets, CurvesGeometry(), CurvesGeometry::custom_knot_num, CurvesGeometry::custom_knots, CustomData_reset(), CurvesGeometry::point_data, CurvesGeometry::point_num, CurvesGeometry::runtime, CurvesGeometry::vertex_group_active_index, and CurvesGeometry::vertex_group_names.
| CurvesGeometry::~CurvesGeometry | ( | ) |
Definition at line 209 of file curves_geometry.cc.
References CurvesGeometry::attribute_storage, BLI_freelistN(), CurvesGeometry::curve_data, CurvesGeometry::curve_offsets, CurvesGeometry::custom_knots, CustomData_free(), blender::implicit_sharing::free_shared_data(), CurvesGeometry::point_data, CurvesGeometry::runtime, and CurvesGeometry::vertex_group_names.
Referenced by blender::bke::greasepencil::Drawing::~Drawing().
| GVArray CurvesGeometry::adapt_domain | ( | const GVArray & | varray, |
| AttrDomain | from, | ||
| AttrDomain | to ) const |
Definition at line 1815 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::ForSingle(), blender::GVArrayCommon::get_internal_single(), blender::GVArrayCommon::is_empty(), blender::GVArrayCommon::is_single(), blender::bke::Point, this, and blender::GVArrayCommon::type().
Referenced by adapt_domain(), blender::nodes::node_geo_input_spline_length_cc::construct_curve_point_count_gvarray(), and blender::nodes::node_geo_input_tangent_cc::construct_curve_tangent_gvarray().
|
inline |
Definition at line 486 of file BKE_curves.hh.
References adapt_domain(), T, and blender::GVArray::typed().
| AttributeAccessor CurvesGeometry::attributes | ( | ) | const |
Definition at line 1845 of file curves_geometry.cc.
References 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(), BKE_grease_pencil_material_index_used(), blender::build_concurrent(), blender::bke::build_mesh_positions(), blender::ed::spreadsheet::GreasePencilLayerCurvesDomainViewItem::build_row(), blender::build_sequential(), 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::nodes::node_geo_duplicate_elements_cc::copy_stable_id_curves(), blender::ed::greasepencil::create_curves_outline(), blender::create_dashes(), blender::draw::create_edit_points_data(), blender::create_envelope_strokes(), blender::draw::curve_create_attribute(), blender::bke::curve_to_mesh_sweep(), blender::ed::greasepencil::curves_geometry_is_equal(), blender::ed::greasepencil::curves_merge_endpoints_by_distance(), blender::draw::curves_sub_pass_setup_implementation(), blender::nodes::node_geo_curve_to_points_cc::curves_to_points(), blender::deform_drawing_as_envelope(), blender::draw::DRW_curves_batch_cache_create_requested(), blender::nodes::node_geo_duplicate_elements_cc::duplicate_points_CurvesGeometry(), blender::draw::ensure_control_point_attribute(), evaluated_normals(), 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::greasepencil::extrude_grease_pencil_curves(), blender::geometry::fillet_curves(), blender::io::grease_pencil::GreasePencilExporter::foreach_stroke_in_layer(), 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::get_build_factor(), blender::get_factor_from_draw_speed(), blender::modifier::greasepencil::get_filtered_stroke_mask(), blender::modifier::greasepencil::get_influence_vertex_weights(), blender::ed::sculpt_paint::greasepencil::get_single_stroke(), blender::bke::AttributeExistsFieldInput::get_varray_for_context(), blender::nodes::node_geo_input_curve_handles_cc::HandlePositionFieldInput::get_varray_for_context(), blender::nodes::node_geo_material_selection_cc::MaterialSelectionFieldInput::get_varray_for_context(), blender::ed::greasepencil::get_visible_boundary_strokes(), blender::ed::sculpt_paint::grease_pencil_apply_fill(), blender::ed::greasepencil::grease_pencil_copy_strokes_exec(), blender::ed::sculpt_paint::greasepencil::EraseOperationExecutor::hard_eraser(), blender::geometry::initialize_curves_builtin_attribute_defaults(), blender::nodes::node_geo_interpolate_curves_cc::interpolate_curve_attributes(), blender::geometry::join_curves_ranges(), material_index_max(), blender::modify_curves(), blender::modify_fill_color(), blender::modify_stroke_color(), blender::modify_stroke_color(), blender::nodes::node_geo_curve_set_handle_type_cc::node_geo_exec(), 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_set_curve_handles_cc::node_geo_exec(), blender::nodes::node_geo_set_grease_pencil_color_cc::node_geo_exec(), blender::draw::overlay::AttributeTexts::object_sync(), blender::ed::sculpt_paint::greasepencil::EraseOperation::on_stroke_done(), blender::geometry::preprocess_curves(), remove_attributes_based_on_types(), blender::geometry::remove_points_and_split(), 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::curves::set_attribute_exec(), blender::ed::sculpt_paint::greasepencil::EraseOperationExecutor::soft_eraser(), stats_object_edit(), blender::ed::sculpt_paint::greasepencil::EraseOperationExecutor::stroke_eraser(), blender::geometry::subdivide_curves(), blender::geometry::tests::TEST(), blender::geometry::tests::TEST(), blender::geometry::tests::TEST(), blender::geometry::tests::TEST(), blender::geometry::tests::TEST(), blender::geometry::tests::TEST(), blender::geometry::tests::TEST(), transform(), blender::geometry::trim_curves(), view3d_lasso_select(), and blender::io::hydra::CurvesData::write_curves().
| MutableAttributeAccessor CurvesGeometry::attributes_for_write | ( | ) |
Definition at line 1850 of file curves_geometry.cc.
References blender::bke::curves::get_attribute_accessor_functions().
Referenced by blender::ed::greasepencil::apply_eval_grease_pencil_data(), blender::nodes::ForeachElementComponent::attributes_for_write(), BKE_grease_pencil_material_index_remove(), BKE_grease_pencil_material_remap(), blender::build_concurrent(), blender::build_sequential(), blender::geometry::calc_radius_with_interpolation(), blender::ed::greasepencil::clipboard_paste_strokes_ex(), 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::nodes::node_geo_duplicate_elements_cc::copy_stable_id_curves(), blender::create_array_copies(), blender::geometry::create_curve_from_vert_indices(), blender::create_dashes(), blender::create_envelope_strokes(), blender::nodes::node_geo_points_to_curves_cc::curve_from_points(), blender::nodes::node_geo_curves_to_grease_pencil_cc::curve_instances_to_grease_pencil_layers(), blender::bke::curves_copy_curve_selection(), blender::nodes::node_geo_points_to_curves_cc::curves_from_points(), CurvesGeometry(), blender::deform_drawing(), blender::deform_drawing(), 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_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::greasepencil::extrude_grease_pencil_curves(), fill_curve_types(), blender::geometry::fillet_curves(), blender::geometry::gather_point_attributes_to_interpolate(), blender::generate_curves(), blender::bke::get_attribute_accessor_for_write(), blender::ed::sculpt_paint::greasepencil::get_single_stroke(), blender::ed::sculpt_paint::grease_pencil_apply_fill(), blender::nodes::node_geo_interpolate_curves_cc::interpolate_curve_attributes(), blender::geometry::join_curves_ranges(), blender::ed::object::mesh_data_to_grease_pencil(), blender::geometry::mesh_faces_to_curves_convert(), MOD_lineart_gpencil_generate_v3(), blender::modify_fill_color(), blender::modify_fill_color(), blender::modify_opacity(), blender::modify_softness(), blender::modify_stroke_by_index(), blender::modify_stroke_by_layer(), blender::modify_stroke_by_material(), blender::modify_stroke_color(), blender::modify_stroke_random(), blender::nodes::node_geo_set_grease_pencil_color_cc::node_geo_exec(), blender::nodes::node_geo_set_grease_pencil_softness_cc::node_geo_exec(), blender::ed::sculpt_paint::greasepencil::EraseOperation::on_stroke_done(), blender::ed::sculpt_paint::greasepencil::PaintOperation::on_stroke_done(), blender::bke::bake::GeometryBakeItem::prepare_geometry_for_bake(), blender::io::usd::USDCurvesReader::read_custom_data(), blender::io::usd::USDCurvesReader::read_velocities(), 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::curves::separate_points(), blender::nodes::node_geo_set_spline_cyclic_cc::set_curve_cyclic(), blender::nodes::node_geo_set_curve_normal_cc::set_curve_normal(), blender::nodes::node_geo_set_spline_resolution_cc::set_curve_resolution(), blender::nodes::node_geo_set_curve_tilt_cc::set_curve_tilt(), blender::nodes::node_geo_set_position_cc::set_curves_position(), blender::nodes::node_geo_set_material_index_cc::set_material_index_in_grease_pencil(), blender::nodes::node_geo_set_curve_radius_cc::set_radius(), blender::io::grease_pencil::shape_attributes_to_curves(), blender::geometry::smooth_curve_positions(), blender::ed::sculpt_paint::greasepencil::EraseOperationExecutor::soft_eraser(), blender::nodes::node_geo_interpolate_curves_cc::store_output_attributes(), blender::geometry::subdivide_curves(), transform(), blender::geometry::trim_curves(), blender::write_stroke_transforms(), and blender::write_weights_for_drawing().
|
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 1033 of file BKE_curves.hh.
References offsets(), blender::bke::curves::per_curve_point_offsets_range(), points_by_curve(), and CurvesGeometry::runtime.
Referenced by blender::geometry::lookup_point_bezier(), and blender::bke::write_sharp_bezier_edges().
| void CurvesGeometry::blend_read | ( | BlendDataReader & | reader | ) |
Definition at line 1861 of file curves_geometry.cc.
References CurvesGeometry::attribute_storage, BLO_read_float_array(), BLO_read_int32_array(), BLO_read_shared(), BLO_read_struct_list, CurvesGeometry::curve_data, CurvesGeometry::curve_num, CurvesGeometry::curve_offsets, blender::bke::CurvesGeometryRuntime::curve_offsets_sharing_info, blender::bke::curves_convert_storage_to_customdata(), CurvesGeometry::custom_knot_num, blender::bke::CurvesGeometryRuntime::custom_knots_sharing_info, CustomData_blend_read(), blender::implicit_sharing::info_for_mem_free(), CurvesGeometry::point_data, CurvesGeometry::point_num, update_curve_types(), and CurvesGeometry::vertex_group_names.
| void CurvesGeometry::blend_write | ( | BlendWriter & | writer, |
| ID & | id, | ||
| const BlendWriteData & | write_data ) |
Definition at line 1928 of file curves_geometry.cc.
References CurvesGeometry::attribute_storage, BKE_defbase_blend_write(), BLO_write_shared(), CD_MASK_ALL, CurvesGeometry::curve_data, CurvesGeometry::curve_num, CurvesGeometry::curve_offsets, blender::bke::CurvesGeometryRuntime::curve_offsets_sharing_info, CurvesGeometry::custom_knot_num, blender::bke::CurvesGeometryRuntime::custom_knots_sharing_info, CustomData_blend_write(), CurvesGeometry::point_data, this, and CurvesGeometry::vertex_group_names.
| void CurvesGeometry::blend_write_prepare | ( | BlendWriteData & | write_data | ) |
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 1902 of file curves_geometry.cc.
References CurvesGeometry::attribute_storage, and blender::bke::attribute_storage_blend_write_prepare().
The largest and smallest position values of evaluated points.
Definition at line 1316 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, 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::usd::USDCurvesWriter::do_write(), blender::io::grease_pencil::shift_to_bounds_center(), blender::bke::tests::TEST(), and blender::bke::tests::TEST().
| void CurvesGeometry::calculate_bezier_auto_handles | ( | ) |
Definition at line 1243 of file curves_geometry.cc.
References blender::bke::curves::bezier::calculate_auto_handles(), 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(), is_empty(), blender::threading::parallel_for(), points_by_curve(), positions(), blender::MutableSpan< T >::slice(), blender::Span< T >::slice(), and types.
Referenced by blender::geometry::convert_curves_to_bezier(), ED_transverts_update_obedit(), blender::nodes::node_geo_set_position_cc::set_curves_position(), and blender::nodes::node_geo_curve_set_handle_type_cc::set_handle_type().
| void CurvesGeometry::count_memory | ( | MemoryCounter & | memory | ) | const |
Definition at line 1363 of file curves_geometry.cc.
References blender::memory_counter::MemoryCounter::add_shared(), CurvesGeometry::curve_data, CurvesGeometry::curve_num, blender::bke::CurvesGeometryRuntime::curve_offsets_sharing_info, blender::bke::CurvesGeometryRuntime::custom_knots_sharing_info, CustomData_count_memory(), CurvesGeometry::point_data, CurvesGeometry::point_num, and this.
|
inline |
Return the number of curves with each type.
Definition at line 1007 of file BKE_curves.hh.
References BLI_assert, blender::bke::calculate_type_counts(), curve_types(), and CurvesGeometry::runtime.
Referenced by blender::geometry::convert_curves_to_bezier(), blender::geometry::convert_curves_to_catmull_rom_or_poly(), blender::geometry::convert_curves_to_nurbs(), blender::io::alembic::ABCCurveWriter::do_write(), blender::io::usd::USDCurvesWriter::do_write(), 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().
| VArray< int8_t > CurvesGeometry::curve_types | ( | ) | const |
The type (CurveType) of each curve, or potentially a single if all are the same type.
Definition at line 303 of file curves_geometry.cc.
References blender::bke::ATTR_CURVE_TYPE, blender::bke::Curve, CURVE_TYPE_CATMULL_ROM, and blender::bke::get_varray_attribute().
Referenced by calculate_bezier_auto_handles(), blender::nodes::node_geo_curve_spline_parameter_cc::calculate_point_lengths(), blender::geometry::compute_curve_trim_parameters(), blender::nodes::node_geo_input_tangent_cc::construct_curve_tangent_gvarray(), 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(), blender::nodes::node_geo_input_tangent_cc::curve_tangent_point_domain(), curve_type_counts(), blender::io::alembic::ABCCurveWriter::do_write(), blender::io::usd::USDCurvesWriter::do_write(), blender::draw::DRW_curves_batch_cache_create_requested(), evaluated_normals(), evaluated_positions(), blender::ed::greasepencil::extrude_grease_pencil_curves(), fill_curve_types(), indices_for_curve_type(), interpolate_to_evaluated(), interpolate_to_evaluated(), nurbs_custom_knot_curves(), blender::geometry::resample_to_uniform(), blender::geometry::sample_curve_attribute(), blender::nodes::node_geo_curve_handle_type_selection_cc::select_by_handle_type(), blender::geometry::subdivide_curves(), blender::geometry::trim_curves(), update_curve_types(), and blender::bke::write_sharp_bezier_edges().
| MutableSpan< int8_t > 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 309 of file curves_geometry.cc.
References blender::bke::ATTR_CURVE_TYPE, blender::bke::Curve, and blender::bke::get_mutable_attribute().
Referenced by fill_curve_types(), fill_curve_types(), blender::geometry::fit_poly_to_bezier_curves(), and blender::io::grease_pencil::shape_attributes_to_curves().
|
inline |
The number of curves in the data-block.
Definition at line 968 of file BKE_curves.hh.
References CurvesGeometry::curve_num.
Referenced by blender::nodes::node_geo_curve_spline_parameter_cc::accumulated_lengths_curve_domain(), blender::geometry::add_curves_on_mesh(), blender::ed::curves::append_primitive_curve(), blender::build_drawing(), blender::build_sequential(), blender::draw::calc_final_indices(), blender::nodes::node_geo_curve_spline_parameter_cc::calculate_curve_parameters(), 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::nodes::node_geo_input_spline_length_cc::construct_curve_point_count_gvarray(), 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::geometry::create_curves_for_faces(), blender::create_envelope_strokes(), blender::nodes::node_geo_curve_sample_cc::curve_accumulated_lengths(), blender::draw::curve_eval_render_wire_verts_edges_len_get(), blender::nodes::node_geo_curve_fill_cc::curve_fill_calculate(), blender::bke::curves_copy_curve_selection(), blender::draw::curves_ensure_procedural_data(), 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::draw::curves_sub_pass_setup_implementation(), blender::nodes::node_geo_curves_to_grease_pencil_cc::curves_to_grease_pencil_with_one_layer(), blender::nodes::node_geo_deform_curves_on_surface_cc::deform_curves(), blender::deform_drawing(), blender::nodes::node_geo_curve_fill_cc::do_group_aware_cdt(), blender::io::alembic::ABCCurveWriter::do_write(), blender::io::usd::USDCurvesWriter::do_write(), blender::nodes::node_geo_duplicate_elements_cc::duplicate_curves_CurveGeometry(), blender::duplicate_strokes(), blender::draw::ensure_control_point_attribute(), ensure_evaluated_lengths(), evaluated_points_by_curve(), blender::geometry::execute_realize_curve_task(), blender::geometry::extend_curves(), blender::io::grease_pencil::extend_curves_geometry(), blender::ed::curves::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::geometry::fit_poly_to_bezier_curves(), blender::get_factor_from_draw_speed(), blender::nodes::node_geo_curve_endpoint_selection_cc::EndpointFieldInput::get_varray_for_context(), blender::nodes::node_geo_material_selection_cc::MaterialSelectionFieldInput::get_varray_for_context(), blender::ed::sculpt_paint::grease_pencil_apply_fill(), blender::ed::greasepencil::grease_pencil_copy_strokes_exec(), blender::geometry::interpolate_curves_with_samples(), is_single_type(), blender::modify_drawing(), blender::modify_fill_color(), blender::modify_stroke_by_index(), blender::nodes::node_geo_curve_sample_cc::node_geo_exec(), blender::nodes::node_geo_curve_spline_type_cc::node_geo_exec(), blender::nodes::node_geo_deform_curves_on_surface_cc::node_geo_exec(), blender::nodes::node_geo_interpolate_curves_cc::parameterize_guide_curves(), blender::point_counts_to_keep_concurrent(), blender::points_info_sequential(), blender::geometry::reorder_curves_geometry(), blender::reorder_cyclic_curve_points(), blender::reorder_strokes(), 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::nodes::node_geo_curve_reverse_cc::reverse_curve(), blender::nodes::node_geo_set_curve_normal_cc::set_curve_normal(), blender::simplify_drawing(), stats_object(), blender::ed::sculpt_paint::greasepencil::EraseOperationExecutor::stroke_eraser(), blender::geometry::subdivide_curves(), blender::ed::curves::tests::TEST(), blender::ed::curves::tests::TEST(), blender::ed::curves::tests::TEST(), blender::ed::curves::tests::TEST(), blender::ed::curves::tests::TEST(), blender::ed::curves::tests::TEST(), blender::geometry::tests::TEST(), blender::geometry::tests::TEST(), blender::geometry::tests::TEST(), blender::geometry::tests::TEST(), blender::geometry::tests::TEST(), blender::geometry::tests::TEST(), blender::geometry::tests::TEST(), blender::geometry::tests::TEST(), blender::geometry::trim_curves(), blender::nodes::node_geo_curve_trim_cc::trim_curves(), blender::io::hydra::CurvesData::write_curves(), and blender::write_stroke_transforms().
|
inline |
Definition at line 986 of file BKE_curves.hh.
References curves_num().
Referenced by blender::nodes::node_geo_curve_spline_parameter_cc::accumulated_lengths_curve_domain(), blender::geometry::add_curves_on_mesh(), blender::ed::greasepencil::bake_grease_pencil_animation_exec(), blender::nodes::node_geo_blur_attribute_cc::blur_on_curve_exec(), blender::build_concurrent(), blender::build_sequential(), calculate_bezier_auto_handles(), blender::nodes::node_geo_curve_spline_parameter_cc::calculate_point_lengths(), 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::nodes::node_geo_curve_sample_cc::curve_accumulated_lengths(), blender::draw::curve_create_curves_lines(), blender::draw::curve_eval_render_wire_verts_edges_len_get(), blender::nodes::node_geo_input_tangent_cc::curve_tangent_point_domain(), blender::ed::greasepencil::curves_merge_by_distance(), blender::geometry::curves_merge_endpoints(), blender::ed::greasepencil::curves_merge_endpoints_by_distance(), blender::nodes::node_geo_curves_to_grease_pencil_cc::curves_to_grease_pencil_with_one_layer(), blender::nodes::node_geo_curve_length_cc::curves_total_length(), blender::nodes::node_geo_deform_curves_on_surface_cc::deform_curves(), blender::deform_drawing(), blender::io::alembic::ABCCurveWriter::do_write(), blender::draw::DRW_curves_batch_cache_create_requested(), ensure_evaluated_lengths(), evaluated_normals(), evaluated_positions(), evaluated_tangents(), blender::geometry::execute_realize_curve_task(), blender::io::grease_pencil::SVGExporter::export_grease_pencil_objects(), blender::geometry::extend_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::generate_curves(), blender::get_factor_from_draw_speed(), blender::modifier::greasepencil::get_filtered_stroke_mask(), blender::ed::greasepencil::trim::get_intersections_of_curve_with_curves(), blender::nodes::node_geo_curve_endpoint_selection_cc::EndpointFieldInput::get_varray_for_context(), blender::nodes::node_geo_curve_topology_points_of_curve_cc::PointsOfCurveInput::get_varray_for_context(), 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(), indices_for_curve_type(), 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(), 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::point_counts_to_keep_concurrent(), blender::points_info_sequential(), blender::io::usd::populate_curve_props_for_nurbs(), blender::io::usd::populate_curve_verts(), blender::io::usd::populate_curve_verts_for_bezier(), blender::io::usd::USDBasisCurvesReader::read_curve_sample(), blender::io::alembic::AbcCurveReader::read_curves_sample(), remove_curves(), blender::geometry::remove_points_and_split(), blender::reorder_strokes(), 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::geometry::sample_curve_padded(), blender::nodes::node_geo_curve_handle_type_selection_cc::select_by_handle_type(), 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::trim::trim_curve_segments(), blender::geometry::trim_curves(), and blender::io::hydra::CurvesData::write_curves().
| VArray< bool > CurvesGeometry::cyclic | ( | ) | const |
Whether the curve loops around to connect to itself, on the curve domain.
Definition at line 419 of file curves_geometry.cc.
References blender::bke::ATTR_CYCLIC, blender::bke::Curve, and get_varray_attribute().
Referenced by blender::nodes::node_geo_curve_spline_parameter_cc::accumulated_lengths_curve_domain(), blender::nodes::node_geo_blur_attribute_cc::blur_on_curve_exec(), calculate_bezier_auto_handles(), blender::nodes::node_geo_curve_spline_parameter_cc::calculate_curve_parameters(), blender::nodes::node_geo_curve_spline_parameter_cc::calculate_point_lengths(), blender::nodes::node_geo_curve_sample_cc::SampleCurveFunction::call(), blender::geometry::compute_curve_trim_parameters(), 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_dashes(), blender::nodes::node_geo_curve_sample_cc::curve_accumulated_lengths(), blender::draw::curve_create_curves_lines(), blender::draw::curve_eval_render_wire_verts_edges_len_get(), blender::nodes::node_geo_input_tangent_cc::curve_tangent_point_domain(), blender::ed::sculpt_paint::greasepencil::EraseOperationExecutor::curves_intersections_and_points_sides(), blender::ed::greasepencil::curves_merge_by_distance(), blender::geometry::curves_merge_endpoints(), blender::nodes::node_geo_curve_length_cc::curves_total_length(), blender::deform_drawing(), blender::io::alembic::ABCCurveWriter::do_write(), blender::io::usd::USDCurvesWriter::do_write(), 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::greasepencil::extrude_grease_pencil_curves(), blender::geometry::fillet_curves(), blender::geometry::fit_poly_to_bezier_curves(), blender::io::grease_pencil::GreasePencilExporter::foreach_stroke_in_layer(), blender::ed::greasepencil::trim::get_intersections_of_curve_with_curves(), blender::nodes::node_geo_offset_point_in_curve_cc::ControlPointNeighborFieldInput::get_varray_for_context(), blender::nodes::node_geo_offset_point_in_curve_cc::OffsetValidFieldInput::get_varray_for_context(), 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(), blender::ed::sculpt_paint::greasepencil::interpolate_between_curves(), blender::geometry::interpolate_curves(), blender::modify_drawing(), blender::point_counts_to_keep_concurrent(), blender::geometry::remove_points_and_split(), blender::geometry::resample_to_length(), blender::geometry::resample_to_uniform(), blender::simplify_drawing(), blender::geometry::smooth_curve_positions(), blender::ed::sculpt_paint::greasepencil::EraseOperationExecutor::stroke_eraser(), blender::geometry::subdivide_curves(), blender::subdivide_drawing(), blender::bke::tests::TEST(), blender::ed::curves::tests::TEST(), blender::ed::curves::tests::TEST(), blender::ed::curves::tests::TEST(), blender::geometry::tests::TEST(), blender::geometry::tests::TEST(), blender::geometry::tests::TEST(), blender::geometry::tests::TEST(), blender::geometry::tests::TEST(), blender::geometry::tests::TEST(), blender::geometry::tests::TEST(), blender::geometry::tests::TEST(), blender::geometry::trim_catmull_rom_curves(), blender::ed::greasepencil::trim::trim_curve_segments(), and blender::write_stroke_transforms().
| MutableSpan< bool > CurvesGeometry::cyclic_for_write | ( | ) |
Mutable access to curve cyclic values. Call tag_topology_changed after changes.
Definition at line 423 of file curves_geometry.cc.
References blender::bke::ATTR_CYCLIC, blender::bke::Curve, and get_mutable_attribute().
Referenced by blender::ed::curves::copy_data_to_geometry(), blender::nodes::node_geo_curve_primitive_arc_cc::create_arc_curve_from_points(), blender::nodes::node_geo_curve_primitive_arc_cc::create_arc_curve_from_radius(), blender::geometry::create_curve_from_vert_indices(), blender::geometry::create_curves_for_faces(), blender::nodes::node_geo_curve_primitive_circle_cc::create_point_circle_curve(), blender::nodes::node_geo_curve_primitive_circle_cc::create_radius_circle_curve(), blender::nodes::node_geo_curve_primitive_star_cc::create_star_curve(), blender::geometry::curves_merge_endpoints(), blender::ed::greasepencil::extrude_grease_pencil_curves(), blender::ed::object::mesh_data_to_grease_pencil(), blender::ed::space_node::node_draw_zones_and_frames(), blender::nodes::node_geo_curve_primitive_quadrilateral_cc::node_geo_exec(), blender::io::usd::USDBasisCurvesReader::read_curve_sample(), blender::io::alembic::AbcCurveReader::read_curves_sample(), blender::geometry::remove_points_and_split(), and blender::io::grease_pencil::shape_attributes_to_curves().
| Span< MDeformVert > CurvesGeometry::deform_verts | ( | ) | const |
Vertex group data, encoded as an array of indices and weights for every vertex.
Definition at line 605 of file curves_geometry.cc.
References CD_MDEFORMVERT, CustomData_get_layer(), CurvesGeometry::point_data, and CurvesGeometry::point_num.
Referenced by blender::modify_curves(), and blender::modify_drawing().
| MutableSpan< MDeformVert > CurvesGeometry::deform_verts_for_write | ( | ) |
Definition at line 615 of file curves_geometry.cc.
References CD_MDEFORMVERT, CD_SET_DEFAULT, CustomData_add_layer(), CustomData_get_layer_for_write(), CurvesGeometry::point_data, and CurvesGeometry::point_num.
Referenced by MOD_lineart_gpencil_generate_v3().
| void CurvesGeometry::ensure_can_interpolate_to_evaluated | ( | ) | const |
Definition at line 1159 of file curves_geometry.cc.
Referenced by bounds_min_max(), blender::nodes::node_geo_curve_sample_cc::SampleCurveFunction::call(), blender::geometry::compute_curve_trim_parameters(), blender::draw::curve_create_attribute(), blender::bke::curve_to_mesh_sweep(), and blender::geometry::resample_to_evaluated().
| void CurvesGeometry::ensure_evaluated_lengths | ( | ) | const |
Calculates the data described by evaluated_lengths_for_curve if necessary.
Definition at line 1132 of file curves_geometry.cc.
References blender::length_parameterize::accumulate_lengths(), curves_num(), curves_range(), cyclic(), evaluated_points_by_curve(), evaluated_points_num(), evaluated_positions(), blender::threading::parallel_for(), blender::Vector< T, InlineBufferCapacity, Allocator >::resize(), CurvesGeometry::runtime, and blender::MutableSpan< T >::slice().
Referenced by blender::nodes::node_geo_curve_spline_parameter_cc::accumulated_lengths_curve_domain(), blender::nodes::node_geo_curve_spline_parameter_cc::calculate_point_lengths(), blender::ed::greasepencil::curves_merge_by_distance(), blender::nodes::node_geo_curve_length_cc::curves_total_length(), blender::deform_drawing(), blender::geometry::extend_curves(), blender::geometry::interpolate_curves(), blender::nodes::node_geo_curve_sample_cc::node_geo_exec(), blender::point_counts_to_keep_concurrent(), blender::geometry::resample_to_length(), blender::geometry::resample_to_uniform(), blender::geometry::trim_curves(), and blender::write_stroke_transforms().
|
inline |
Definition at line 1058 of file BKE_curves.hh.
References cyclic(), evaluated_lengths_for_curve(), blender::Span< T >::is_empty(), and blender::Span< T >::last().
Referenced by blender::nodes::node_geo_curve_spline_parameter_cc::accumulated_lengths_curve_domain(), blender::nodes::node_geo_curve_spline_parameter_cc::calculate_curve_parameters(), blender::nodes::node_geo_curve_sample_cc::curve_accumulated_lengths(), blender::nodes::node_geo_curve_length_cc::curves_total_length(), blender::geometry::extend_curves(), blender::point_counts_to_keep_concurrent(), 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 1051 of file BKE_curves.hh.
References cyclic(), and CurvesGeometry::runtime.
Referenced by blender::geometry::compute_curve_trim_parameters(), evaluated_length_total_for_curve(), blender::geometry::resample_to_uniform(), blender::geometry::sample_curve_uniform(), and blender::write_stroke_transforms().
Definition at line 991 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(), CURVE_TYPE_POLY, curve_types(), curves_range(), cyclic(), blender::bke::evaluate_generic_data_for_curve(), blender::bke::CurvesGeometryRuntime::evaluated_normal_cache, evaluated_normals(), evaluated_points_by_curve(), evaluated_points_num(), evaluated_tangents(), blender::Span< T >::is_empty(), normal_mode(), NORMAL_MODE_FREE, NORMAL_MODE_MINIMUM_TWIST, NORMAL_MODE_Z_UP, blender::bke::normalize_span(), 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(), CurvesGeometry::runtime, blender::IndexRange::size(), blender::Span< T >::slice(), tilt(), and types.
Referenced by blender::bke::build_mesh_positions(), blender::nodes::node_geo_curve_sample_cc::SampleCurveFunction::call(), evaluated_normals(), and blender::geometry::gather_point_attributes_to_interpolate().
| OffsetIndices< int > CurvesGeometry::evaluated_points_by_curve | ( | ) | const |
The offsets of every curve's evaluated points.
Definition at line 691 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(), CURVE_TYPE_BEZIER, CURVE_TYPE_POLY, curves_num(), blender::bke::CurvesGeometryRuntime::EvaluatedOffsets::evaluated_offsets, has_curve_with_type(), is_single_type(), points_by_curve(), points_num(), blender::Vector< T, InlineBufferCapacity, Allocator >::resize(), and CurvesGeometry::runtime.
Referenced by blender::bke::calculate_result_offsets(), blender::nodes::node_geo_curve_sample_cc::SampleCurveFunction::call(), blender::geometry::compute_curve_trim_parameters(), blender::draw::curve_create_curves_lines(), blender::draw::curve_eval_render_wire_verts_edges_len_get(), blender::nodes::node_geo_input_tangent_cc::curve_tangent_point_domain(), blender::nodes::node_geo_curve_fill_cc::do_cdt(), blender::nodes::node_geo_curve_fill_cc::do_cdt_with_mask(), 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 1027 of file BKE_curves.hh.
References evaluated_points_by_curve(), and blender::offset_indices::OffsetIndices< T >::total_size().
Referenced by bounds_min_max(), ensure_evaluated_lengths(), evaluated_normals(), evaluated_positions(), and evaluated_tangents().
Definition at line 793 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(), CURVE_TYPE_POLY, curve_types(), curves_range(), cyclic(), evaluated_points_by_curve(), evaluated_points_num(), evaluated_positions(), blender::bke::curves::fill_points(), blender::bke::curves::foreach_curve_by_type(), handle_positions_left(), handle_positions_right(), blender::bke::curves::catmull_rom::interpolate_to_evaluated(), blender::bke::curves::nurbs::interpolate_to_evaluated(), is_single_type(), nurbs_orders(), nurbs_weights(), offsets(), blender::bke::curves::per_curve_point_offsets_range(), points_by_curve(), positions(), blender::Vector< T, InlineBufferCapacity, Allocator >::resize(), resolution(), CurvesGeometry::runtime, and blender::Span< T >::slice().
Referenced by bounds_min_max(), blender::bke::build_mesh_positions(), blender::nodes::node_geo_curve_sample_cc::SampleCurveFunction::call(), blender::draw::create_edit_points_position_vbo(), blender::draw::curve_create_curves_pos(), blender::nodes::node_geo_curve_fill_cc::do_cdt(), blender::nodes::node_geo_curve_fill_cc::do_cdt_with_mask(), ensure_evaluated_lengths(), evaluated_positions(), evaluated_tangents(), blender::geometry::interpolate_curves_with_samples(), blender::geometry::resample_to_evaluated(), blender::geometry::resample_to_uniform(), blender::geometry::trim_curves(), and blender::geometry::trim_evaluated_curves().
Definition at line 872 of file curves_geometry.cc.
References blender::math::almost_equal_relative(), blender::bke::curves::poly::calculate_tangents(), CURVE_TYPE_BEZIER, curves_range(), cyclic(), evaluated_points_by_curve(), evaluated_points_num(), evaluated_positions(), blender::IndexRange::first(), blender::index_mask::IndexMask::foreach_index(), 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(), blender::Vector< T, InlineBufferCapacity, Allocator >::resize(), CurvesGeometry::runtime, and blender::MutableSpan< T >::slice().
Referenced by blender::bke::build_mesh_positions(), blender::nodes::node_geo_curve_sample_cc::SampleCurveFunction::call(), blender::nodes::node_geo_input_tangent_cc::construct_curve_tangent_gvarray(), blender::nodes::node_geo_input_tangent_cc::curve_tangent_point_domain(), blender::deform_drawing(), evaluated_normals(), blender::geometry::gather_point_attributes_to_interpolate(), and blender::generate_curves().
Set the types for the curves in the selection and call update_curve_types.
Definition at line 329 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(), this, and update_curve_types().
| void CurvesGeometry::fill_curve_types | ( | CurveType | type | ) |
Set all curve types to the value and call update_curve_types.
Definition at line 314 of file curves_geometry.cc.
References attributes_for_write(), CURVE_TYPE_CATMULL_ROM, curve_types_for_write(), curves_num(), blender::bke::MutableAttributeAccessor::remove(), CurvesGeometry::runtime, and tag_topology_changed().
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(), blender::geometry::create_curve_from_vert_indices(), blender::geometry::create_curves_for_faces(), blender::nodes::node_geo_points_to_curves_cc::curves_from_points(), fill_curve_types(), blender::geometry::interpolate_curves_with_samples(), blender::ed::object::mesh_data_to_grease_pencil(), MOD_lineart_gpencil_generate_v3(), blender::ed::space_node::node_draw_zones_and_frames(), blender::io::usd::USDBasisCurvesReader::read_curve_sample(), blender::io::alembic::AbcCurveReader::read_curves_sample(), 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 473 of file curves_geometry.cc.
References blender::bke::ATTR_HANDLE_POSITION_LEFT, get_span_attribute(), and blender::bke::Point.
Referenced by 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::draw::create_edit_points_position(), blender::io::alembic::ABCCurveWriter::do_write(), evaluated_positions(), evaluated_tangents(), blender::geometry::fillet_curves(), blender::geometry::fit_poly_to_bezier_curves(), blender::io::usd::populate_curve_props_for_bezier(), blender::geometry::subdivide_curves(), transform(), translate(), and blender::geometry::trim_bezier_curves().
| MutableSpan< float3 > CurvesGeometry::handle_positions_left_for_write | ( | ) |
Definition at line 477 of file curves_geometry.cc.
References blender::bke::ATTR_HANDLE_POSITION_LEFT, get_mutable_attribute(), and blender::bke::Point.
Referenced by calculate_bezier_auto_handles(), blender::geometry::convert_curves_to_bezier(), blender::nodes::node_geo_curve_primitive_bezier_segment_cc::create_bezier_segment_curve(), blender::geometry::fill_bezier_data(), blender::geometry::fillet_curves(), blender::geometry::fit_poly_to_bezier_curves(), blender::io::usd::USDBasisCurvesReader::read_curve_sample(), blender::io::alembic::AbcCurveReader::read_curves_sample(), reverse_curves(), blender::nodes::node_geo_set_curve_handles_cc::set_position_in_component(), blender::io::grease_pencil::shape_attributes_to_curves(), blender::geometry::subdivide_curves(), transform(), translate(), and blender::geometry::trim_bezier_curves().
Definition at line 482 of file curves_geometry.cc.
References blender::bke::ATTR_HANDLE_POSITION_RIGHT, get_span_attribute(), and blender::bke::Point.
Referenced by 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::draw::create_edit_points_position(), blender::io::alembic::ABCCurveWriter::do_write(), evaluated_positions(), evaluated_tangents(), blender::geometry::fillet_curves(), blender::geometry::fit_poly_to_bezier_curves(), blender::io::usd::populate_curve_props_for_bezier(), blender::geometry::subdivide_curves(), transform(), translate(), and blender::geometry::trim_bezier_curves().
| MutableSpan< float3 > CurvesGeometry::handle_positions_right_for_write | ( | ) |
Definition at line 486 of file curves_geometry.cc.
References blender::bke::ATTR_HANDLE_POSITION_RIGHT, get_mutable_attribute(), and blender::bke::Point.
Referenced by calculate_bezier_auto_handles(), blender::geometry::convert_curves_to_bezier(), blender::nodes::node_geo_curve_primitive_bezier_segment_cc::create_bezier_segment_curve(), blender::geometry::fill_bezier_data(), blender::geometry::fillet_curves(), blender::geometry::fit_poly_to_bezier_curves(), blender::io::usd::USDBasisCurvesReader::read_curve_sample(), blender::io::alembic::AbcCurveReader::read_curves_sample(), reverse_curves(), blender::nodes::node_geo_set_curve_handles_cc::set_position_in_component(), blender::io::grease_pencil::shape_attributes_to_curves(), blender::geometry::subdivide_curves(), transform(), translate(), and blender::geometry::trim_bezier_curves().
| VArray< int8_t > CurvesGeometry::handle_types_left | ( | ) | const |
Handle types for Bezier control points. Call tag_topology_changed after changes.
Definition at line 455 of file curves_geometry.cc.
References blender::bke::ATTR_HANDLE_TYPE_LEFT, get_varray_attribute(), and blender::bke::Point.
Referenced by calculate_bezier_auto_handles(), blender::geometry::convert_curves_to_bezier(), blender::draw::create_edit_points_data(), blender::geometry::fillet_curves(), blender::geometry::fit_poly_to_bezier_curves(), blender::nodes::node_geo_curve_handle_type_selection_cc::select_by_handle_type(), blender::geometry::subdivide_curves(), blender::geometry::trim_bezier_curves(), and blender::bke::write_sharp_bezier_edges().
| MutableSpan< int8_t > CurvesGeometry::handle_types_left_for_write | ( | ) |
Definition at line 459 of file curves_geometry.cc.
References blender::bke::ATTR_HANDLE_TYPE_LEFT, get_mutable_attribute(), and blender::bke::Point.
Referenced by blender::geometry::convert_curves_to_bezier(), blender::nodes::node_geo_curve_primitive_bezier_segment_cc::create_bezier_segment_curve(), blender::geometry::fill_bezier_data(), blender::geometry::fillet_curves(), blender::geometry::fit_poly_to_bezier_curves(), blender::io::usd::USDBasisCurvesReader::read_curve_sample(), blender::io::alembic::AbcCurveReader::read_curves_sample(), reverse_curves(), blender::nodes::node_geo_curve_set_handle_type_cc::set_handle_type(), blender::nodes::node_geo_set_curve_handles_cc::set_position_in_component(), blender::io::grease_pencil::shape_attributes_to_curves(), blender::geometry::subdivide_curves(), and blender::geometry::trim_bezier_curves().
| VArray< int8_t > CurvesGeometry::handle_types_right | ( | ) | const |
Definition at line 464 of file curves_geometry.cc.
References blender::bke::ATTR_HANDLE_TYPE_RIGHT, get_varray_attribute(), and blender::bke::Point.
Referenced by calculate_bezier_auto_handles(), blender::geometry::convert_curves_to_bezier(), blender::draw::create_edit_points_data(), blender::geometry::fillet_curves(), blender::geometry::fit_poly_to_bezier_curves(), blender::nodes::node_geo_curve_handle_type_selection_cc::select_by_handle_type(), blender::geometry::subdivide_curves(), blender::geometry::trim_bezier_curves(), and blender::bke::write_sharp_bezier_edges().
| MutableSpan< int8_t > CurvesGeometry::handle_types_right_for_write | ( | ) |
Definition at line 468 of file curves_geometry.cc.
References blender::bke::ATTR_HANDLE_TYPE_RIGHT, get_mutable_attribute(), and blender::bke::Point.
Referenced by blender::geometry::convert_curves_to_bezier(), blender::nodes::node_geo_curve_primitive_bezier_segment_cc::create_bezier_segment_curve(), blender::geometry::fill_bezier_data(), blender::geometry::fillet_curves(), blender::geometry::fit_poly_to_bezier_curves(), blender::io::usd::USDBasisCurvesReader::read_curve_sample(), blender::io::alembic::AbcCurveReader::read_curves_sample(), reverse_curves(), blender::nodes::node_geo_curve_set_handle_type_cc::set_handle_type(), blender::nodes::node_geo_set_curve_handles_cc::set_position_in_component(), blender::io::grease_pencil::shape_attributes_to_curves(), blender::geometry::subdivide_curves(), and blender::geometry::trim_bezier_curves().
|
inline |
Definition at line 996 of file BKE_curves.hh.
References curve_type_counts().
Referenced by calculate_bezier_auto_handles(), blender::geometry::convert_curves_to_bezier(), blender::geometry::convert_curves_to_catmull_rom_or_poly(), evaluated_points_by_curve(), blender::io::grease_pencil::SVGExporter::export_grease_pencil_objects(), blender::geometry::fill_bezier_data(), blender::geometry::fill_nurbs_data(), blender::geometry::fillet_curves(), blender::modify_curves(), remove_attributes_based_on_types(), blender::geometry::smooth_curve_positions(), blender::geometry::trim_curves(), and blender::bke::write_sharp_bezier_edges().
Definition at line 1001 of file BKE_curves.hh.
References types.
| IndexMask CurvesGeometry::indices_for_curve_type | ( | CurveType | type, |
| const IndexMask & | selection, | ||
| IndexMaskMemory & | memory ) const |
Definition at line 726 of file curves_geometry.cc.
References curve_type_counts(), curve_types(), and blender::bke::curves::indices_for_type().
| IndexMask CurvesGeometry::indices_for_curve_type | ( | CurveType | type, |
| IndexMaskMemory & | memory ) const |
All of the curve indices for curves with a specific type.
Definition at line 720 of file curves_geometry.cc.
References curves_range(), and indices_for_curve_type().
Referenced by evaluated_tangents(), blender::io::grease_pencil::SVGExporter::export_grease_pencil_objects(), indices_for_curve_type(), and blender::geometry::smooth_curve_positions().
| void 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 1106 of file curves_geometry.cc.
References curve_types(), curves_range(), blender::bke::evaluate_generic_data_for_curve(), evaluated_points_by_curve(), nurbs_orders(), nurbs_weights(), blender::threading::parallel_for(), points_by_curve(), resolution(), CurvesGeometry::runtime, blender::GMutableSpan::slice(), and blender::GSpan::slice().
| void 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 1086 of file curves_geometry.cc.
References BLI_assert, curve_types(), blender::bke::evaluate_generic_data_for_curve(), nurbs_orders(), nurbs_weights(), resolution(), CurvesGeometry::runtime, blender::GMutableSpan::size(), blender::GSpan::size(), and this.
Referenced by bounds_min_max(), blender::draw::curve_create_attribute(), 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 976 of file BKE_curves.hh.
References BLI_assert, CurvesGeometry::curve_num, and CurvesGeometry::point_num.
Referenced by bounds_min_max(), blender::build_drawing(), calculate_bezier_auto_handles(), blender::nodes::node_geo_curve_sample_cc::SampleCurveFunction::call(), 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::deform_drawing(), blender::deform_drawing(), blender::io::alembic::ABCCurveWriter::do_write(), blender::io::usd::USDCurvesWriter::do_write(), blender::nodes::node_geo_duplicate_elements_cc::duplicate_points_CurvesGeometry(), blender::geometry::fillet_curves(), blender::nodes::node_geo_curve_fillet_cc::fillet_grease_pencil(), blender::nodes::node_geo_curve_endpoint_selection_cc::EndpointFieldInput::get_varray_for_context(), 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_curve_sample_cc::node_geo_exec(), blender::nodes::node_geo_instance_on_points_cc::node_geo_exec(), nurbs_custom_knots_by_curve(), blender::nodes::LazyFunctionForForeachGeometryElementZone::prepare_components(), blender::nodes::node_geo_set_curve_handles_cc::set_position_in_component(), blender::nodes::node_geo_set_position_cc::set_position_in_grease_pencil(), blender::geometry::subdivide_curves(), blender::bke::tests::TEST(), transform(), translate(), blender::nodes::node_geo_curve_trim_cc::trim_curves(), blender::ed::sculpt_paint::greasepencil::trim_stroke_ends(), and blender::write_weights_for_drawing().
|
inline |
Return true if all of the curves have the provided type.
Definition at line 991 of file BKE_curves.hh.
References curve_type_counts(), and curves_num().
Referenced by bounds_min_max(), blender::nodes::node_geo_input_tangent_cc::construct_curve_tangent_gvarray(), evaluated_points_by_curve(), evaluated_positions(), and blender::nodes::node_geo_curve_spline_type_cc::node_geo_exec().
| std::optional< int > 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 1349 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.
| VArray< int8_t > CurvesGeometry::normal_mode | ( | ) | const |
Which method to use for calculating the normals of evaluated points (NormalMode). Call tag_normals_changed after changes.
Definition at line 437 of file curves_geometry.cc.
References blender::bke::ATTR_NORMAL_MODE, blender::bke::Curve, and get_varray_attribute().
Referenced by evaluated_normals().
| MutableSpan< int8_t > CurvesGeometry::normal_mode_for_write | ( | ) |
Definition at line 441 of file curves_geometry.cc.
References blender::bke::ATTR_NORMAL_MODE, blender::bke::Curve, and get_mutable_attribute().
Referenced by blender::nodes::node_geo_set_curve_normal_cc::set_curve_normal().
| IndexMask CurvesGeometry::nurbs_custom_knot_curves | ( | IndexMaskMemory & | memory | ) | const |
Builds mask of NURBS curves with knot mode NURBS_KNOT_MODE_CUSTOM.
Definition at line 546 of file curves_geometry.cc.
References CURVE_TYPE_NURBS, curve_types(), curves_range(), blender::IndexMask::from_predicate(), NURBS_KNOT_MODE_CUSTOM, and nurbs_knots_modes().
Referenced by blender::bke::curves::nurbs::copy_custom_knots().
| Span< float > CurvesGeometry::nurbs_custom_knots | ( | ) | const |
Custom knots for NURBS curves with knots mode NURBS_KNOT_MODE_CUSTOM.
Definition at line 528 of file curves_geometry.cc.
References CurvesGeometry::custom_knot_num, and CurvesGeometry::custom_knots.
Referenced by blender::ed::curves::append_point_knots(), blender::bke::curves::nurbs::gather_custom_knots(), and blender::io::usd::populate_curve_props_for_nurbs().
| OffsetIndices< int > 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 557 of file curves_geometry.cc.
References CurvesGeometry::curve_num, curves_range(), is_empty(), NURBS_KNOT_MODE_CUSTOM, nurbs_knots_modes(), nurbs_orders(), points_by_curve(), blender::Vector< T, InlineBufferCapacity, Allocator >::resize(), and CurvesGeometry::runtime.
Referenced by blender::ed::curves::append_point_knots(), blender::geometry::execute_realize_curve_task(), blender::ed::curves::extrude_knots(), blender::bke::curves::nurbs::gather_custom_knots(), nurbs_custom_knots_update_size(), blender::io::usd::populate_curve_props_for_nurbs(), and reverse_curves().
| MutableSpan< float > CurvesGeometry::nurbs_custom_knots_for_write | ( | ) |
Definition at line 536 of file curves_geometry.cc.
References CurvesGeometry::custom_knot_num, CurvesGeometry::custom_knots, blender::implicit_sharing::make_trivial_data_mutable(), CurvesGeometry::runtime, and this.
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 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 595 of file curves_geometry.cc.
References CurvesGeometry::custom_knot_num, CurvesGeometry::custom_knots, blender::implicit_sharing::resize_trivial_array(), CurvesGeometry::runtime, and this.
Referenced by blender::geometry::execute_realize_curve_tasks().
| void 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 581 of file curves_geometry.cc.
References CurvesGeometry::custom_knot_num, CurvesGeometry::custom_knots, nurbs_custom_knots_by_curve(), blender::implicit_sharing::resize_trivial_array(), CurvesGeometry::runtime, this, 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 972 of file BKE_curves.hh.
References 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::greasepencil::extrude_grease_pencil_curves(), blender::geometry::fillet_curves(), blender::geometry::remove_points_and_split(), blender::ed::curves::resize_curves(), reverse_curves(), and blender::geometry::trim_curves().
| VArray< int8_t > CurvesGeometry::nurbs_knots_modes | ( | ) | const |
The automatic generation mode for each NURBS curve's knots vector, on the curve domain. Call tag_topology_changed after changes.
Definition at line 509 of file curves_geometry.cc.
References blender::bke::ATTR_NURBS_KNOTS_MODE, blender::bke::Curve, and get_varray_attribute().
Referenced by blender::geometry::convert_curves_to_bezier(), blender::ed::greasepencil::extrude_grease_pencil_curves(), nurbs_custom_knot_curves(), nurbs_custom_knots_by_curve(), and blender::io::usd::populate_curve_props_for_nurbs().
| MutableSpan< int8_t > CurvesGeometry::nurbs_knots_modes_for_write | ( | ) |
Definition at line 513 of file curves_geometry.cc.
References blender::bke::ATTR_NURBS_KNOTS_MODE, blender::bke::Curve, and get_mutable_attribute().
Referenced by blender::geometry::convert_curves_to_nurbs(), and blender::io::alembic::AbcCurveReader::read_curves_sample().
| VArray< int8_t > CurvesGeometry::nurbs_orders | ( | ) | const |
The order (degree plus one) of each NURBS curve, on the curve domain. Call tag_topology_changed after changes.
Definition at line 491 of file curves_geometry.cc.
References blender::bke::ATTR_NURBS_ORDER, blender::bke::Curve, and get_varray_attribute().
Referenced by blender::ed::curves::append_point_knots(), blender::io::alembic::ABCCurveWriter::do_write(), evaluated_normals(), evaluated_positions(), interpolate_to_evaluated(), interpolate_to_evaluated(), nurbs_custom_knots_by_curve(), and blender::io::usd::populate_curve_props_for_nurbs().
| MutableSpan< int8_t > CurvesGeometry::nurbs_orders_for_write | ( | ) |
Definition at line 495 of file curves_geometry.cc.
References blender::bke::ATTR_NURBS_ORDER, blender::bke::Curve, and get_mutable_attribute().
Referenced by blender::geometry::convert_curves_to_nurbs(), blender::io::usd::USDBasisCurvesReader::read_curve_sample(), and blender::io::alembic::AbcCurveReader::read_curves_sample().
| Span< float > CurvesGeometry::nurbs_weights | ( | ) | const |
The weight for each control point for NURBS curves. Call tag_positions_changed after changes.
Definition at line 500 of file curves_geometry.cc.
References blender::bke::ATTR_NURBS_WEIGHT, get_span_attribute(), and blender::bke::Point.
Referenced by blender::geometry::convert_curves_to_nurbs(), blender::io::alembic::ABCCurveWriter::do_write(), evaluated_normals(), evaluated_positions(), interpolate_to_evaluated(), and interpolate_to_evaluated().
| MutableSpan< float > CurvesGeometry::nurbs_weights_for_write | ( | ) |
Definition at line 504 of file curves_geometry.cc.
References blender::bke::ATTR_NURBS_WEIGHT, get_mutable_attribute(), and blender::bke::Point.
Referenced by blender::geometry::convert_curves_to_nurbs(), blender::geometry::fill_nurbs_data(), and blender::io::alembic::AbcCurveReader::read_curves_sample().
| Span< int > 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 402 of file curves_geometry.cc.
References CurvesGeometry::curve_num, and CurvesGeometry::curve_offsets.
Referenced by blender::geometry::add_curves_on_mesh(), bezier_evaluated_offsets_for_curve(), blender::nodes::node_geo_interpolate_curves_cc::build_kdtrees_for_root_positions(), blender::bke::compare_geometry::compare_curves(), blender::geometry::copy_and_reorder_curves(), blender::geometry::create_curves_for_faces(), blender::create_envelope_strokes(), blender::ed::greasepencil::curves_geometry_is_equal(), blender::io::alembic::curves_topology_changed(), blender::io::usd::curves_topology_changed(), evaluated_positions(), blender::geometry::execute_realize_curve_task(), blender::io::grease_pencil::extend_curves_geometry(), blender::geometry::fillet_curves(), blender::geometry::fit_poly_to_bezier_curves(), blender::modify_curves(), blender::geometry::reorder_and_flip_curves(), blender::ed::curves::resize_curves(), blender::geometry::subdivide_curves(), blender::bke::tests::TEST(), blender::geometry::tests::TEST(), blender::geometry::tests::TEST(), blender::geometry::tests::TEST(), blender::geometry::tests::TEST(), blender::geometry::tests::TEST(), blender::geometry::tests::TEST(), blender::geometry::tests::TEST(), blender::geometry::tests::TEST(), and blender::geometry::trim_curves().
| MutableSpan< int > CurvesGeometry::offsets_for_write | ( | ) |
Definition at line 409 of file curves_geometry.cc.
References CurvesGeometry::curve_num, CurvesGeometry::curve_offsets, blender::implicit_sharing::make_trivial_data_mutable(), CurvesGeometry::runtime, and this.
Referenced by blender::geometry::add_curves_on_mesh(), 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::geometry::create_curve_from_vert_indices(), blender::geometry::create_curves_for_faces(), blender::create_dashes(), blender::create_envelope_strokes(), blender::bke::curves_copy_curve_selection(), blender::nodes::node_geo_points_to_curves_cc::curves_from_points(), blender::ed::greasepencil::curves_merge_by_distance(), CurvesGeometry(), blender::geometry::debug_randomize_curve_order(), 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::io::grease_pencil::extend_curves_geometry(), blender::geometry::extract_greasepencil_layer_points(), blender::ed::curves::extrude_curves(), blender::ed::greasepencil::extrude_grease_pencil_curves(), blender::geometry::fillet_curves(), blender::geometry::fit_poly_to_bezier_curves(), blender::nodes::node_geo_interpolate_curves_cc::generate_interpolated_curves(), blender::ed::sculpt_paint::greasepencil::interpolate_between_curves(), blender::geometry::join_curves_ranges(), blender::ed::object::mesh_data_to_grease_pencil(), MOD_lineart_gpencil_generate_v3(), blender::ed::space_node::node_draw_zones_and_frames(), blender::io::usd::USDBasisCurvesReader::read_curve_sample(), blender::io::alembic::AbcCurveReader::read_curves_sample(), 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 & CurvesGeometry::operator= | ( | const CurvesGeometry & | other | ) |
Definition at line 150 of file curves_geometry.cc.
References CurvesGeometry().
| CurvesGeometry & CurvesGeometry::operator= | ( | CurvesGeometry && | other | ) |
Definition at line 199 of file curves_geometry.cc.
References CurvesGeometry().
| Array< int > CurvesGeometry::point_to_curve_map | ( | ) | const |
Definition at line 734 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(), blender::nodes::node_geo_offset_point_in_curve_cc::ControlPointNeighborFieldInput::get_varray_for_context(), blender::nodes::node_geo_offset_point_in_curve_cc::OffsetValidFieldInput::get_varray_for_context(), blender::simplify_drawing(), and blender::simplify_fixed().
|
inline |
The offsets of every curve into arrays on the points domain.
Definition at line 1021 of file BKE_curves.hh.
References CurvesGeometry::curve_num, and CurvesGeometry::curve_offsets.
Referenced by blender::geometry::add_curves_on_mesh(), blender::ed::curves::append_point_knots(), bezier_evaluated_offsets_for_curve(), blender::nodes::node_geo_blur_attribute_cc::blur_on_curve_exec(), blender::build_concurrent(), blender::build_sequential(), blender::geometry::calc_position_with_interpolation(), blender::geometry::calc_position_without_interpolation(), blender::geometry::calc_radius_with_interpolation(), calculate_bezier_auto_handles(), blender::nodes::node_geo_curve_spline_parameter_cc::calculate_point_lengths(), blender::geometry::calculate_result_offsets(), blender::nodes::node_geo_curve_sample_cc::SampleCurveFunction::call(), blender::geometry::compute_curve_trim_parameters(), 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::nodes::node_geo_input_spline_length_cc::construct_curve_point_count_gvarray(), 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::create_dashes(), blender::create_envelope_strokes(), blender::draw::create_points_position_time_vbo(), blender::nodes::node_geo_input_tangent_cc::curve_tangent_point_domain(), blender::draw::curves_ensure_procedural_data(), 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::draw::curves_sub_pass_setup_implementation(), blender::geometry::debug_randomize_curve_order(), blender::nodes::node_geo_deform_curves_on_surface_cc::deform_curves(), blender::deform_drawing(), blender::deform_drawing(), blender::deform_drawing_as_envelope(), blender::ed::sculpt_paint::greasepencil::deselect_stroke(), blender::io::alembic::ABCCurveWriter::do_write(), blender::draw::DRW_curves_batch_cache_create_requested(), blender::nodes::node_geo_duplicate_elements_cc::duplicate_curves_CurveGeometry(), evaluated_normals(), evaluated_points_by_curve(), evaluated_positions(), evaluated_tangents(), blender::ed::greasepencil::execute_trim_on_drawing(), blender::ed::greasepencil::trim::expand_trim_segment_direction(), export_hair_curves(), export_hair_curves_motion(), blender::geometry::extend_curves(), blender::geometry::extract_curves(), blender::geometry::extract_greasepencil_layer_curves(), blender::ed::greasepencil::extrude_grease_pencil_curves(), blender::geometry::fill_bezier_data(), blender::geometry::fill_nurbs_data(), blender::geometry::fillet_curves(), blender::io::grease_pencil::GreasePencilExporter::foreach_stroke_in_layer(), blender::generate_curves(), blender::ed::greasepencil::get_boundary_bounds(), blender::get_factor_from_draw_speed(), blender::ed::greasepencil::trim::get_intersections_of_curve_with_curves(), blender::ed::sculpt_paint::greasepencil::get_single_stroke(), blender::nodes::node_geo_curve_endpoint_selection_cc::EndpointFieldInput::get_varray_for_context(), blender::nodes::node_geo_curve_topology_points_of_curve_cc::PointsOfCurveInput::get_varray_for_context(), blender::nodes::node_geo_offset_point_in_curve_cc::ControlPointNeighborFieldInput::get_varray_for_context(), blender::nodes::node_geo_offset_point_in_curve_cc::OffsetValidFieldInput::get_varray_for_context(), 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(), blender::ed::sculpt_paint::greasepencil::EraseOperationExecutor::hard_eraser(), 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(), blender::geometry::mesh_faces_to_curves_convert(), blender::modify_curves(), blender::modify_curves(), blender::modify_drawing(), blender::modify_drawing(), blender::modify_fill_color(), blender::modify_fill_color(), blender::modify_opacity(), blender::modify_stroke_by_index(), blender::modify_stroke_by_layer(), blender::modify_stroke_by_material(), blender::modify_stroke_color(), blender::modify_stroke_color(), blender::modify_stroke_color(), blender::modify_stroke_random(), 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::point_counts_to_keep_concurrent(), point_to_curve_map(), blender::points_info_sequential(), blender::io::usd::populate_curve_props_for_nurbs(), blender::io::usd::populate_curve_verts(), blender::io::usd::populate_curve_verts_for_bezier(), blender::io::alembic::AbcCurveReader::read_curves_sample(), blender::geometry::remove_points_and_split(), blender::reorder_cyclic_curve_points(), blender::reorder_strokes(), 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_padded(), blender::nodes::node_geo_curve_handle_type_selection_cc::select_by_handle_type(), blender::ed::curves::select_linked_pick(), blender::io::grease_pencil::shape_attributes_to_curves(), blender::simplify_drawing(), blender::simplify_fixed(), blender::geometry::smooth_curve_positions(), blender::ed::sculpt_paint::greasepencil::smooth_stroke(), blender::ed::sculpt_paint::greasepencil::EraseOperationExecutor::soft_eraser(), blender::ed::sculpt_paint::greasepencil::EraseOperationExecutor::stroke_eraser(), blender::geometry::subdivide_curves(), blender::subdivide_drawing(), blender::ed::curves::tests::TEST(), blender::ed::curves::tests::TEST(), blender::ed::curves::tests::TEST(), blender::ed::curves::tests::TEST(), blender::ed::curves::tests::TEST(), blender::ed::curves::tests::TEST(), blender::geometry::trim_attribute_linear(), blender::geometry::trim_bezier_curves(), blender::geometry::trim_catmull_rom_curves(), 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::io::hydra::CurvesData::write_curves(), blender::write_fill_transforms(), blender::bke::write_sharp_bezier_edges(), blender::write_stroke_transforms(), and blender::write_weights_for_drawing().
|
inline |
The total number of control points in all curves.
Definition at line 964 of file BKE_curves.hh.
References CurvesGeometry::point_num.
Referenced by blender::geometry::add_curves_on_mesh(), blender::ed::curves::append_primitive_curve(), blender::bke::build_mesh_positions(), blender::nodes::node_geo_curve_spline_parameter_cc::calculate_point_lengths(), blender::bke::compare_geometry::compare_curves(), blender::create_envelope_strokes(), blender::nodes::node_geo_input_tangent_cc::curve_tangent_point_domain(), blender::nodes::node_geo_curve_to_mesh_cc::curve_to_mesh(), blender::draw::curves_ensure_procedural_data(), 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::nodes::node_geo_curve_to_points_cc::curves_to_points(), blender::deform_drawing(), blender::io::alembic::ABCCurveWriter::do_write(), blender::nodes::node_geo_duplicate_elements_cc::duplicate_points_CurvesGeometry(), blender::duplicate_strokes(), blender::draw::ensure_control_point_attribute(), evaluated_points_by_curve(), blender::ed::sculpt_paint::greasepencil::EraseOperationExecutor::execute(), blender::geometry::execute_realize_curve_task(), blender::ed::greasepencil::execute_trim_on_drawing(), blender::geometry::extend_curves(), blender::io::grease_pencil::extend_curves_geometry(), 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::get_factor_from_draw_speed(), blender::nodes::node_geo_curve_endpoint_selection_cc::EndpointFieldInput::get_varray_for_context(), blender::nodes::node_geo_curve_topology_points_of_curve_cc::PointsOfCurveInput::get_varray_for_context(), blender::nodes::node_geo_offset_point_in_curve_cc::ControlPointNeighborFieldInput::get_varray_for_context(), 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(), blender::ed::sculpt_paint::greasepencil::EraseOperationExecutor::hard_eraser(), blender::geometry::interpolate_curves(), blender::geometry::interpolate_curves_with_samples(), blender::geometry::join_curves_ranges(), blender::modify_curves(), blender::modify_drawing(), 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::remove_points_and_split(), blender::geometry::reorder_curves_geometry(), blender::reorder_cyclic_curve_points(), blender::geometry::resample_to_uniform(), resize(), blender::ed::greasepencil::select_random_exec(), blender::nodes::node_geo_curve_set_handle_type_cc::set_handle_type(), blender::nodes::node_geo_set_curve_handles_cc::set_position_in_component(), blender::simplify_drawing(), blender::ed::sculpt_paint::greasepencil::simplify_stroke(), blender::geometry::smooth_curve_positions(), blender::ed::sculpt_paint::greasepencil::EraseOperationExecutor::soft_eraser(), stats_object(), stats_object_edit(), stats_object_sculpt(), 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(), blender::geometry::tests::TEST(), blender::geometry::tests::TEST(), blender::geometry::tests::TEST(), blender::geometry::tests::TEST(), blender::geometry::tests::TEST(), blender::geometry::tests::TEST(), blender::geometry::tests::TEST(), blender::geometry::transform_grease_pencil_edit_hints(), blender::ed::greasepencil::trim::trim_curve_segments(), and blender::io::hydra::CurvesData::write_curves().
|
inline |
Definition at line 982 of file BKE_curves.hh.
References points_num().
Referenced by blender::geometry::add_curves_on_mesh(), blender::ed::object::convert_grease_pencil_to_mesh(), blender::create_envelope_strokes(), blender::ed::sculpt_paint::greasepencil::EraseOperationExecutor::curves_intersections_and_points_sides(), blender::io::alembic::ABCCurveWriter::do_write(), blender::ed::sculpt_paint::greasepencil::EraseOperationExecutor::execute(), blender::ed::greasepencil::execute_trim_on_drawing(), blender::nodes::node_geo_offset_point_in_curve_cc::OffsetValidFieldInput::get_varray_for_context(), blender::ed::sculpt_paint::greasepencil::TintOperation::on_stroke_begin(), blender::io::usd::USDBasisCurvesReader::read_curve_sample(), blender::io::alembic::AbcCurveReader::read_curves_sample(), remove_points(), blender::ed::greasepencil::retrieve_visible_points(), blender::simplify_drawing(), blender::simplify_fixed(), blender::ed::sculpt_paint::greasepencil::EraseOperationExecutor::soft_eraser(), and blender::io::hydra::CurvesData::write_curves().
Definition at line 384 of file curves_geometry.cc.
References blender::bke::ATTR_POSITION, get_span_attribute(), and blender::bke::Point.
Referenced by blender::geometry::add_curves_on_mesh(), bounds_min_max(), blender::nodes::node_geo_interpolate_curves_cc::build_kdtrees_for_root_positions(), 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::draw::create_points_position_time_vbo(), blender::nodes::node_geo_input_tangent_cc::curve_tangent_point_domain(), blender::ed::greasepencil::curves_merge_endpoints_by_distance(), blender::io::alembic::ABCCurveWriter::do_write(), evaluated_positions(), evaluated_tangents(), blender::geometry::execute_realize_curve_task(), export_hair_curves(), export_hair_curves_motion(), blender::geometry::fillet_curves(), blender::geometry::fit_poly_to_bezier_curves(), blender::io::grease_pencil::GreasePencilExporter::foreach_stroke_in_layer(), blender::bke::crazyspace::get_evaluated_curves_deformation(), blender::bke::crazyspace::get_evaluated_grease_pencil_drawing_deformation(), blender::nodes::node_geo_string_to_curves_cc::get_pivot_point(), blender::nodes::node_geo_input_curve_handles_cc::HandlePositionFieldInput::get_varray_for_context(), blender::ed::sculpt_paint::greasepencil::interpolate_between_curves(), blender::nodes::node_geo_interpolate_curves_cc::interpolate_curve_shapes(), blender::modify_drawing(), blender::modify_fill_color(), blender::modify_stroke_color(), blender::ed::sculpt_paint::greasepencil::outline_stroke(), blender::io::usd::populate_curve_props(), blender::io::usd::populate_curve_props_for_bezier(), blender::io::usd::populate_curve_props_for_nurbs(), blender::reorder_strokes(), blender::geometry::sample_curve_padded(), blender::nodes::node_geo_set_curve_handles_cc::set_position_in_component(), blender::simplify_drawing(), blender::geometry::subdivide_curves(), blender::subdivide_drawing(), blender::bke::tests::TEST(), blender::ed::curves::tests::TEST(), blender::ed::curves::tests::TEST(), blender::ed::curves::tests::TEST(), blender::ed::curves::tests::TEST(), blender::ed::curves::tests::TEST(), blender::ed::curves::tests::TEST(), blender::geometry::trim_bezier_curves(), blender::geometry::trim_catmull_rom_curves(), blender::geometry::trim_polygonal_curves(), blender::io::hydra::CurvesData::write_curves(), blender::write_fill_transforms(), and blender::write_weights_for_drawing().
| MutableSpan< float3 > CurvesGeometry::positions_for_write | ( | ) |
Definition at line 388 of file curves_geometry.cc.
References blender::bke::ATTR_POSITION, get_mutable_attribute(), and blender::bke::Point.
Referenced by blender::geometry::calc_position_with_interpolation(), blender::geometry::calc_position_without_interpolation(), blender::geometry::calc_radius_with_interpolation(), 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::nodes::node_geo_curve_primitive_arc_cc::create_arc_curve_from_points(), blender::nodes::node_geo_curve_primitive_arc_cc::create_arc_curve_from_radius(), blender::nodes::node_geo_curve_primitive_bezier_segment_cc::create_bezier_segment_curve(), blender::nodes::node_geo_curve_primitive_line_cc::create_direction_line_curve(), blender::nodes::node_geo_curve_primitive_circle_cc::create_point_circle_curve(), blender::nodes::node_geo_curve_primitive_line_cc::create_point_line_curve(), blender::nodes::node_geo_curve_primitive_quadratic_bezier_cc::create_quadratic_bezier_curve(), blender::nodes::node_geo_curve_primitive_circle_cc::create_radius_circle_curve(), blender::nodes::node_geo_curve_primitive_spiral_cc::create_spiral_curve(), blender::nodes::node_geo_curve_primitive_star_cc::create_star_curve(), blender::deform_drawing(), blender::deform_drawing(), blender::deform_drawing_as_envelope(), blender::geometry::execute_realize_curve_task(), blender::geometry::extend_curves(), blender::geometry::fillet_curves(), blender::geometry::fit_poly_to_bezier_curves(), blender::generate_curves(), blender::ed::sculpt_paint::greasepencil::grease_pencil_interpolate_sequence_exec(), blender::ed::sculpt_paint::greasepencil::grease_pencil_interpolate_update(), 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::ed::object::mesh_data_to_grease_pencil(), MOD_lineart_gpencil_generate_v3(), blender::modify_curves(), blender::modify_curves(), blender::modify_drawing(), blender::modify_stroke_by_index(), blender::modify_stroke_by_layer(), blender::modify_stroke_by_material(), blender::modify_stroke_random(), blender::ed::space_node::node_draw_zones_and_frames(), blender::nodes::node_geo_curve_primitive_quadrilateral_cc::node_geo_exec(), blender::nodes::node_geo_deform_curves_on_surface_cc::node_geo_exec(), blender::ed::sculpt_paint::greasepencil::outline_stroke(), blender::io::usd::USDBasisCurvesReader::read_curve_sample(), blender::io::alembic::AbcCurveReader::read_curves_sample(), blender::geometry::resample_to_evaluated(), blender::geometry::resample_to_uniform(), blender::io::grease_pencil::shape_attributes_to_curves(), 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().
| VArray< float > CurvesGeometry::radius | ( | ) | const |
Definition at line 393 of file curves_geometry.cc.
References blender::bke::ATTR_RADIUS, get_varray_attribute(), and blender::bke::Point.
Referenced by bounds_min_max(), blender::io::alembic::ABCCurveWriter::do_write(), and blender::io::usd::populate_curve_widths().
| MutableSpan< float > CurvesGeometry::radius_for_write | ( | ) |
Definition at line 397 of file curves_geometry.cc.
References blender::bke::ATTR_RADIUS, get_mutable_attribute(), and blender::bke::Point.
Referenced by blender::geometry::calc_radius_without_interpolation(), blender::io::usd::USDBasisCurvesReader::read_curve_sample(), and blender::io::alembic::AbcCurveReader::read_curves_sample().
| void CurvesGeometry::remove_attributes_based_on_types | ( | ) |
Remove any attributes that are unused based on the types in the curves.
Definition at line 1687 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(), CURVE_TYPE_BEZIER, CURVE_TYPE_CATMULL_ROM, CURVE_TYPE_NURBS, and has_curve_with_type().
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 CurvesGeometry::remove_curves | ( | const IndexMask & | curves_to_delete, |
| const AttributeFilter & | attribute_filter ) |
Definition at line 1566 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(), this, and update_curve_types().
Referenced by blender::nodes::node_geo_curves_to_grease_pencil_cc::curves_to_grease_pencil_with_one_layer(), blender::deform_drawing(), 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 CurvesGeometry::remove_points | ( | const IndexMask & | points_to_delete, |
| const AttributeFilter & | attribute_filter ) |
Definition at line 1486 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(), this, 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 CurvesGeometry::resize | ( | int | points_num, |
| int | curves_num ) |
Change the number of curves and/or points.
Definition at line 1171 of file curves_geometry.cc.
References BLI_assert, CurvesGeometry::curve_data, CurvesGeometry::curve_num, CurvesGeometry::curve_offsets, blender::bke::CurvesGeometryRuntime::curve_offsets_sharing_info, curves_num(), CustomData_realloc(), CurvesGeometry::point_data, CurvesGeometry::point_num, points_num(), blender::implicit_sharing::resize_trivial_array(), tag_topology_changed(), and this.
Referenced by blender::geometry::add_curves_on_mesh(), 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::geometry::create_curves_for_faces(), blender::bke::curves_copy_curve_selection(), blender::geometry::extend_curves(), blender::io::grease_pencil::extend_curves_geometry(), 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::nodes::node_geo_interpolate_curves_cc::generate_interpolated_curves(), blender::ed::object::mesh_data_to_grease_pencil(), blender::io::usd::USDBasisCurvesReader::read_curve_sample(), blender::io::alembic::AbcCurveReader::read_curves_sample(), 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(), and blender::geometry::trim_curves().
| VArray< int > 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 428 of file curves_geometry.cc.
References blender::bke::ATTR_RESOLUTION, blender::bke::Curve, and get_varray_attribute().
Referenced by blender::nodes::node_geo_curve_spline_parameter_cc::calculate_point_lengths(), blender::geometry::compute_curve_trim_parameters(), blender::io::alembic::ABCCurveWriter::create_alembic_objects(), blender::nodes::node_geo_input_tangent_cc::curve_tangent_point_domain(), evaluated_normals(), evaluated_positions(), interpolate_to_evaluated(), and interpolate_to_evaluated().
| MutableSpan< int > CurvesGeometry::resolution_for_write | ( | ) |
Mutable access to curve resolution. Call tag_topology_changed after changes.
Definition at line 432 of file curves_geometry.cc.
References blender::bke::ATTR_RESOLUTION, blender::bke::Curve, and get_mutable_attribute().
Referenced by blender::nodes::node_geo_curve_primitive_bezier_segment_cc::create_bezier_segment_curve(), and blender::io::alembic::AbcCurveReader::read_curves_sample().
| void 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 1624 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, attributes(), attributes_for_write(), CD_PROP_STRING, blender::Set< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::contains(), blender::bke::attribute_math::convert_to_static_type(), CurvesGeometry::custom_knots, blender::bke::AttributeIter::data_type, blender::bke::AttributeIter::domain, blender::bke::GSpanAttributeWriter::finish(), blender::index_mask::IndexMask::foreach_index(), handle_positions_left_for_write(), handle_positions_right_for_write(), handle_types_left_for_write(), handle_types_right_for_write(), 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::GSpanAttributeWriter::span, tag_topology_changed(), and blender::GMutableSpan::type().
Referenced by blender::nodes::node_geo_curve_reverse_cc::reverse_curve().
UV coordinate for each curve that encodes where the curve is attached to the surface mesh.
Definition at line 518 of file curves_geometry.cc.
References blender::bke::ATTR_SURFACE_UV_COORDINATE, blender::bke::Curve, and get_span_attribute().
Referenced by blender::geometry::calc_position_with_interpolation(), blender::nodes::node_geo_deform_curves_on_surface_cc::node_geo_exec(), and blender::io::hydra::CurvesData::write_curves().
| MutableSpan< float2 > CurvesGeometry::surface_uv_coords_for_write | ( | ) |
Definition at line 523 of file curves_geometry.cc.
References blender::bke::ATTR_SURFACE_UV_COORDINATE, blender::bke::Curve, and get_mutable_attribute().
Referenced by blender::geometry::add_curves_on_mesh().
| void CurvesGeometry::tag_material_index_changed | ( | ) |
Call after changing the "material_index" attribute.
Definition at line 1220 of file curves_geometry.cc.
References blender::bke::CurvesGeometryRuntime::max_material_index_cache, and blender::SharedCache< T >::tag_dirty().
| void CurvesGeometry::tag_normals_changed | ( | ) |
Call after changing the "tilt" or "up" attributes.
Definition at line 1212 of file curves_geometry.cc.
References blender::bke::CurvesGeometryRuntime::evaluated_normal_cache.
Referenced by blender::nodes::node_geo_set_curve_normal_cc::set_curve_normal().
| void CurvesGeometry::tag_positions_changed | ( | ) |
Call after deforming the position attribute.
Definition at line 1194 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 ED_transverts_update_obedit(), 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::nodes::node_geo_deform_curves_on_surface_cc::node_geo_exec(), blender::io::grease_pencil::shape_attributes_to_curves(), tag_topology_changed(), transform(), and translate().
| void 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 1216 of file curves_geometry.cc.
References blender::bke::CurvesGeometryRuntime::bounds_with_radius_cache.
Referenced by blender::geometry::calc_radius_without_interpolation(), blender::deform_drawing_as_envelope(), and blender::io::grease_pencil::shape_attributes_to_curves().
| void CurvesGeometry::tag_topology_changed | ( | ) |
Call after any operation that changes the topology (number of points, evaluated points, or the total count).
Definition at line 1203 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::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(), blender::geometry::debug_randomize_curve_order(), blender::io::grease_pencil::extend_curves_geometry(), fill_curve_types(), fill_curve_types(), blender::ed::sculpt_paint::grease_pencil_apply_fill(), blender::geometry::join_curves_ranges(), blender::geometry::reorder_and_flip_curves(), resize(), reverse_curves(), blender::nodes::node_geo_curve_set_handle_type_cc::set_handle_type(), and blender::geometry::trim_curves().
| VArray< float > CurvesGeometry::tilt | ( | ) | const |
The angle used to rotate evaluated normals around the tangents after their calculation. Call tag_normals_changed after changes.
Definition at line 446 of file curves_geometry.cc.
References blender::bke::ATTR_TILT, get_varray_attribute(), and blender::bke::Point.
Referenced by evaluated_normals().
| MutableSpan< float > CurvesGeometry::tilt_for_write | ( | ) |
Definition at line 450 of file curves_geometry.cc.
References blender::bke::ATTR_TILT, get_mutable_attribute(), and blender::bke::Point.
| void CurvesGeometry::transform | ( | const float4x4 & | matrix | ) |
Definition at line 1302 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(), is_empty(), positions_for_write(), tag_positions_changed(), blender::bke::transform_custom_normal_attribute(), and transform_positions().
Referenced by blender::nodes::node_geo_string_to_curves_cc::create_curve_instances(), blender::ed::greasepencil::join_curves(), and blender::geometry::join_curves().
| void CurvesGeometry::translate | ( | const float3 & | translation | ) |
Definition at line 1275 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(), is_empty(), 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 CurvesGeometry::update_curve_types | ( | ) |
Update the cached count of curves of each type, necessary after curve_types_for_write.
Definition at line 379 of file curves_geometry.cc.
References blender::bke::calculate_type_counts(), curve_types(), and CurvesGeometry::runtime.
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::bke::curves_copy_curve_selection(), blender::nodes::node_geo_duplicate_elements_cc::duplicate_curves_CurveGeometry(), blender::geometry::extract_greasepencil_layer_curves(), blender::geometry::extract_greasepencil_layer_points(), blender::ed::greasepencil::extrude_grease_pencil_curves(), fill_curve_types(), remove_curves(), remove_points(), blender::geometry::remove_points_and_split(), blender::ed::curves::resize_curves(), and blender::io::grease_pencil::shape_attributes_to_curves().