|
Blender V4.3
|
#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 139 of file BLI_generic_span.hh.
|
default |
Referenced by drop_back(), drop_front(), slice(), take_back(), and take_front().
Definition at line 148 of file BLI_generic_span.hh.
References BLI_assert.
Definition at line 157 of file BLI_generic_span.hh.
|
inline |
Definition at line 161 of file BLI_generic_span.hh.
|
inline |
Definition at line 163 of file BLI_generic_span.hh.
|
inline |
Definition at line 166 of file BLI_generic_span.hh.
|
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 268 of file BLI_generic_span.hh.
References BLI_assert, blender::CPPType::copy_assign_n(), data_, size_, and type_.
Referenced by blender::bke::evaluate_generic_data_for_curve(), blender::bke::curves::nurbs::interpolate_to_evaluated(), and blender::nodes::node_geo_dual_mesh_cc::transfer_attributes().
|
inline |
Definition at line 202 of file BLI_generic_span.hh.
References data_.
Referenced by blender::fn::multi_function::CustomMF_DefaultOutput::call(), blender::ed::sculpt_paint::color::color_vert_set(), blender::bke::DataTypeConversions::convert_to_initialized_n(), blender::fn::evaluate_fields(), blender::geometry::execute_instances_tasks(), blender::geometry::extract_mesh_faces(), blender::bke::curves::fill_points(), blender::nodes::LazyFunctionForReduceForeachGeometryElement::handle_generation_items_group(), blender::bke::bake::read_blob_simple_gspan(), blender::geometry::smooth_curve_attribute(), and blender::bke::CustomDataAttributeProvider::try_get_for_write().
|
inline |
Definition at line 241 of file BLI_generic_span.hh.
References BLI_assert, data_, GMutableSpan(), size_, and type_.
|
inline |
Definition at line 234 of file BLI_generic_span.hh.
References BLI_assert, data_, GMutableSpan(), POINTER_OFFSET, blender::CPPType::size(), size_, and type_.
|
inline |
Definition at line 187 of file BLI_generic_span.hh.
References size_.
Referenced by blender::fn::multi_function::add_sliced_parameters(), blender::tests::TEST(), blender::tests::TEST(), and blender::tests::TEST().
|
inline |
Definition at line 171 of file BLI_generic_span.hh.
|
inline |
Definition at line 207 of file BLI_generic_span.hh.
References BLI_assert, data_, POINTER_OFFSET, blender::CPPType::size(), size_, and type_.
|
inline |
Definition at line 192 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::bke::DataTypeConversions::convert_to_initialized_n(), blender::array_utils::copy(), blender::array_utils::copy(), blender::nodes::node_geo_extrude_mesh_cc::copy_with_mixing(), blender::array_utils::gather(), blender::nodes::LazyFunctionForReduceForeachGeometryElement::handle_generation_items_group(), blender::nodes::node_geo_distribute_points_on_faces_cc::interpolate_attribute(), blender::bke::curves::nurbs::interpolate_to_evaluated(), blender::bke::CurvesGeometry::interpolate_to_evaluated(), blender::bke::bake::read_blob_simple_gspan(), blender::geometry::reverse_order(), blender::geometry::sample_curve_attribute(), 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 197 of file BLI_generic_span.hh.
References blender::CPPType::size(), size_, and type_.
Referenced by blender::bke::bake::read_blob_simple_gspan(), and blender::geometry::smooth_curve_attribute().
|
inline |
Definition at line 221 of file BLI_generic_span.hh.
References BLI_assert, data_, GMutableSpan(), POINTER_OFFSET, blender::CPPType::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::array_utils::copy_group_to_group(), blender::geometry::duplicate_fillet_point_data(), blender::geometry::execute_instances_tasks(), blender::nodes::node_geo_extrude_mesh_cc::extrude_mesh_face_regions(), blender::bke::fill_attribute_range_default(), blender::bke::curves::fill_points(), blender::bke::CurvesGeometry::interpolate_to_evaluated(), blender::ed::curves::select_linked(), slice(), blender::geometry::smooth_curve_attribute(), and blender::geometry::subdivide_attribute_catmull_rom().
|
inline |
Definition at line 229 of file BLI_generic_span.hh.
References slice(), and blender::IndexRange::start().
|
inline |
Definition at line 255 of file BLI_generic_span.hh.
References BLI_assert, data_, GMutableSpan(), POINTER_OFFSET, blender::CPPType::size(), size_, and type_.
|
inline |
Definition at line 248 of file BLI_generic_span.hh.
References BLI_assert, data_, GMutableSpan(), size_, and type_.
Referenced by blender::fn::evaluate_fields(), and blender::nodes::node_geo_dual_mesh_cc::transfer_attributes().
|
inline |
Definition at line 176 of file BLI_generic_span.hh.
References BLI_assert, and type_.
Referenced by blender::fn::multi_function::ParamsBuilder::add_single_mutable(), blender::fn::multi_function::ParamsBuilder::add_uninitialized_single_output(), 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::ed::sculpt_paint::greasepencil::create_blank_curve(), blender::ed::sculpt_paint::greasepencil::extend_curve(), blender::bke::curves::fill_points(), blender::array_utils::gather(), blender::geometry::merge_layers(), blender::geometry::mix_arrays(), blender::geometry::mix_arrays(), blender::bke::bake::read_blob_simple_gspan(), 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::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 182 of file BLI_generic_span.hh.
References type_.
|
inline |
Definition at line 214 of file BLI_generic_span.hh.
References BLI_assert, data_, blender::CPPType::is(), size_, and type_.
Referenced by blender::nodes::node_geo_duplicate_elements_cc::copy_stable_id_curves(), blender::nodes::node_geo_duplicate_elements_cc::copy_stable_id_edges(), blender::nodes::node_geo_duplicate_elements_cc::copy_stable_id_faces(), blender::nodes::node_geo_duplicate_elements_cc::copy_stable_id_point(), blender::geometry::gather_point_attributes_to_interpolate(), blender::nodes::node_geo_interpolate_curves_cc::interpolate_curve_attributes(), 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::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 142 of file BLI_generic_span.hh.
Referenced by copy_from(), data(), drop_back(), drop_front(), blender::GMutableVArraySpan::GMutableVArraySpan(), blender::GMutableVArraySpan::GMutableVArraySpan(), operator GSpan(), operator[](), blender::GMutableVArraySpan::save(), slice(), take_back(), take_front(), and typed().
|
protected |
Definition at line 143 of file BLI_generic_span.hh.
Referenced by copy_from(), drop_back(), drop_front(), 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().
|
protected |
Definition at line 141 of file BLI_generic_span.hh.
Referenced by copy_from(), drop_back(), drop_front(), blender::GMutableVArraySpan::GMutableVArraySpan(), operator GSpan(), operator[](), size_in_bytes(), slice(), take_back(), take_front(), type(), type_ptr(), typed(), and blender::GMutableVArraySpan::~GMutableVArraySpan().