|
Blender V5.0
|
#include <BLI_generic_span.hh>
Inherited by blender::GMutableVArraySpan.
Public Member Functions | |
| GMutableSpan ()=default | |
| GMutableSpan (const CPPType *type, void *buffer, int64_t size) | |
| GMutableSpan (const CPPType &type, void *buffer, int64_t size) | |
| GMutableSpan (const CPPType &type) | |
| GMutableSpan (const CPPType *type) | |
| template<typename T> | |
| GMutableSpan (MutableSpan< T > array) | |
| operator GSpan () const | |
| const CPPType & | type () const |
| const CPPType * | type_ptr () const |
| bool | is_empty () const |
| int64_t | size () const |
| int64_t | size_in_bytes () const |
| void * | data () const |
| void * | operator[] (int64_t index) const |
| template<typename T> | |
| MutableSpan< T > | typed () const |
| GMutableSpan | slice (const int64_t start, int64_t size) const |
| GMutableSpan | slice (IndexRange range) const |
| GMutableSpan | drop_front (const int64_t n) const |
| GMutableSpan | drop_back (const int64_t n) const |
| GMutableSpan | take_front (const int64_t n) const |
| GMutableSpan | take_back (const int64_t n) const |
| void | copy_from (GSpan values) |
Protected Attributes | |
| const CPPType * | type_ = nullptr |
| void * | data_ = nullptr |
| int64_t | size_ = 0 |
A generic mutable span. It behaves just like a blender::MutableSpan<T>, but the type is only known at run-time.
Definition at line 145 of file BLI_generic_span.hh.
|
default |
Definition at line 154 of file BLI_generic_span.hh.
References BLI_assert, data_, size(), size_, type(), and type_.
Definition at line 163 of file BLI_generic_span.hh.
References GMutableSpan(), size(), and type().
|
inline |
Definition at line 167 of file BLI_generic_span.hh.
|
inline |
Definition at line 169 of file BLI_generic_span.hh.
|
inline |
Definition at line 172 of file BLI_generic_span.hh.
References begin(), GMutableSpan(), size(), and T.
|
inline |
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 273 of file BLI_generic_span.hh.
References BLI_assert, blender::GSpan::data(), data_, blender::GSpan::size(), size_, blender::GSpan::type(), and type_.
Referenced by blender::array_utils::copy_group_to_group(), blender::bke::evaluate_generic_data_for_curve(), blender::ed::curves::pen_tool::extrude_curves(), blender::ed::greasepencil::extrude_grease_pencil_curves(), blender::bke::curves::nurbs::interpolate_to_evaluated(), blender::bke::mesh_apply_spatial_organization(), blender::ed::curves::resize_curves(), and blender::nodes::node_geo_dual_mesh_cc::transfer_attributes().
|
inline |
Definition at line 208 of file BLI_generic_span.hh.
References data_.
Referenced by blender::fn::multi_function::CustomMF_DefaultOutput::call(), blender::nodes::node_geo_menu_switch_cc::MenuSwitchFn::call(), blender::ed::sculpt_paint::color::color_vert_set(), blender::bke::DataTypeConversions::convert_to_initialized_n(), blender::bke::copy_attributes_group_to_group(), blender::fn::evaluate_fields(), blender::geometry::execute_instances_tasks(), blender::geometry::extract_mesh_faces(), face_corner_color_equalize_verts(), blender::bke::curves::fill_points(), blender::nodes::LazyFunctionForReduceForeachGeometryElement::handle_generation_items_group(), blender::nodes::LazyFunctionForReduceForeachGeometryElement::handle_main_items_and_geometry(), blender::ed::mesh::join_generic_attributes(), blender::bke::bake::load_attributes(), blender::bke::mesh_calc_edges(), blender::bke::bake::read_blob_simple_gspan(), blender::geometry::resample_to_evaluated(), blender::geometry::resample_to_uniform(), blender::ed::curves::resize_curves(), blender::ed::curves::set_attribute_exec(), blender::ed::pointcloud::set_attribute_exec(), and blender::geometry::smooth_curve_attribute().
|
inline |
Definition at line 247 of file BLI_generic_span.hh.
References BLI_assert, data_, GMutableSpan(), size_, and type_.
Referenced by blender::ed::curves::append_primitive_curve().
|
inline |
Definition at line 240 of file BLI_generic_span.hh.
References BLI_assert, data_, GMutableSpan(), POINTER_OFFSET, size_, and type_.
|
inline |
Definition at line 193 of file BLI_generic_span.hh.
References size_.
Referenced by blender::fn::multi_function::add_sliced_parameters(), blender::nodes::node_geo_menu_switch_cc::MenuSwitchFn::call(), blender::tests::TEST(), blender::tests::TEST(), and blender::tests::TEST().
|
inline |
Definition at line 177 of file BLI_generic_span.hh.
|
inline |
Definition at line 213 of file BLI_generic_span.hh.
References BLI_assert, data_, POINTER_OFFSET, size_, and type_.
|
inline |
Definition at line 198 of file BLI_generic_span.hh.
References size_.
Referenced by blender::fn::multi_function::ParamsBuilder::add_single_mutable(), blender::fn::multi_function::ParamsBuilder::add_uninitialized_single_output(), blender::ed::pointcloud::apply_selection_operation(), blender::bke::DataTypeConversions::convert_to_initialized_n(), blender::array_utils::copy(), blender::array_utils::copy(), blender::bke::copy_attributes_group_to_group(), blender::nodes::node_geo_extrude_mesh_cc::copy_with_mixing(), blender::ed::pointcloud::fill_selection_true(), blender::array_utils::gather(), GMutableSpan(), GMutableSpan(), GMutableSpan(), blender::nodes::LazyFunctionForReduceForeachGeometryElement::handle_generation_items_group(), blender::nodes::node_geo_distribute_points_on_faces_cc::interpolate_attribute(), blender::geometry::interpolate_curves_with_samples(), blender::bke::curves::nurbs::interpolate_to_evaluated(), blender::bke::CurvesGeometry::interpolate_to_evaluated(), blender::ed::curves::invert_selection(), blender::bke::mesh_apply_spatial_organization(), blender::bke::mesh_calc_edges(), blender::bke::bake::read_blob_simple_gspan(), blender::ed::curves::resize_curves(), blender::geometry::reverse_order(), blender::geometry::sample_curve_attribute(), slice(), blender::tests::TEST(), blender::tests::TEST(), blender::tests::TEST(), blender::geometry::threaded_copy(), blender::geometry::threaded_fill(), blender::bke::try_direct_evaluate_point_data(), and blender::fn::multi_function::Params::uninitialized_single_output().
|
inline |
Definition at line 203 of file BLI_generic_span.hh.
Referenced by blender::bke::bake::read_blob_simple_gspan(), and blender::geometry::smooth_curve_attribute().
|
inline |
Definition at line 227 of file BLI_generic_span.hh.
References BLI_assert, data_, GMutableSpan(), POINTER_OFFSET, size(), size_, and type_.
Referenced by blender::nodes::node_geo_instance_on_points_cc::add_instances_from_component(), blender::fn::multi_function::add_sliced_parameters(), blender::ed::curves::pen_tool::close_curve_and_select(), blender::array_utils::copy_group_to_group(), blender::ed::sculpt_paint::greasepencil::deselect_stroke(), blender::geometry::duplicate_fillet_point_data(), blender::ed::curves::duplicate_points(), blender::geometry::execute_instances_tasks(), 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::bke::fill_attribute_range_default(), blender::bke::curves::fill_points(), blender::nodes::node_geo_extrude_mesh_cc::gather_attributes(), blender::nodes::node_geo_extrude_mesh_cc::gather_attributes(), blender::nodes::node_geo_extrude_mesh_cc::gather_vert_attributes(), blender::nodes::node_geo_extrude_mesh_cc::gather_vert_attributes(), blender::ed::greasepencil::grease_pencil_material_select_exec(), blender::bke::CurvesGeometry::interpolate_to_evaluated(), blender::ed::mesh::join_generic_attributes(), blender::bke::mesh_calc_edges(), blender::geometry::resample_to_evaluated(), blender::geometry::resample_to_uniform(), blender::ed::curves::resize_curves(), blender::ed::curves::select_linked(), slice(), blender::geometry::smooth_curve_attribute(), blender::ed::curves::split_points(), and blender::geometry::subdivide_attribute_catmull_rom().
|
inline |
Definition at line 235 of file BLI_generic_span.hh.
References GMutableSpan(), blender::IndexRange::size(), slice(), and blender::IndexRange::start().
|
inline |
Definition at line 261 of file BLI_generic_span.hh.
References BLI_assert, data_, GMutableSpan(), POINTER_OFFSET, size_, and type_.
Referenced by blender::ed::curves::append_primitive_curve(), blender::ed::curves::duplicate_curves(), blender::ed::pointcloud::duplicate_points(), blender::geometry::propagate_edge_attributes(), and blender::geometry::propagate_vert_attributes().
|
inline |
Definition at line 254 of file BLI_generic_span.hh.
References BLI_assert, data_, GMutableSpan(), size_, and type_.
Referenced by blender::ed::pointcloud::duplicate_points(), blender::fn::evaluate_fields(), blender::bke::mesh_calc_edges(), and blender::nodes::node_geo_dual_mesh_cc::transfer_attributes().
|
inline |
Definition at line 182 of file BLI_generic_span.hh.
References BLI_assert, and type_.
Referenced by blender::ed::sculpt_paint::color::active_color_attribute_for_write(), blender::ed::greasepencil::add_single_curve(), blender::fn::multi_function::ParamsBuilder::add_single_mutable(), blender::fn::multi_function::ParamsBuilder::add_uninitialized_single_output(), blender::ed::curves::apply_selection_operation_at_index(), blender::nodes::node_geo_blur_attribute_cc::blur_on_curves(), blender::nodes::node_geo_blur_attribute_cc::blur_on_mesh(), blender::fn::multi_function::CustomMF_DefaultOutput::call(), blender::ed::sculpt_paint::color::color_vert_set(), blender::bke::DataTypeConversions::convert_to_initialized_n(), blender::array_utils::copy(), blender::array_utils::copy(), blender::bke::copy_attributes_group_to_group(), blender::nodes::node_geo_extrude_mesh_cc::extrude_individual_mesh_faces(), blender::nodes::node_geo_extrude_mesh_cc::extrude_mesh_edges(), blender::bke::fill_attribute_range_default(), blender::ed::sculpt_paint::fill_mesh_color(), blender::bke::curves::fill_points(), blender::ed::curves::fill_selection(), blender::ed::curves::fill_selection_false(), blender::ed::curves::fill_selection_false(), blender::ed::pointcloud::fill_selection_false(), blender::ed::curves::fill_selection_true(), blender::ed::curves::fill_selection_true(), blender::ed::pointcloud::fill_selection_true(), blender::array_utils::gather(), GMutableSpan(), GMutableSpan(), GMutableSpan(), GMutableSpan(), blender::GMutableVArraySpan::GMutableVArraySpan(), blender::geometry::interpolate_curves_with_samples(), blender::ed::curves::invert_selection(), blender::ed::pointcloud::invert_selection(), blender::geometry::merge_layers(), blender::bke::mesh_apply_spatial_organization(), blender::geometry::mix(), blender::geometry::mix_arrays(), blender::geometry::mix_arrays(), blender::geometry::mix_with_indices(), blender::bke::bake::read_blob_simple_gspan(), blender::geometry::resample_to_evaluated(), blender::geometry::resample_to_uniform(), blender::ed::greasepencil::resize_single_curve(), blender::bke::CurvesGeometry::reverse_curves(), blender::geometry::reverse_order(), blender::bke::mesh_surface_sample::sample_corner_attribute(), blender::geometry::sample_curve_attribute(), blender::bke::mesh_surface_sample::sample_face_attribute(), blender::bke::mesh_surface_sample::sample_point_attribute(), blender::ed::curves::select_adjacent(), blender::ed::curves::select_ends_exec(), blender::ed::curves::set_attribute_exec(), blender::ed::pointcloud::set_attribute_exec(), blender::geometry::smooth_curve_attribute(), blender::geometry::subdivide_attribute_linear(), blender::ed::sculpt_paint::color::swap_gathered_colors(), blender::geometry::threaded_copy(), blender::geometry::threaded_fill(), and blender::ed::sculpt_paint::greasepencil::trim_end_points().
|
inline |
Definition at line 188 of file BLI_generic_span.hh.
References type_.
Referenced by blender::GMutableVArraySpan::GMutableVArraySpan().
|
inline |
Definition at line 220 of file BLI_generic_span.hh.
References BLI_assert, data_, size_, T, and type_.
Referenced by blender::ed::curves::apply_selection_operation_at_index(), blender::io::usd::copy_primvar_to_blender_attribute(), blender::ed::sculpt_paint::fill_mesh_color(), blender::ed::curves::fill_selection(), blender::ed::curves::fill_selection_false(), blender::ed::curves::fill_selection_false(), blender::ed::pointcloud::fill_selection_false(), blender::ed::curves::fill_selection_true(), blender::ed::curves::fill_selection_true(), blender::ed::pointcloud::fill_selection_true(), blender::geometry::gather_point_attributes_to_interpolate(), blender::bke::get_mutable_attribute(), blender::ed::greasepencil::grease_pencil_material_select_exec(), blender::nodes::node_geo_interpolate_curves_cc::interpolate_curve_attributes(), blender::ed::curves::invert_selection(), blender::ed::pointcloud::invert_selection(), blender::geometry::merge_layers(), blender::bke::mesh_surface_sample::sample_corner_attribute(), blender::geometry::sample_curve_attribute(), blender::bke::mesh_surface_sample::sample_face_attribute(), blender::bke::mesh_surface_sample::sample_point_attribute(), blender::ed::curves::select_adjacent(), blender::ed::curves::select_ends_exec(), blender::ed::greasepencil::select_similar_by_value(), blender::tests::TEST(), blender::tests::TEST(), blender::tests::TEST(), blender::tests::TEST(), and blender::nodes::node_geo_dual_mesh_cc::transfer_attributes().
|
protected |
Definition at line 148 of file BLI_generic_span.hh.
Referenced by copy_from(), data(), drop_back(), drop_front(), GMutableSpan(), blender::GMutableVArraySpan::GMutableVArraySpan(), operator GSpan(), operator[](), blender::GMutableVArraySpan::save(), slice(), take_back(), take_front(), and typed().
|
protected |
Definition at line 149 of file BLI_generic_span.hh.
Referenced by copy_from(), drop_back(), drop_front(), GMutableSpan(), blender::GMutableVArraySpan::GMutableVArraySpan(), blender::GMutableVArraySpan::GMutableVArraySpan(), is_empty(), operator GSpan(), operator[](), size(), size_in_bytes(), slice(), take_back(), take_front(), typed(), and blender::GMutableVArraySpan::~GMutableVArraySpan().
Definition at line 147 of file BLI_generic_span.hh.
Referenced by copy_from(), drop_back(), drop_front(), GMutableSpan(), GMutableSpan(), GMutableSpan(), operator GSpan(), operator[](), size_in_bytes(), slice(), take_back(), take_front(), type(), type_ptr(), typed(), and blender::GMutableVArraySpan::~GMutableVArraySpan().