Blender V5.3
blender::MutableSpan< T > Class Template Reference

#include <BLI_span.hh>

Public Types

using value_type = T
using pointer = T *
using const_pointer = const T *
using reference = T &
using const_reference = const T &
using iterator = T *
using size_type = int64_t

Public Member Functions

constexpr MutableSpan ()=default
constexpr MutableSpan (T *start, const int64_t size)
constexpr MutableSpan (std::vector< T > &vector)
template<std::size_t N>
constexpr MutableSpan (std::array< T, N > &array)
template<typename U>
requires (is_span_convertible_pointer_v<U, T>)
constexpr MutableSpan (MutableSpan< U > span)
constexpr operator Span< T > () const
template<typename U>
requires (is_span_convertible_pointer_v<T, U>)
constexpr operator Span< U > () const
constexpr int64_t size () const
constexpr int64_t size_in_bytes () const
constexpr bool is_empty () const
constexpr void fill (const T &value) const
template<typename IndexT>
constexpr void fill_indices (Span< IndexT > indices, const T &value) const
constexpr T * data () const
constexpr T * begin () const
constexpr T * end () const
constexpr std::reverse_iterator< T * > rbegin () const
constexpr std::reverse_iterator< T * > rend () const
constexpr T & operator[] (const int64_t index) const
constexpr MutableSpan slice (const int64_t start, const int64_t size) const
constexpr MutableSpan slice (IndexRange range) const
constexpr MutableSpan slice_safe (const int64_t start, const int64_t size) const
constexpr MutableSpan slice_safe (IndexRange range) const
constexpr MutableSpan drop_front (const int64_t n) const
constexpr MutableSpan drop_back (const int64_t n) const
constexpr MutableSpan take_front (const int64_t n) const
constexpr MutableSpan take_back (const int64_t n) const
constexpr void reverse () const
constexpr Span< T > as_span () const
constexpr IndexRange index_range () const
constexpr T & first () const
constexpr T & last (const int64_t n=0) const
constexpr int64_t count (const T &value) const
constexpr bool contains (const T &value) const
constexpr bool contains_ptr (const T *ptr) const
constexpr void copy_from (Span< T > values) const
template<typename NewT>
constexpr MutableSpan< NewT > cast () const

Protected Attributes

T * data_ = nullptr
int64_t size_ = 0

Detailed Description

template<typename T>
class blender::MutableSpan< T >

Mostly the same as Span, except that one can change the array elements through a MutableSpan.

Definition at line 447 of file BLI_span.hh.

Member Typedef Documentation

◆ const_pointer

template<typename T>
using blender::MutableSpan< T >::const_pointer = const T *

Definition at line 451 of file BLI_span.hh.

◆ const_reference

template<typename T>
using blender::MutableSpan< T >::const_reference = const T &

Definition at line 453 of file BLI_span.hh.

◆ iterator

template<typename T>
using blender::MutableSpan< T >::iterator = T *

Definition at line 454 of file BLI_span.hh.

◆ pointer

template<typename T>
using blender::MutableSpan< T >::pointer = T *

Definition at line 450 of file BLI_span.hh.

◆ reference

template<typename T>
using blender::MutableSpan< T >::reference = T &

Definition at line 452 of file BLI_span.hh.

◆ size_type

template<typename T>
using blender::MutableSpan< T >::size_type = int64_t

Definition at line 455 of file BLI_span.hh.

◆ value_type

template<typename T>
using blender::MutableSpan< T >::value_type = T

Definition at line 449 of file BLI_span.hh.

Constructor & Destructor Documentation

◆ MutableSpan() [1/5]

template<typename T>
blender::MutableSpan< T >::MutableSpan ( )
constexprdefault

Referenced by blender::ed::greasepencil::ImageBufferAccessor::acquire(), blender::LinearAllocator< Allocator >::allocate_array(), blender::apply_to_curves_point_selection(), blender::bke::attribute_legacy_convert_customdata_to_storage(), blender::BKE_animdata_build_driver_target_map(), blender::BKE_defvert_normalize_ex(), blender::BKE_mesh_nomain_to_meshkey(), blender::nodes::socket_items::blend_read_data(), blender::BLI_rng_get_char_n(), blender::C_BVHTree_FromObject(), cast(), blender::gpu::convert_per_component(), blender::gpu::convert_per_pixel(), blender::io::hydra::copy_submesh(), blender::ed::transform::pointcloud::createTransPointCloudVerts(), blender::bke::curves_copy_parameters(), blender::gpu::VertBuf::data(), blender::data_transfer_layersmapping_generate(), blender::deform_verts(), drop_back(), drop_front(), blender::find_old_seam_layer(), blender::geometry::fit_poly_to_bezier_curves(), blender::bke::flip_custom_data_type(), blender::VMutableArray< T >::get_internal_span(), blender::GPU_indexbuf_build_from_memory(), blender::layerDefault_propfloat4x4(), blender::layerDefault_propquaternion(), blender::layerFree_grid_paint_mask(), blender::layerFree_mdeformvert(), blender::layerFree_mdisps(), blender::bke::greasepencil::convert::legacy_gpencil_frame_to_grease_pencil_drawing(), blender::lineart_geometry_object_load(), blender::bke::VArrayImpl_For_VertexWeights::materialize(), MutableSpan(), MutableSpan(), MutableSpan(), blender::nodes::node_geo_boolean_cc::node_geo_exec(), blender::io::usd::USDMeshReadData::normals_for_write(), blender::object_foreach_path(), blender::Array< blender::ActKeyColumn >::operator MutableSpan< blender::ActKeyColumn >(), blender::Array< Slot, LoadFactor::compute_total_slots(InlineBufferCapacity, LOAD_FACTOR), Allocator >::operator MutableSpan< U >(), blender::bke::orco_coord_layer_ensure(), blender::pointcloud_copy_parameters(), blender::bke::CurvesEditHints::positions_for_write(), blender::ed::curves::set_attribute_invoke(), blender::ed::pointcloud::set_attribute_invoke(), blender::nodes::socket_items::set_item_name_and_make_unique(), slice(), slice(), slice_safe(), slice_safe(), blender::ed::geometry::store_attributes_to_shape_keys(), take_back(), take_front(), blender::math::TEST(), blender::tests::TEST(), blender::gpu::tests::test_index_buffer_copy_sub(), blender::GMutableSpan::typed(), blender::um_arraystore_cd_clear(), blender::um_arraystore_cd_create(), blender::um_arraystore_cd_expand(), and blender::bke::greasepencil::update_triangle_and_offsets_cache().

◆ MutableSpan() [2/5]

template<typename T>
blender::MutableSpan< T >::MutableSpan ( T * start,
const int64_t size )
inlineconstexpr

Definition at line 464 of file BLI_span.hh.

References data_, size(), size_, and T.

◆ MutableSpan() [3/5]

template<typename T>
blender::MutableSpan< T >::MutableSpan ( std::vector< T > & vector)
inlineconstexpr

Definition at line 466 of file BLI_span.hh.

References data(), MutableSpan(), and size().

◆ MutableSpan() [4/5]

template<typename T>
template<std::size_t N>
blender::MutableSpan< T >::MutableSpan ( std::array< T, N > & array)
inlineconstexpr

Definition at line 469 of file BLI_span.hh.

References data(), MutableSpan(), and N.

◆ MutableSpan() [5/5]

template<typename T>
template<typename U>
requires (is_span_convertible_pointer_v<U, T>)
blender::MutableSpan< T >::MutableSpan ( MutableSpan< U > span)
inlineconstexpr

Support implicit conversions like the one below: MutableSpan<T *> -> MutableSpan<const T *>

Definition at line 478 of file BLI_span.hh.

References data(), data_, blender::is_span_convertible_pointer_v, MutableSpan(), size(), size_, and T.

Member Function Documentation

◆ as_span()

template<typename T>
Span< T > blender::MutableSpan< T >::as_span ( ) const
inlineconstexpr

Returns an (immutable) Span that references the same array. This is usually not needed, due to implicit conversions. However, sometimes automatic type deduction needs some help.

Definition at line 667 of file BLI_span.hh.

References data_, size_, and blender::Span< T >::Span().

Referenced by blender::ed::sculpt_paint::cloth::apply_grab_brush(), blender::ed::sculpt_paint::mask::apply_mask_bmesh(), blender::ed::sculpt_paint::mask::apply_mask_grids(), blender::ed::sculpt_paint::mask::apply_mask_mesh(), blender::ed::sculpt_paint::cloth::apply_snake_hook_brush(), blender::ed::sculpt_paint::smooth::blur_geometry_data_array(), blender::ed::sculpt_paint::boundary::calc_bend_bmesh(), blender::ed::sculpt_paint::boundary::calc_bend_grids(), blender::ed::sculpt_paint::pose::calc_bmesh(), blender::ed::sculpt_paint::cloth::calc_constraint_factors(), blender::draw::calc_face_tri_starts_mesh(), blender::ed::sculpt_paint::boundary::calc_grab_bmesh(), blender::ed::sculpt_paint::boundary::calc_grab_grids(), blender::ed::sculpt_paint::pose::calc_grids(), blender::ed::sculpt_paint::boundary::calc_inflate_bmesh(), blender::ed::sculpt_paint::boundary::calc_inflate_grids(), blender::ed::sculpt_paint::boundary::calc_slide_bmesh(), blender::ed::sculpt_paint::boundary::calc_slide_grids(), blender::ed::sculpt_paint::boundary::calc_smooth_bmesh(), blender::ed::sculpt_paint::boundary::calc_smooth_grids(), blender::ed::sculpt_paint::filter::calc_surface_smooth_filter(), blender::ed::sculpt_paint::boundary::calc_twist_bmesh(), blender::ed::sculpt_paint::boundary::calc_twist_grids(), blender::geometry::copy_and_reorder_curves(), blender::geometry::copy_and_reorder_mesh_faces(), blender::geometry::curve_simplify(), blender::ed::sculpt_paint::mask::decrease_contrast_mask_bmesh(), blender::ed::sculpt_paint::mask::decrease_contrast_mask_grids(), blender::deform_drawing_as_envelope(), blender::ed::sculpt_paint::color::do_paint_brush_task(), blender::draw::extract_vert_normals_mesh(), blender::ed::sculpt_paint::face_set::face_hide_update(), blender::ed::sculpt_paint::face_set::face_sets_update(), blender::ed::sculpt_paint::mask::increase_contrast_mask_bmesh(), blender::ed::sculpt_paint::mask::increase_contrast_mask_grids(), blender::ed::sculpt_paint::filter::mesh_filter_sharpen_init(), blender::bke::tests::ArmatureDeformTestBase::mesh_test(), blender::geometry::reorder_and_flip_curves(), blender::geometry::resample_to_uniform(), blender::ed::sculpt_paint::undo::restore_position_mesh(), blender::RNA_property_boolean_get_array(), blender::RNA_property_float_get_array(), blender::RNA_property_int_get_array(), blender::ed::sculpt_paint::color::sculpt_color_presmooth_init(), blender::bke::tests::TEST_F(), and blender::bke::tests::TEST_F().

◆ begin()

◆ cast()

◆ contains()

template<typename T>
bool blender::MutableSpan< T >::contains ( const T & value) const
inlineconstexpr

Does a linear search to see of the value is in the array. Returns true if it is, otherwise false.

Definition at line 721 of file BLI_span.hh.

References blender::element, and T.

Referenced by blender::tests::TEST(), and blender::tests::TEST().

◆ contains_ptr()

template<typename T>
bool blender::MutableSpan< T >::contains_ptr ( const T * ptr) const
inlineconstexpr

Does a constant time check to see if the pointer points to a value in the referenced array. Return true if it is, otherwise false.

Definition at line 735 of file BLI_span.hh.

References begin(), end(), and T.

◆ copy_from()

template<typename T>
void blender::MutableSpan< T >::copy_from ( Span< T > values) const
inlineconstexpr

Copy all values from another span into this span. This invokes undefined behavior when the destination contains uninitialized data and T is not trivially copy constructible. The size of both spans is expected to be the same.

Definition at line 745 of file BLI_span.hh.

References blender::BLI_assert(), blender::Span< T >::data(), data_, blender::initialized_copy_n(), blender::Span< T >::size(), and size_.

Referenced by blender::ed::curves::add_curves(), blender::geometry::add_curves_on_mesh(), blender::bke::add_orco_mesh(), blender::ed::curves::append_point_knots(), blender::BKE_mesh_orco_ensure(), blender::BKE_mesh_wrapper_vert_coords_copy(), blender::BKE_modifier_deform_verts(), blender::geometry::construct::build_output_mesh(), blender::geometry::quad::calc_corner_tris(), blender::ed::sculpt_paint::filter::calc_inflate_filter(), blender::ed::sculpt_paint::filter::calc_random_filter(), blender::ed::sculpt_paint::filter::calc_scale_filter(), blender::bke::subdiv::calculate_limit_positions(), blender::bke::curves::nurbs::copy_custom_knots(), blender::ed::sculpt_paint::cloth::copy_normals_to_array(), blender::geometry::copy_point_data_between_endpoints(), blender::ed::sculpt_paint::cloth::copy_positions_to_array(), blender::nodes::node_geo_duplicate_elements_cc::copy_stable_id_curves(), blender::ed::curves::tests::create_curves(), blender::ed::greasepencil::create_drawing_data(), blender::bke::curve_legacy_to_curves(), blender::ed::sculpt_paint::cloth::do_simulation_step(), blender::draw::extract_normals(), blender::geometry::fit_poly_to_bezier_curves(), blender::ed::sculpt_paint::gather_data_grids(), blender::array_utils::gather_group_to_group(), blender::gpu_select_next_set_result(), blender::nodes::node_geo_points_to_curves_cc::identifiers_to_indices(), blender::ed::mesh::join_shape_keys(), blender::geometry::merge_propagation_map(), blender::bke::mesh_apply_spatial_organization(), blender::bke::mesh_get_mapped_verts_coords(), blender::geometry::mix_arrays(), blender::ed::sculpt_paint::move_last_point_and_resample(), blender::move_shapekey_layers_to_keyblocks(), blender::multires_reshape_apply_base_update_shape_key(), blender::geometry::p_chart_abf_solve(), blender::ed::sculpt_paint::greasepencil::PaintOperationExecutor::process_extension_sample(), blender::io::usd::USDBasisCurvesReader::read_curve_sample(), blender::io::usd::USDNurbsReader::read_curve_sample(), blender::io::alembic::AbcCurveReader::read_curves_sample(), blender::io::usd::USDPointInstancerReader::read_geometry(), blender::io::usd::USDPointsReader::read_geometry(), blender::geometry::reverse_samples(), blender::geometry::sample_interval_bezier(), blender::ed::sculpt_paint::scatter_data_grids(), blender::bke::calc_edges::serialize_and_initialize_deduplicated_edges(), blender::ed::object::shape_key_apply_to_basis_exec(), blender::ed::sculpt_paint::mask::smooth_mask_bmesh(), blender::ed::sculpt_paint::mask::smooth_mask_grids(), blender::ed::sculpt_paint::mask::smooth_mask_mesh(), blender::geometry::curve_constraints::solve_length_and_collision_constraints(), blender::gpu::sort_input_list(), blender::math::transform_normals(), blender::math::transform_points(), and blender::update_custom_knots().

◆ count()

template<typename T>
int64_t blender::MutableSpan< T >::count ( const T & value) const
inlineconstexpr

Does a linear search to count how often the value is in the array. Returns the number of occurrences.

Definition at line 706 of file BLI_span.hh.

References blender::element, and T.

◆ data()

template<typename T>
T * blender::MutableSpan< T >::data ( ) const
inlineconstexpr

Returns a pointer to the beginning of the referenced array. This may be nullptr, when the size is zero.

Definition at line 545 of file BLI_span.hh.

References data_, and T.

Referenced by blender::bke::calc_edges::add_existing_edges_to_hash_maps(), blender::bke::calc_edges::add_face_edges_to_hash_maps(), blender::ed::object::armature_coords_and_quats_get(), blender::BKE_keyblock_data_get_from_shape(), blender::bmo_flatten_exec(), blender::draw::build_poly_other_map_vbo(), blender::geometry::ngon::calc_corner_tris(), blender::ed::curves::compress_intervals(), blender::LinearAllocator< Allocator >::construct_array_copy(), blender::gpu::convert_buffer(), blender::index_mask::copy_assign(), blender::io::obj::copy_property_from_node(), blender::correctivesmooth_modifier_do(), blender::deform_verts(), blender::deform_verts(), blender::deform_verts_EM(), blender::displaceModifier_do(), blender::ed::object::edit_armature_coords_and_quats_get(), blender::enum_property_items_from_menu_node_socket(), blender::index_mask::evaluate_exact_with_indices(), blender::draw::extract_edge_factor(), blender::draw::extract_edit_data(), blender::draw::extract_edit_data_subdiv(), blender::draw::extract_edituv_data(), blender::draw::extract_edituv_data_subdiv(), blender::draw::extract_edituv_stretch_angle(), blender::draw::extract_edituv_stretch_area(), blender::draw::extract_face_dot_normals(), blender::draw::extract_face_dots_edituv_data(), blender::draw::extract_face_dots_position(), blender::draw::extract_face_dots_uv(), blender::draw::extract_face_index_subdiv(), blender::draw::extract_mesh_analysis(), blender::draw::extract_normals(), blender::draw::extract_orco(), blender::draw::extract_paint_overlay_flags(), blender::draw::extract_sculpt_data(), blender::draw::extract_tangents(), blender::draw::extract_uv_maps(), blender::draw::extract_vert_index_subdiv(), blender::draw::extract_weights(), blender::draw::pbvh::fill_face_sets_grids(), blender::draw::pbvh::fill_masks_grids(), blender::draw::pbvh::fill_normals_grids(), blender::draw::pbvh::fill_positions_grids(), blender::draw::pbvh::fill_uvs_grids(), blender::nodes::node_fn_format_string_cc::format_strings(), blender::index_mask::IndexMask::from_segments(), blender::index_mask::gather_assign(), blender::opensubdiv::EvalOutputAPI::getPatchMap(), blender::math::interp_weights_poly(), blender::io::usd::make_safe_identifier(), blender::VArrayCommon< T >::materialize(), blender::VArrayCommon< T >::materialize_compressed(), blender::VArrayCommon< T >::materialize_compressed_to_uninitialized(), blender::VArrayCommon< T >::materialize_to_uninitialized(), blender::mathutils_array_parse_alloc_viseq(), blender::bke::mesh_calc_edges(), blender::bke::mesh_skin_to_legacy(), blender::ed::object::metaball_coords_and_quats_get(), blender::modify_mesh(), MutableSpan(), MutableSpan(), MutableSpan(), blender::normalEditModifier_do_directional(), blender::normalEditModifier_do_radial(), blender::ed::sculpt_paint::image::paint_blend_pixels_color_managed(), blender::ed::sculpt_paint::PositionDeformData::PositionDeformData(), blender::property_boolean_get_array(), blender::property_float_get_array(), blender::property_int_get_array(), blender::ed::sculpt_paint::undo::restore_position_from_undo_step(), blender::RNA_property_boolean_get_array(), blender::RNA_property_float_get_array(), blender::RNA_property_int_get_array(), blender::bke::calc_edges::serialize_and_initialize_deduplicated_edges(), blender::index_mask::IndexMask::shift(), blender::shrinkwrapParams_deform(), blender::gpu::sort_input_list(), blender::draw::statvis_calc_thickness(), blender::tests::TEST(), blender::tests::TEST_F(), blender::index_mask::IndexMask::to_indices(), blender::ed::curves::convert_to_particle_system::try_convert_single_object(), blender::draw::pbvh::update_face_sets_bmesh(), blender::draw::pbvh::update_face_sets_mesh(), blender::draw::pbvh::update_generic_attribute_bmesh(), blender::draw::pbvh::update_generic_attribute_grids(), blender::draw::pbvh::update_masks_bmesh(), blender::draw::pbvh::update_masks_mesh(), blender::draw::pbvh::update_normals_bmesh(), blender::draw::pbvh::update_normals_mesh(), blender::draw::pbvh::update_positions_bmesh(), blender::gpu::GLTexture::update_sub(), blender::gpu::MTLTexture::update_sub(), blender::bke::greasepencil::update_triangle_and_offsets_cache(), blender::opensubdiv::GPUVertexBuffer::UpdateData(), and blender::version_nodes_insert_item().

◆ drop_back()

◆ drop_front()

◆ end()

◆ fill()

template<typename T>
void blender::MutableSpan< T >::fill ( const T & value) const
inlineconstexpr

Replace all elements in the referenced array with the given value.

Definition at line 523 of file BLI_span.hh.

References data_, blender::initialized_fill_n(), size_, and T.

Referenced by blender::bke::adapt_curve_domain_point_to_curve_impl(), blender::bke::adapt_mesh_domain_corner_to_edge_impl(), blender::bke::adapt_mesh_domain_corner_to_point_impl(), blender::bke::adapt_mesh_domain_edge_to_corner_impl(), blender::bke::adapt_mesh_domain_edge_to_point_impl(), blender::bke::adapt_mesh_domain_face_to_edge_impl(), blender::ed::sculpt_paint::cloth::apply_filter_forces_bmesh(), blender::ed::sculpt_paint::cloth::apply_filter_forces_grids(), blender::ed::sculpt_paint::cloth::apply_filter_forces_mesh(), blender::ed::sculpt_paint::mask::apply_mask_bmesh(), blender::ed::sculpt_paint::mask::apply_mask_grids(), blender::ed::sculpt_paint::mask::apply_mask_mesh(), blender::index_mask::build_reverse_map(), blender::ed::sculpt_paint::pose::calc_bmesh(), blender::nodes::node_geo_dual_mesh_cc::calc_boundaries(), blender::ed::sculpt_paint::pose::calc_grids(), blender::geometry::calc_position_with_interpolation(), blender::geometry::quad::calc_quad_directions(), blender::geometry::calc_radius_with_interpolation(), blender::geometry::calculate_cone_faces(), blender::geometry::calculate_sphere_faces(), blender::bke::curves::poly::calculate_tangents(), blender::ed::greasepencil::control_point_colors_and_sizes(), blender::bke::copy_main_point_data_to_mesh_edges(), blender::bke::copy_main_point_data_to_mesh_faces(), blender::bke::copy_main_point_data_to_mesh_verts(), blender::bke::copy_profile_point_data_to_mesh_edges(), blender::create_envelope_strokes_for_curve(), blender::ed::sculpt_paint::face_set::create_op_exec(), blender::geometry::create_result_ids(), blender::bke::tests::GreasePencilInterpolate::create_test_shape(), blender::nodes::node_geo_curve_fill_cc::curve_fill_calculate(), blender::nodes::node_geo_points_to_curves_cc::curves_from_points(), blender::ed::sculpt_paint::image::do_paint_pixels(), blender::nodes::node_geo_duplicate_elements_cc::duplicate_instances(), blender::duplicate_strokes(), blender::geometry::execute_realize_curve_task(), blender::geometry::extend_curves(), blender::draw::extract_edge_factor(), blender::draw::extract_lines_loose_geom_subdiv(), blender::draw::extract_paint_overlay_flags(), blender::draw::extract_paint_overlay_flags(), blender::draw::extract_sculpt_data_subdiv(), blender::draw::extract_weights(), blender::draw::extract_weights_bm(), blender::draw::extract_weights_mesh(), blender::geometry::fill_bezier_data(), blender::ed::sculpt_paint::fill_factor_from_hide(), blender::ed::sculpt_paint::fill_factor_from_hide(), blender::ed::sculpt_paint::face_set::fill_factor_from_hide_and_mask(), blender::ed::sculpt_paint::fill_factor_from_hide_and_mask(), blender::ed::sculpt_paint::fill_factor_from_hide_and_mask(), blender::ed::sculpt_paint::mask::fill_mask_grids(), blender::ed::greasepencil::find_curve_intersections(), blender::ed::sculpt_paint::greasepencil::find_curve_mapping_from_index(), blender::geometry::fit_poly_to_bezier_curves(), blender::ed::sculpt_paint::image::fix_non_manifold_seam_bleeding(), blender::ed::sculpt_paint::mask::gather_mask_grids(), blender::array_utils::gather_to_groups(), blender::nodes::node_geo_sample_nearest_cc::get_closest_pointcloud_points(), blender::io::obj::OBJMesh::get_face_deform_group_index(), blender::draw::grease_pencil_edit_batch_ensure(), blender::nodes::node_geo_curve_to_mesh_cc::grease_pencil_to_mesh(), blender::nodes::socket_usage_inference::infer_group_interface_usage(), blender::bke::subdiv::initialize_vert_sharpness(), blender::geometry::join_curves_ranges(), blender::nodes::node_geo_curve_to_points_cc::layer_pointclouds_to_instances(), blender::bke::mark_bezier_vector_edges_sharp(), blender::bke::mesh_calc_edges(), blender::bke::mesh_get_mapped_verts_coords(), blender::geometry::ngon_indices_of_tris(), blender::nodes::node_geo_import_obj::node_geo_exec(), blender::ed::greasepencil::primitive_calculate_curve_positions(), blender::geometry::ramer_douglas_peucker(), blender::ed::greasepencil::ramer_douglas_peucker_simplify(), blender::io::usd::USDBasisCurvesReader::read_curve_sample(), blender::io::usd::USDNurbsReader::read_curve_sample(), blender::offset_indices::reverse_indices_in_groups_counting(), blender::geometry::sample_catmull_rom_curve_positions_handles(), blender::geometry::sample_curve_padded(), blender::geometry::sample_curve_uniform(), blender::geometry::sample_poly_curve_positions_handles(), blender::nodes::node_geo_curve_handle_type_selection_cc::select_by_handle_type(), blender::ed::sculpt_paint::select_random::select_random_exec(), blender::geometry::subdivide_bezier_segment(), blender::tests::TEST(), blender::tests::TEST_F(), blender::tests::TEST_F(), blender::tests::TEST_F(), and blender::index_mask::IndexMask::to_bools().

◆ fill_indices()

template<typename T>
template<typename IndexT>
void blender::MutableSpan< T >::fill_indices ( Span< IndexT > indices,
const T & value ) const
inlineconstexpr

◆ first()

template<typename T>
T & blender::MutableSpan< T >::first ( ) const
inlineconstexpr

Return a reference to the first element in the array. This invokes undefined behavior when the array is empty.

Definition at line 685 of file BLI_span.hh.

References blender::BLI_assert(), data_, size_, and T.

Referenced by blender::ed::greasepencil::add_single_curve(), blender::ed::greasepencil::build_curves_2d_bvh_from_visible(), blender::ed::curves::calc_curves_extrusion(), blender::ed::curves::calc_new_offsets(), blender::geometry::calculate_angles(), blender::bke::curves::bezier::calculate_auto_handles(), blender::geometry::calculate_cone_faces(), blender::bke::curves::bezier::calculate_evaluated_offsets(), blender::bke::curves::bezier::calculate_evaluated_positions(), blender::bke::curves::poly::calculate_normals_minimum(), blender::geometry::calculate_result_offsets(), blender::geometry::calculate_result_offsets(), blender::geometry::calculate_sphere_vertex_data(), blender::bke::curves::poly::calculate_tangents(), blender::geometry::catmull_rom_to_bezier_handles(), blender::geometry::convert_curves_to_bezier(), blender::create_array_copies(), blender::nodes::node_geo_curve_primitive_bezier_segment_cc::create_bezier_segment_curve(), blender::nodes::node_geo_mesh_primitive_circle_cc::create_circle_mesh(), blender::bke::curves::catmull_rom::evaluate_segment(), blender::draw::grease_pencil_geom_batch_ensure(), blender::bke::curves::bezier::interpolate_to_evaluated(), blender::bke::curves::catmull_rom::interpolate_to_evaluated(), blender::geometry::limit_radii(), blender::bke::curves::bezier::linear_interpolation(), blender::geometry::linear_interpolation(), blender::geometry::merge_propagation_map(), blender::bke::pbvh::partition_material_indices(), blender::io::usd::USDBasisCurvesReader::read_curve_sample(), blender::geometry::sample_curve_padded(), blender::bke::tests::TEST_F(), and blender::bke::tests::TEST_F().

◆ index_range()

template<typename T>
IndexRange blender::MutableSpan< T >::index_range ( ) const
inlineconstexpr

Utility to make it more convenient to iterate over all indices that can be used with this array.

Definition at line 676 of file BLI_span.hh.

References blender::IndexRange::IndexRange(), and size_.

Referenced by blender::offset_indices::accumulate_counts_to_offsets(), blender::offset_indices::accumulate_counts_to_offsets_with_overflow_check(), blender::ed::object::add_arrays(), blender::ed::sculpt_paint::pose::add_arrays(), blender::ed::sculpt_paint::apply_hardness_to_distances(), blender::ed::object::apply_objects_internal(), blender::ed::sculpt_paint::apply_translations(), blender::bke::armature_deform_coords(), blender::bke::greasepencil::assign_to_vertex_group(), blender::ed::greasepencil::bake_grease_pencil_animation_exec(), blender::BKE_mesh_legacy_uv_seam_from_flags(), blender::BKE_mesh_mirror_apply_mirror_on_axis_for_modifier(), blender::BKE_mesh_orco_verts_transform(), blender::ed::blend_linear(), blender::ed::blend_linear(), blender::nodes::node_geo_blur_attribute_cc::blur_on_mesh_exec(), blender::bm_to_mesh_edges(), blender::bm_to_mesh_loops(), blender::bke::pbvh::build_nodes_recursive_grids(), blender::bke::pbvh::build_nodes_recursive_mesh(), blender::bke::build_offsets(), blender::ed::animrig::build_transformable_relations(), blender::nodes::node_geo_blur_attribute_cc::build_vert_to_vert_by_edge_map(), blender::ed::sculpt_paint::calc_front_face(), blender::ed::sculpt_paint::cloth::calc_gravity_forces(), blender::ed::sculpt_paint::cloth::calc_pinch_forces(), blender::ed::sculpt_paint::image::calc_pixel_row_positions(), blender::bke::compare_geometry::calc_smallest_corner_ids(), blender::geometry::calc_straight_curve_positions(), blender::nodes::node_geo_field_average_cc::calculate_median(), blender::bke::curves::poly::calculate_normals_minimum(), blender::bke::curves::poly::calculate_normals_z_up(), blender::calculate_target_locations(), blender::cloth_make_rest_mesh(), blender::compute_masked_verts(), blender::nodes::node_geo_interpolate_curves_cc::compute_point_counts_per_child(), blender::compute_vertex_mask__armature_mode(), blender::compute_vertex_mask__vertex_group_mode(), blender::index_mask::consolidate_index_mask_segments(), blender::ed::greasepencil::control_point_colors_and_sizes(), blender::geometry::convert_curves_to_bezier(), blender::nodes::node_geo_curve_spline_parameter_cc::convert_lengths_to_factors(), blender::bke::curves::nurbs::copy_custom_knots(), blender::geometry::copy_generic_attributes_to_result(), blender::nodes::node_geo_mesh_primitive_circle_cc::create_circle_mesh(), blender::geometry::create_merged_mesh(), blender::geometry::create_nurbs_to_bezier_positions(), blender::geometry::create_result_ids(), blender::bke::tests::ArmatureDeformTestBase::create_test_curves_object(), blender::bke::tests::ArmatureDeformTestBase::create_test_grease_pencil_object(), blender::bke::tests::ArmatureDeformTestBase::create_test_mesh(), blender::bke::tests::GreasePencilInterpolate::create_test_shape(), blender::ed::transform::curves::createTransCurvesVerts(), blender::ed::transform::greasepencil::createTransGreasePencilVerts(), blender::ed::transform::pointcloud::createTransPointCloudVerts(), blender::bke::bake::deserialize_typed_array(), blender::ed::greasepencil::dilate(), blender::ed::sculpt_paint::color::do_color_smooth_task(), blender::do_pose_tag_select_op_exec(), blender::draw::DRW_subdivide_loose_geom(), blender::bke::compare_geometry::edges_from_vert_sets(), blender::ed::animrig::ensure_baked_fcurves(), blender::ed::greasepencil::erode(), blender::bke::curves::catmull_rom::evaluate_segment(), blender::geometry::extend_curves(), blender::bke::pbvh::uv_islands::extract_border_from_edges(), blender::geometry::extract_real_geometries_recursive(), blender::draw::extract_weights_mesh(), blender::ed::curves::extrude_knots(), blender::nodes::node_geo_extrude_mesh_cc::extrude_mesh_edges(), blender::nodes::node_geo_extrude_mesh_cc::extrude_mesh_face_regions(), blender::ed::sculpt_paint::fill_factor_from_hide_and_mask(), blender::ed::sculpt_paint::filter_translations(), blender::ed::sculpt_paint::boundary::filter_uninitialized_verts(), blender::bke::find_nearest_edges(), blender::bke::find_nearest_tris_parallel(), blender::ed::greasepencil::flood_fill(), blender::meshintersect::flood_fill_region_values(), blender::draw::pbvh::free_batches(), blender::draw::pbvh::free_ibos(), blender::draw::pbvh::free_vbos(), blender::index_mask::IndexMask::from_groups(), blender::bke::compare_geometry::gather_component(), blender::bke::subdiv::gather_manifold_sharpness(), blender::geometry::gaussian_blur_1D(), blender::generate_curves(), blender::get_quick_mesh(), blender::grease_pencil_do_layer_adjustments(), blender::IMB_blend_color_float(), blender::io::fbx::import_vertex_positions(), blender::bke::subdiv::initialize_manifold_edges(), blender::bke::subdiv::initialize_vert_sharpness(), blender::length_parameterize::interpolate(), blender::ed::sculpt_paint::greasepencil::PaintOperation::interpolate_stroke_depth(), blender::bke::curves::nurbs::interpolate_to_evaluated(), blender::bke::curves::nurbs::interpolate_to_evaluated_rational(), blender::array_utils::invert_booleans(), blender::geometry::join_curves_ranges(), blender::bke::curves::bezier::linear_interpolation(), blender::ed::sculpt_paint::greasepencil::linear_interpolation(), blender::geometry::linear_interpolation(), blender::geometry::mix(), blender::geometry::mix_arrays(), blender::ed::sculpt_paint::mask::mix_new_masks(), blender::ed::sculpt_paint::mask::mix_new_masks(), blender::geometry::mix_vertex_groups(), blender::geometry::mix_with_indices(), blender::normalEditModifier_do_directional(), blender::normalEditModifier_do_radial(), blender::bke::normalize_vecs(), blender::geometry::parallel_transform(), blender::bke::partition_faces_recursively(), blender::draw::pointcloud_extract_position_and_radius(), blender::ed::greasepencil::primitive_calculate_curve_positions(), blender::ed::curves::primitive_random_sphere(), blender::ed::sculpt_paint::greasepencil::PaintOperationExecutor::process_extension_sample(), blender::ed::sculpt_paint::project_translations(), blender::io::usd::USDParticleFieldReader::read_geometry(), blender::bke::remove_defgroup_index(), blender::bke::greasepencil::remove_from_vertex_group(), blender::nodes::node_geo_material_replace_cc::replace_materials(), blender::ed::sculpt_paint::reset_translations_to_original(), blender::geometry::reverse_samples(), blender::bke::rotate_directions_around_axes(), blender::ed::sculpt_paint::scale_factors(), blender::geometry::scale_input_assign(), blender::ed::sculpt_paint::scale_translations(), blender::ed::sculpt_paint::scale_translations(), blender::ed::sculpt_paint::select_random::select_random_exec(), blender::ed::curves::selection_attribute_writer_by_name(), blender::ed::object::shape_key_apply_to_basis_exec(), blender::ed::sculpt_paint::pose::solve_ik_chain(), blender::ed::sculpt_paint::pose::solve_roll_chain(), blender::ed::transform::sort_time_beztmaps(), blender::nodes::node_geo_dual_mesh_cc::sort_vertex_faces(), blender::geometry::transform_curve_edit_hints(), blender::geometry::transform_grease_pencil_edit_hints(), blender::geometry::transform_instances(), blender::math::transform_normals(), blender::math::transform_points(), blender::geometry::translate_instances(), blender::bke::translate_positions(), blender::ed::object::translate_positions(), blender::geometry::translate_positions(), blender::geometry::tri_to_ordered_tri(), blender::ed::curves::convert_to_particle_system::try_convert_single_object(), blender::versioning_grease_pencil_stroke_radii_scaling(), blender::geometry::weld_face_find_doubles(), blender::geometry::zero_degenerate_radii(), and blender::ed::sculpt_paint::filter::zero_disabled_axis_components().

◆ is_empty()

template<typename T>
bool blender::MutableSpan< T >::is_empty ( ) const
inlineconstexpr

Returns true if the size is zero.

Definition at line 515 of file BLI_span.hh.

References size_.

Referenced by blender::bke::add_orco_mesh(), blender::animviz_calc_motionpaths(), blender::BKE_mesh_prefair_and_fair_verts(), blender::bm_mesh_verts_calc_normals(), blender::bm_to_mesh_edges(), blender::bm_to_mesh_faces(), blender::bm_to_mesh_loops(), blender::bm_to_mesh_verts(), blender::geometry::construct::build_output_mesh(), blender::ed::sculpt_paint::pose::calc_pose_data(), blender::ed::sculpt_paint::pose::calc_pose_origin_and_factor_bmesh(), blender::ed::sculpt_paint::pose::calc_pose_origin_and_factor_grids(), blender::ed::sculpt_paint::pose::calc_pose_origin_and_factor_mesh(), blender::bke::curves::poly::calculate_normals_minimum(), blender::nodes::node_fn_separate_matrix_cc::SeparateMatrixFunction::call(), blender::nodes::node_geo_curve_sample_cc::SampleCurveFunction::call(), blender::nodes::node_shader_radial_tiling_cc::RoundedPolygonFunction::call(), blender::nodes::node_shader_tex_brick_cc::BrickFunction::call(), blender::nodes::node_shader_tex_gradient_cc::GradientFunction::call(), blender::nodes::node_shader_tex_magic_cc::MagicFunction::call(), blender::nodes::node_shader_tex_voronoi_cc::VoronoiMetricFunction::call(), blender::nodes::node_shader_tex_white_noise_cc::WhiteNoiseFunction::call(), blender::io::usd::colorspace_attr_to_scene_linear(), blender::index_mask::consolidate_index_mask_segments(), blender::nodes::node_fn_separate_matrix_cc::copy_with_stride(), blender::deform_verts(), blender::ed::sculpt_paint::brushes::do_layer_brush(), blender::dynamic_paint_apply_surface_vpaint_cb(), blender::index_mask::evaluated_segments_to_index_mask(), blender::geometry::execute_realize_pointcloud_task(), blender::nodes::node_geo_extrude_mesh_cc::extrude_mesh_face_regions(), blender::KDTreeNew< T >::find_nearest_n(), blender::bke::find_nearest_tris(), blender::nodes::node_geo_sample_nearest_cc::get_closest_mesh_corners(), blender::nodes::node_geo_sample_nearest_cc::get_closest_mesh_edges(), blender::nodes::node_geo_sample_nearest_cc::get_closest_mesh_points(), blender::nodes::node_geo_sample_nearest_cc::get_closest_mesh_tris(), blender::nodes::node_geo_sample_nearest_cc::get_closest_pointcloud_points(), blender::IMB_exr_read_passes(), blender::io::fbx::import_faces(), blender::mesh_merge_transform(), blender::MeshFairingContext::MeshFairingContext(), blender::modify_curves(), blender::modify_geometry_set(), blender::nodes::node_geo_deform_curves_on_surface_cc::node_geo_exec(), blender::normalEditModifier_do_directional(), blender::normalEditModifier_do_radial(), blender::ed::sculpt_paint::orig_position_data_gather_bmesh(), blender::nodes::node_geo_raycast_cc::raycast_to_mesh(), blender::io::usd::USDNurbsReader::read_curve_sample(), blender::bke::CurvesGeometry::reverse_curves(), blender::gpu::sort_input_list(), blender::nodes::node_geo_dual_mesh_cc::sort_vertex_faces(), blender::tests::TEST(), blender::bke::try_delete_vertex_group(), blender::bke::compare_geometry::update_set_ids(), blender::bke::compare_geometry::update_set_ids_with_id_maps(), blender::ed::object::vgroup_parray_alloc(), and blender::vpaint_blend_stroke().

◆ last()

template<typename T>
T & blender::MutableSpan< T >::last ( const int64_t n = 0) const
inlineconstexpr

Returns a reference to the nth last element. This invokes undefined behavior when the span is too short.

Definition at line 695 of file BLI_span.hh.

References blender::BLI_assert(), data_, size_, and T.

Referenced by blender::offset_indices::accumulate_counts_to_offsets(), blender::offset_indices::accumulate_counts_to_offsets_with_overflow_check(), blender::length_parameterize::accumulate_lengths(), blender::ed::sculpt_paint::pose::add_fake_neighbors(), blender::ed::curves::pen_tool::add_single_point_and_curve(), blender::geometry::assign_samples_to_segments(), blender::ed::greasepencil::build_curves_2d_bvh_from_visible(), blender::bke::build_offsets(), blender::ed::curves::calc_curves_extrusion(), blender::bke::curves::bezier::calculate_auto_handles(), blender::geometry::calculate_directions(), blender::bke::curves::bezier::calculate_evaluated_offsets(), blender::bke::curves::bezier::calculate_evaluated_positions(), blender::bke::curves::poly::calculate_normals_minimum(), blender::geometry::calculate_result_offsets(), blender::geometry::calculate_result_offsets(), blender::geometry::calculate_sphere_vertex_data(), blender::bke::curves::poly::calculate_tangents(), blender::geometry::catmull_rom_to_bezier_handles(), blender::index_mask::consolidate_index_mask_segments(), blender::ed::greasepencil::control_point_colors_and_sizes(), 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_curve_primitive_bezier_segment_cc::create_bezier_segment_curve(), blender::nodes::node_geo_mesh_primitive_circle_cc::create_circle_mesh(), blender::draw::create_segments_with_cyclic(), blender::bke::curve_legacy_to_curves(), blender::string_search::damerau_levenshtein_distance(), blender::nodes::node_geo_duplicate_elements_cc::duplicate_curves_CurveGeometry(), blender::enum_property_items_from_menu_node_socket(), blender::geometry::extend_curves(), blender::geometry::extract_mesh_faces(), blender::ed::curves::extrude_curves(), blender::geometry::gather_selected_offsets(), blender::offset_indices::gather_selected_offsets(), blender::offset_indices::gather_selected_offsets(), blender::draw::grease_pencil_geom_batch_ensure(), blender::bke::curves::catmull_rom::interpolate_to_evaluated(), blender::ed::mesh::join_objects_exec(), blender::geometry::limit_radii(), blender::ed::sculpt_paint::greasepencil::morph_points_to_curve(), blender::ed::sculpt_paint::move_last_point_and_resample(), blender::ed::greasepencil::primitive_calculate_curve_positions(), blender::io::usd::USDBasisCurvesReader::read_curve_sample(), blender::geometry::resample_to_count(), blender::geometry::resample_to_evaluated(), blender::geometry::resample_to_length(), blender::geometry::resample_to_uniform(), blender::ed::greasepencil::resize_single_curve(), blender::bke::reverse_custom_knots(), blender::geometry::sample_curve_padded(), blender::ed::sculpt_paint::pose::solve_ik_chain(), blender::nodes::node_geo_dual_mesh_cc::sort_vertex_faces(), blender::bke::tests::TEST_F(), blender::bke::tests::TEST_F(), blender::ed::sculpt_paint::greasepencil::trim_end_points(), and blender::bke::greasepencil::update_triangle_and_offsets_changed().

◆ operator Span< T >()

template<typename T>
blender::MutableSpan< T >::operator Span< T > ( ) const
inlineconstexpr

Definition at line 484 of file BLI_span.hh.

References data_, size_, and blender::Span< T >::Span().

◆ operator Span< U >()

template<typename T>
template<typename U>
requires (is_span_convertible_pointer_v<T, U>)
blender::MutableSpan< T >::operator Span< U > ( ) const
inlineconstexpr

◆ operator[]()

template<typename T>
T & blender::MutableSpan< T >::operator[] ( const int64_t index) const
inlineconstexpr

Definition at line 568 of file BLI_span.hh.

References blender::BLI_assert(), data_, size_, and T.

◆ rbegin()

template<typename T>
std::reverse_iterator< T * > blender::MutableSpan< T >::rbegin ( ) const
inlineconstexpr

Definition at line 559 of file BLI_span.hh.

References end().

Referenced by blender::displist_fill_cdt_process_group(), and blender::tests::TEST().

◆ rend()

template<typename T>
std::reverse_iterator< T * > blender::MutableSpan< T >::rend ( ) const
inlineconstexpr

Definition at line 563 of file BLI_span.hh.

References begin().

Referenced by blender::displist_fill_cdt_process_group(), and blender::tests::TEST().

◆ reverse()

template<typename T>
void blender::MutableSpan< T >::reverse ( ) const
inlineconstexpr

Reverse the data in the MutableSpan.

Definition at line 656 of file BLI_span.hh.

References data_, blender::IndexRange::IndexRange(), and size_.

Referenced by blender::bke::reverse_custom_knots(), and blender::tests::TEST().

◆ size()

template<typename T>
int64_t blender::MutableSpan< T >::size ( ) const
inlineconstexpr

Returns the number of elements in the array.

Definition at line 499 of file BLI_span.hh.

References size_.

Referenced by blender::length_parameterize::accumulate_lengths(), blender::bke::adapt_mesh_domain_corner_to_edge_impl(), blender::bke::adapt_mesh_domain_corner_to_edge_impl(), blender::bke::adapt_mesh_domain_corner_to_point_impl(), blender::bke::adapt_mesh_domain_corner_to_point_impl(), blender::bke::adapt_mesh_domain_edge_to_corner_impl(), blender::bke::adapt_mesh_domain_edge_to_corner_impl(), blender::bke::adapt_mesh_domain_edge_to_point_impl(), blender::bke::adapt_mesh_domain_edge_to_point_impl(), blender::bke::adapt_mesh_domain_face_to_edge_impl(), blender::bke::adapt_mesh_domain_face_to_edge_impl(), blender::ed::object::add_arrays(), blender::ed::sculpt_paint::pose::add_arrays(), blender::add_interp_verts_copy_edges_to_new_mesh(), blender::ed::sculpt_paint::apply_crazyspace_to_translations(), blender::ed::sculpt_paint::project::apply_projection_grids(), blender::geometry::assign_samples_to_segments(), blender::ed::sculpt_paint::smooth::average_data_grids(), blender::BKE_animsys_nla_remap_keyframe_values(), blender::BKE_armature_deform_coords_with_curves(), blender::BKE_armature_deform_coords_with_mesh(), blender::BKE_brush_calc_curve_factors(), blender::BKE_mesh_mirror_apply_mirror_on_axis_for_modifier(), blender::BKE_modifier_deform_verts(), blender::ed::blend_linear(), blender::bmo_flatten_exec(), blender::bke::pbvh::build_nodes_recursive_grids(), blender::bke::pbvh::build_nodes_recursive_mesh(), blender::index_mask::build_reverse_map(), blender::build_sequential(), blender::ed::animrig::build_transformable_relations(), blender::ed::sculpt_paint::calc_area_normal_and_center_node_bmesh(), blender::ed::sculpt_paint::boundary::calc_average_position(), blender::ed::sculpt_paint::boundary::calc_average_position(), blender::ed::sculpt_paint::boundary::calc_bend_position(), blender::nodes::node_geo_dual_mesh_cc::calc_boundaries(), blender::ed::sculpt_paint::calc_brush_cube_distances(), blender::ed::sculpt_paint::calc_brush_distances_squared(), blender::ed::sculpt_paint::calc_brush_distances_squared(), blender::ed::sculpt_paint::cloth::calc_brush_simulation_falloff(), blender::ed::sculpt_paint::calc_brush_texture_factors(), blender::ed::sculpt_paint::calc_brush_texture_factors(), blender::ed::sculpt_paint::brushes::calc_distances(), blender::kdtree::calc_duplicates_impl(), blender::ed::sculpt_paint::face_set::calc_face_centers(), blender::ed::sculpt_paint::face_set::calc_face_centers(), blender::ed::sculpt_paint::face_set::calc_face_indices_grids(), blender::ed::sculpt_paint::cloth::calc_forces_grids(), blender::ed::sculpt_paint::calc_front_face(), blender::ed::sculpt_paint::calc_front_face(), blender::ed::sculpt_paint::calc_front_face(), blender::ed::sculpt_paint::calc_front_face(), blender::ed::sculpt_paint::calc_front_face(), blender::ed::sculpt_paint::boundary::calc_grab_position(), blender::ed::sculpt_paint::brushes::calc_grids(), blender::ed::sculpt_paint::boundary::calc_inflate_position(), blender::bke::mesh::calc_local_edge_indices(), blender::ed::sculpt_paint::calc_local_positions(), blender::ed::sculpt_paint::calc_local_positions(), blender::ed::sculpt_paint::calc_local_positions(), blender::ed::sculpt_paint::calc_local_positions(), blender::geometry::calc_new_edges(), blender::ed::sculpt_paint::image::calc_pixel_row_positions(), blender::ed::sculpt_paint::smooth::calc_relaxed_translations_bmesh(), blender::ed::sculpt_paint::smooth::calc_relaxed_translations_faces(), blender::ed::sculpt_paint::pose::calc_segment_translations(), blender::ed::sculpt_paint::boundary::calc_slide_position(), blender::ed::sculpt_paint::boundary::calc_smooth_position(), blender::geometry::calc_straight_curve_positions(), blender::ed::sculpt_paint::boundary::calc_twist_position(), blender::nodes::node_geo_uv_tangent_cc::calc_uv_tangents_simple(), blender::bke::curves::bezier::calculate_evaluated_offsets(), blender::bke::curves::bezier::calculate_evaluated_positions(), blender::bke::curves::nurbs::calculate_knots(), blender::bke::subdiv::calculate_limit_positions(), blender::nodes::node_geo_field_average_cc::calculate_median(), blender::bke::curves::poly::calculate_normals_minimum(), blender::bke::curves::poly::calculate_normals_z_up(), blender::bke::curves::poly::calculate_tangents(), blender::calculate_target_locations(), blender::ed::sculpt_paint::clip_and_lock_translations(), blender::ed::sculpt_paint::clip_and_lock_translations(), blender::xpbd::color_constraints(), blender::io::usd::colorspace_attr_to_scene_linear(), blender::geometry::compute_curve_trim_parameters(), blender::geometry::construct::compute_face_interp_weights(), blender::compute_masked_verts(), blender::geometry::curve_constraints::compute_segment_lengths(), blender::computed_masked_edges(), blender::computed_masked_edges_smooth(), blender::index_mask::consolidate_index_mask_segments(), blender::gpu::convert(), blender::io::spz::convert_axis_to_blender(), blender::nodes::node_geo_curve_spline_parameter_cc::convert_lengths_to_factors(), blender::index_mask::copy_assign(), blender::bke::greasepencil::copy_drawing_array(), blender::ed::sculpt_paint::mask::copy_old_hidden_mask_mesh(), blender::io::obj::copy_property_from_node(), blender::ed::copy_span_into_mutable_span(), blender::correctivesmooth_modifier_do(), blender::array_utils::count_indices(), blender::array_utils::count_indices_thread_local(), blender::nodes::node_geo_mesh_primitive_circle_cc::create_circle_mesh(), blender::create_envelope_stroke_for_point(), blender::create_envelope_strokes_for_curve(), blender::bke::tests::GreasePencilInterpolate::create_test_shape(), blender::cuboid_do(), blender::ed::transform::curves::curve_connected_point_distances(), blender::ed::transform::curves::cyclic_curve_connected_point_distances(), blender::deform_matrices(), blender::deform_matrices_EM(), blender::deform_verts(), blender::deform_verts(), blender::deform_verts_EM(), blender::deformVerts_do(), blender::bke::bake::deserialize_typed_array(), blender::ed::space_node::determine_visible_panels(), blender::displaceModifier_do(), blender::nodes::node_geo_dual_mesh_cc::dissolve_redundant_verts(), blender::ed::sculpt_paint::brushes::do_displacement_smear_brush(), blender::ed::sculpt_paint::brushes::do_layer_brush(), blender::nodes::node_geo_duplicate_elements_cc::duplicate_faces(), blender::bke::mesh::edges_sharp_from_angle_set(), blender::ed::sculpt_paint::elastic_transform_node_grids(), blender::bke::curves::catmull_rom::evaluate_segment(), blender::index_mask::evaluated_segments_to_index_mask(), blender::geometry::extend_curves(), blender::draw::extract_tangents(), blender::geometry::face_keys_to_face_indices(), blender::ed::sculpt_paint::fill_factor_from_hide(), blender::ed::sculpt_paint::fill_factor_from_hide(), blender::ed::sculpt_paint::fill_factor_from_hide(), blender::ed::sculpt_paint::face_set::fill_factor_from_hide_and_mask(), blender::ed::sculpt_paint::face_set::fill_factor_from_hide_and_mask(), blender::ed::sculpt_paint::fill_factor_from_hide_and_mask(), blender::ed::sculpt_paint::fill_factor_from_hide_and_mask(), blender::ed::sculpt_paint::fill_factor_from_hide_and_mask(), blender::nodes::node_geo_curve_to_points_cc::fill_rotation_attribute(), blender::filter_factors_with_selection(), blender::ed::sculpt_paint::brushes::filter_plane_side_factors(), blender::ed::sculpt_paint::filter_region_clip_factors(), blender::ed::sculpt_paint::filter_region_clip_factors(), blender::ed::sculpt_paint::boundary::filter_uninitialized_verts(), blender::ed::sculpt_paint::filter_verts_outside_symmetry_area(), blender::ed::sculpt_paint::face_set::filter_verts_with_unique_face_sets_bmesh(), blender::ed::sculpt_paint::face_set::filter_verts_with_unique_face_sets_grids(), blender::ed::sculpt_paint::face_set::filter_verts_with_unique_face_sets_mesh(), blender::meshintersect::flood_fill_region_values(), blender::index_mask::IndexMask::from_groups(), blender::index_mask::gather_assign(), blender::ed::sculpt_paint::gather_bmesh_positions(), blender::ed::sculpt_paint::gather_data_bmesh(), blender::ed::sculpt_paint::gather_data_grids(), blender::bke::subdiv::gather_manifold_sharpness(), blender::ed::sculpt_paint::mask::gather_mask_bmesh(), blender::geometry::gaussian_blur_1D(), blender::ed::animrig::generate_paste_mapping(), blender::ed::sculpt_paint::face_set::gesture_apply_mesh(), blender::RandomNumberGenerator::get_bytes(), blender::nodes::node_geo_sample_nearest_cc::get_closest_pointcloud_points(), blender::io::obj::OBJMesh::get_face_deform_group_index(), blender::gpu::GLQueryPool::get_occlusion_result(), blender::array_utils::group_ids_to_indices(), blender::nodes::node_geo_points_to_curves_cc::identifiers_to_indices(), blender::IMB_blend_color_float(), blender::io::fbx::import_blend_shape_full_weights(), blender::io::fbx::import_edges(), blender::io::fbx::import_faces(), blender::io::fbx::import_skin_vertex_groups(), blender::io::fbx::import_vertex_positions(), blender::math::interp_weights_poly(), blender::geometry::interpolate_curves_with_samples(), blender::bke::curves::bezier::interpolate_to_evaluated(), blender::bke::curves::catmull_rom::interpolate_to_evaluated(), blender::nodes::node_geo_simulation_cc::sim_output_node::LazyFunctionForSimulationOutputNode::LazyFunctionForSimulationOutputNode(), blender::bke::curves::bezier::linear_interpolation(), blender::ed::sculpt_paint::greasepencil::linear_interpolation(), blender::geometry::linear_interpolation(), blender::io::usd::make_safe_identifier(), blender::mathutils_array_parse_alloc_viseq(), blender::bke::mesh_apply_spatial_organization(), blender::bke::mesh_get_mapped_verts_coords(), blender::ed::sculpt_paint::mask::mix_new_masks(), blender::ed::sculpt_paint::mask::mix_new_masks(), blender::ed::sculpt_paint::greasepencil::morph_points_to_curve(), blender::ed::sculpt_paint::move_last_point_and_resample(), blender::multires_reshape_apply_base_update_shape_key(), MutableSpan(), MutableSpan(), MutableSpan(), blender::ed::sculpt_paint::smooth::neighbor_color_average(), blender::ed::sculpt_paint::smooth::neighbor_data_average_mesh(), blender::ed::sculpt_paint::smooth::neighbor_data_average_mesh_check_loose(), blender::ed::sculpt_paint::smooth::neighbor_position_average_bmesh(), blender::ed::sculpt_paint::smooth::neighbor_position_average_interior_bmesh_impl(), blender::ed::sculpt_paint::smooth::neighbor_position_average_interior_grids_impl(), blender::geometry::ngon_indices_of_tris(), blender::animrig::nla::nla_map_keyframe_values_and_generate_reports(), blender::normalEditModifier_do(), blender::normalEditModifier_do_directional(), blender::normalEditModifier_do_radial(), blender::bke::mesh::normals_calc_corners(), blender::bke::mesh::normals_calc_faces(), blender::geometry::p_chart_fill_boundary(), blender::geometry::pack_island_xatlas(), blender::io::csv::parse_records_chunk(), blender::bke::partition_faces_recursively(), blender::ed::greasepencil::primitive_calculate_curve_positions(), blender::geometry::quad_indices_of_tris(), blender::ed::sculpt_paint::filter::randomize_factors(), blender::io::usd::USDBasisCurvesReader::read_curve_sample(), blender::io::alembic::AbcPointsReader::read_geometry(), blender::io::usd::USDParticleFieldReader::read_geometry(), blender::io::usd::USDPointsReader::read_geometry(), blender::geometry::reinsert_modified_geometry_recursive(), blender::bke::calc_edges::reserve_hash_maps(), blender::ed::sculpt_paint::reset_translations_to_original(), blender::offset_indices::reverse_indices_in_groups(), blender::offset_indices::reverse_indices_in_groups(), blender::offset_indices::reverse_indices_in_groups(), blender::geometry::reverse_samples(), blender::length_parameterize::sample_at_lengths(), blender::geometry::sample_curve_padded(), blender::geometry::sample_curve_padded(), blender::geometry::sample_curve_positions_and_handles(), blender::geometry::ReverseUVSampler::sample_many(), blender::ed::sculpt_paint::brushes::sample_node_surface_grids(), blender::length_parameterize::sample_uniform(), blender::length_parameterize::sample_uniform_reverse(), blender::ed::sculpt_paint::scale_factors(), blender::ed::object::shape_key_apply_to_basis_exec(), blender::shrinkwrapParams_deform(), blender::RandomNumberGenerator::shuffle(), blender::xpbd::GeometryRef::size(), slice(), slice_safe(), blender::geometry::smooth_curve_positions(), blender::smooth_iter__length_weight(), blender::smooth_iter__simple(), blender::smooth_verts(), blender::ed::sculpt_paint::pose::solve_roll_chain(), blender::gpu::sort_input_list(), blender::bke::compare_geometry::sort_per_set_with_id_maps(), blender::ed::transform::sort_time_beztmaps(), blender::nodes::node_geo_dual_mesh_cc::sort_vertex_faces(), blender::sphere_do(), blender::ed::sculpt_paint::smooth::surface_smooth_displace_step(), blender::ed::sculpt_paint::smooth::surface_smooth_laplacian_step(), blender::ed::sculpt_paint::undo::swap_indexed_data(), blender::tests::TEST(), blender::tests::TEST(), blender::tests::TEST(), blender::tests::TEST(), blender::tests::TEST(), blender::tests::TEST(), blender::tests::TEST(), blender::nodes::node_geo_duplicate_elements_cc::threaded_id_offset_copy(), blender::index_mask::IndexMask::to_bools(), blender::index_mask::IndexMask::to_indices(), blender::ed::sculpt_paint::translations_from_offset_and_factors(), blender::ed::curves::convert_to_particle_system::try_convert_single_object(), blender::eevee::Film::update_sample_table(), blender::weight_paint_sample_mark_groups(), and blender::geometry::weld_face_find_doubles().

◆ size_in_bytes()

◆ slice() [1/2]

template<typename T>
MutableSpan blender::MutableSpan< T >::slice ( const int64_t start,
const int64_t size ) const
inlineconstexpr

Returns a contiguous part of the array. This invokes undefined behavior when the start or size is negative.

Definition at line 579 of file BLI_span.hh.

References blender::BLI_assert(), data_, MutableSpan(), size(), and size_.

Referenced by blender::ed::sculpt_paint::greasepencil::PaintOperationExecutor::active_jitter(), blender::ed::curves::append_point_knots(), blender::ed::sculpt_paint::cloth::apply_filter_forces_grids(), blender::ed::sculpt_paint::apply_translations(), blender::bke::pbvh::build_nodes_recursive_grids(), blender::bke::pbvh::build_nodes_recursive_mesh(), blender::geometry::ngon::calc_corner_tris(), blender::geometry::quad::calc_corner_tris(), blender::geometry::quad::calc_corner_tris(), blender::ed::sculpt_paint::calc_front_face(), blender::geometry::calc_position_with_interpolation(), blender::geometry::calc_position_without_interpolation(), blender::geometry::calc_radius_with_interpolation(), blender::bke::CurvesGeometry::calculate_bezier_auto_handles(), blender::geometry::calculate_cone_faces(), blender::bke::calculate_evaluated_offsets(), blender::bke::curves::bezier::calculate_evaluated_positions(), blender::geometry::calculate_result_offsets(), blender::geometry::calculate_result_offsets(), blender::bke::curves::poly::calculate_tangents(), blender::gpu::convert_buffer(), blender::geometry::convert_curves_to_bezier(), blender::geometry::convert_curves_to_nurbs(), blender::bke::curves::nurbs::copy_custom_knots(), blender::bke::copy_main_point_data_to_mesh_edges(), blender::bke::copy_main_point_data_to_mesh_faces(), blender::bke::copy_main_point_data_to_mesh_verts(), blender::ed::sculpt_paint::mask::copy_old_hidden_mask_grids(), blender::geometry::copy_point_data_between_endpoints(), blender::bke::copy_profile_point_data_to_mesh_edges(), blender::nodes::node_geo_duplicate_elements_cc::copy_stable_id_curves(), blender::ed::curves::tests::create_curves(), blender::create_envelope_strokes_for_curve(), blender::bke::tests::GreasePencilInterpolate::create_test_curves(), blender::bke::curve_legacy_to_curves(), blender::ed::transform::curves::curve_populate_trans_data_structs(), blender::ed::sculpt_paint::image::do_paint_pixels(), blender::ed::sculpt_paint::cloth::do_simulation_step(), blender::draw::DRW_subdivide_loose_geom(), blender::nodes::node_geo_duplicate_elements_cc::duplicate_curves_CurveGeometry(), blender::nodes::node_geo_duplicate_elements_cc::duplicate_instances(), blender::bke::CurvesGeometry::ensure_evaluated_lengths(), blender::bke::CurvesGeometry::evaluated_normals(), blender::bke::CurvesGeometry::evaluated_positions(), blender::bke::CurvesGeometry::evaluated_tangents(), blender::ed::sculpt_paint::ScaleCurvesEffect::execute(), blender::ed::sculpt_paint::ShrinkCurvesEffect::execute(), blender::geometry::execute_instances_tasks(), blender::geometry::execute_realize_curve_task(), blender::geometry::execute_realize_mesh_task(), blender::geometry::execute_realize_pointcloud_task(), blender::geometry::extend_curves(), blender::draw::extract_edge_idx_loose_geom_subdiv(), blender::draw::extract_edge_index_bm(), blender::draw::extract_edge_index_mesh(), blender::draw::extract_edit_data_bm(), blender::draw::extract_edit_data_mesh(), blender::draw::extract_edit_subdiv_data_bm(), blender::draw::extract_edit_subdiv_data_mesh(), blender::draw::extract_lines_loose_geom_subdiv(), blender::draw::extract_vert_idx_loose_geom_subdiv(), blender::draw::extract_vert_index_bm(), blender::draw::extract_vert_index_mesh(), blender::nodes::node_geo_extrude_mesh_cc::extrude_individual_mesh_faces(), blender::ed::curves::extrude_knots(), blender::nodes::node_geo_extrude_mesh_cc::extrude_mesh_edges(), blender::nodes::node_geo_extrude_mesh_cc::extrude_mesh_face_regions(), blender::nodes::node_geo_extrude_mesh_cc::extrude_mesh_vertices(), blender::faces_check_flip(), blender::geometry::fill_bezier_data(), blender::ed::sculpt_paint::fill_factor_from_hide_and_mask(), blender::ed::sculpt_paint::mask::fill_mask_grids(), blender::geometry::fillet_curves(), blender::geometry::fit_poly_to_bezier_curves(), blender::ed::sculpt_paint::gather_data_grids(), blender::array_utils::gather_group_to_group(), blender::array_utils::gather_group_to_group(), blender::array_utils::gather_to_groups(), blender::nodes::node_geo_extrude_mesh_cc::gather_vert_attributes(), blender::nodes::node_geo_extrude_mesh_cc::gather_vert_attributes(), blender::generate_curves(), blender::draw::grease_pencil_cache_add_nurbs(), blender::draw::grease_pencil_edit_batch_ensure(), blender::draw::grease_pencil_geom_batch_ensure(), blender::draw::grease_pencil_weight_batch_ensure(), blender::ed::sculpt_paint::mask::grow_mask_grids(), blender::ed::sculpt_paint::mask::init_mask_grids(), blender::ed::sculpt_paint::greasepencil::PaintOperation::interpolate_stroke_depth(), blender::bke::curves::bezier::interpolate_to_evaluated(), blender::bke::curves::catmull_rom::interpolate_to_evaluated(), blender::ed::sculpt_paint::mask::invert_mask_grids(), blender::geometry::join_instances(), blender::ed::greasepencil::join_object_with_active(), blender::ed::mesh::join_positions(), blender::ed::mesh::join_shape_keys(), blender::bke::greasepencil::convert::legacy_gpencil_frame_to_grease_pencil_drawing(), blender::bke::mark_bezier_vector_edges_sharp(), blender::bke::mesh_calc_edges(), blender::geometry::mesh_triangulate(), blender::MOD_solidify_extrude_modifyMesh(), blender::modify_curves(), blender::modify_drawing(), blender::geometry::ngon_indices_of_tris(), blender::ed::sculpt_paint::image::paint_blend_pixels_color_managed(), blender::bke::partition_faces_recursively(), blender::ed::curves::primitive_random_sphere(), blender::ed::sculpt_paint::greasepencil::PaintOperationExecutor::process_extension_sample(), blender::ed::sculpt_paint::SnakeHookOperatorExecutor::projected_snake_hook(), blender::ed::sculpt_paint::PuffOperationExecutor::puff(), blender::geometry::ramer_douglas_peucker(), blender::ed::greasepencil::ramer_douglas_peucker_simplify(), blender::io::usd::USDBasisCurvesReader::read_curve_sample(), blender::io::usd::USDNurbsReader::read_curve_sample(), blender::io::alembic::AbcCurveReader::read_curves_sample(), blender::geometry::EvalDataBuffer::resize(), blender::ed::sculpt_paint::undo::restore_mask_grids(), blender::ed::sculpt_paint::undo::restore_position_grids(), blender::bke::CurvesGeometry::reverse_curves(), blender::bke::reverse_swap_curve_point_data(), blender::geometry::sample_curve_padded(), blender::geometry::sample_curve_positions_and_handles(), blender::geometry::sample_interval_bezier(), blender::ed::sculpt_paint::scatter_data_grids(), blender::ed::transform::UVGroups::sd_group_get(), blender::ed::transform::UVGroups::sd_group_get(), blender::index_mask::segments_from_batch_predicate(), blender::nodes::node_geo_curve_handle_type_selection_cc::select_by_handle_type(), blender::ed::sculpt_paint::select_random::select_random_exec(), blender::selectbuffer_ret_hits_5(), blender::selectbuffer_ret_hits_5(), blender::selectbuffer_ret_hits_9(), blender::bke::calc_edges::serialize_and_initialize_deduplicated_edges(), blender::ed::sculpt_paint::mask::shrink_mask_grids(), slice(), blender::ed::sculpt_paint::SmoothOperationExecutor::smooth(), blender::geometry::curve_constraints::solve_length_and_collision_constraints(), blender::bke::compare_geometry::sort_per_set_based_on_attributes(), blender::bke::compare_geometry::sort_per_set_with_id_maps(), blender::ed::sculpt_paint::SnakeHookOperatorExecutor::spherical_snake_hook(), blender::geometry::subdivide_attribute_linear(), blender::geometry::subdivide_bezier_segment(), blender::geometry::subdivide_curves(), blender::draw::test_draw_curves_interpolate_attributes(), blender::bke::tests::TEST_F(), blender::bke::tests::TEST_F(), blender::update_custom_knots(), blender::gpu::GLTexture::update_sub(), and blender::gpu::MTLTexture::update_sub().

◆ slice() [2/2]

template<typename T>
MutableSpan blender::MutableSpan< T >::slice ( IndexRange range) const
inlineconstexpr

◆ slice_safe() [1/2]

template<typename T>
MutableSpan blender::MutableSpan< T >::slice_safe ( const int64_t start,
const int64_t size ) const
inlineconstexpr

Returns a contiguous part of the array. This invokes undefined behavior when the start or size is negative. Clamps the size of the new span so it fits in the current one.

Definition at line 596 of file BLI_span.hh.

References blender::BLI_assert(), data_, MutableSpan(), size(), and size_.

Referenced by blender::io::usd::USDBasisCurvesReader::read_curve_sample(), blender::draw::command::DrawMulti::serialize(), slice_safe(), and blender::tests::TEST().

◆ slice_safe() [2/2]

template<typename T>
MutableSpan blender::MutableSpan< T >::slice_safe ( IndexRange range) const
inlineconstexpr

◆ take_back()

◆ take_front()

template<typename T>
MutableSpan blender::MutableSpan< T >::take_front ( const int64_t n) const
inlineconstexpr

Returns a new MutableSpan that only contains the first n elements. This invokes undefined behavior when n is negative.

Definition at line 635 of file BLI_span.hh.

References blender::BLI_assert(), data_, MutableSpan(), and size_.

Referenced by blender::geometry::add_curves_on_mesh(), blender::arrayModifier_doArray(), blender::BKE_keyblock_convert_to_mesh(), blender::BKE_mesh_mirror_apply_mirror_on_axis_for_modifier(), blender::bke::pbvh::build_nodes_recursive_grids(), blender::bke::pbvh::build_nodes_recursive_mesh(), blender::geometry::construct::build_output_mesh(), blender::build_sequential(), blender::geometry::calculate_cone_faces(), blender::geometry::calculate_sphere_faces(), blender::ed::curves::duplicate_curves(), blender::draw::extract_edge_index_bm(), blender::draw::extract_edge_index_mesh(), blender::draw::extract_edit_data_bm(), blender::draw::extract_edit_data_mesh(), blender::draw::extract_edit_subdiv_data_bm(), blender::draw::extract_edit_subdiv_data_mesh(), blender::draw::extract_normals(), blender::draw::extract_paint_overlay_flags(), blender::draw::extract_vert_index_bm(), blender::draw::extract_vert_index_mesh(), blender::draw::extract_vert_normals_bm(), blender::draw::extract_vert_normals_mesh(), blender::draw::extract_vert_positions_bm(), blender::draw::extract_vert_positions_mesh(), blender::ed::greasepencil::get_gapless_indices(), blender::ed::mesh::join_shape_keys(), blender::bke::mesh_apply_spatial_organization(), blender::bke::mesh_calc_edges(), blender::geometry::mesh_triangulate(), blender::MOD_solidify_extrude_modifyMesh(), blender::bke::partition_faces_recursively(), blender::reorder_cyclic_curve_points(), blender::ed::sculpt_paint::undo::restore_position_mesh(), blender::tests::TEST(), blender::csv_parse::unescape_field(), and blender::version_nodes_insert_item().

Member Data Documentation

◆ data_

◆ size_


The documentation for this class was generated from the following file: