Blender V5.0
blender::GMutableSpan Class Reference

#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 CPPTypetype () const
const CPPTypetype_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< Ttyped () 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 CPPTypetype_ = nullptr
void * data_ = nullptr
int64_t size_ = 0

Detailed Description

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.

Constructor & Destructor Documentation

◆ GMutableSpan() [1/6]

◆ GMutableSpan() [2/6]

blender::GMutableSpan::GMutableSpan ( const CPPType * type,
void * buffer,
int64_t size )
inline

Definition at line 154 of file BLI_generic_span.hh.

References BLI_assert, data_, size(), size_, type(), and type_.

◆ GMutableSpan() [3/6]

blender::GMutableSpan::GMutableSpan ( const CPPType & type,
void * buffer,
int64_t size )
inline

Definition at line 163 of file BLI_generic_span.hh.

References GMutableSpan(), size(), and type().

◆ GMutableSpan() [4/6]

blender::GMutableSpan::GMutableSpan ( const CPPType & type)
inline

Definition at line 167 of file BLI_generic_span.hh.

References type(), and type_.

◆ GMutableSpan() [5/6]

blender::GMutableSpan::GMutableSpan ( const CPPType * type)
inline

Definition at line 169 of file BLI_generic_span.hh.

References type(), and type_.

◆ GMutableSpan() [6/6]

template<typename T>
blender::GMutableSpan::GMutableSpan ( MutableSpan< T > array)
inline

Definition at line 172 of file BLI_generic_span.hh.

References begin(), GMutableSpan(), size(), and T.

Member Function Documentation

◆ copy_from()

void blender::GMutableSpan::copy_from ( GSpan values)
inline

◆ data()

◆ drop_back()

GMutableSpan blender::GMutableSpan::drop_back ( const int64_t n) const
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().

◆ drop_front()

GMutableSpan blender::GMutableSpan::drop_front ( const int64_t n) const
inline

Definition at line 240 of file BLI_generic_span.hh.

References BLI_assert, data_, GMutableSpan(), POINTER_OFFSET, size_, and type_.

◆ is_empty()

◆ operator GSpan()

blender::GMutableSpan::operator GSpan ( ) const
inline

Definition at line 177 of file BLI_generic_span.hh.

References data_, size_, and type_.

◆ operator[]()

void * blender::GMutableSpan::operator[] ( int64_t index) const
inline

Definition at line 213 of file BLI_generic_span.hh.

References BLI_assert, data_, POINTER_OFFSET, size_, and type_.

◆ size()

int64_t blender::GMutableSpan::size ( ) const
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().

◆ size_in_bytes()

int64_t blender::GMutableSpan::size_in_bytes ( ) const
inline

◆ slice() [1/2]

GMutableSpan blender::GMutableSpan::slice ( const int64_t start,
int64_t size ) const
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().

◆ slice() [2/2]

GMutableSpan blender::GMutableSpan::slice ( IndexRange range) const
inline

◆ take_back()

◆ take_front()

◆ type()

const CPPType & blender::GMutableSpan::type ( ) const
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().

◆ type_ptr()

const CPPType * blender::GMutableSpan::type_ptr ( ) const
inline

Definition at line 188 of file BLI_generic_span.hh.

References type_.

Referenced by blender::GMutableVArraySpan::GMutableVArraySpan().

◆ typed()

template<typename T>
MutableSpan< T > blender::GMutableSpan::typed ( ) const
inline

Member Data Documentation

◆ data_

◆ size_

◆ type_


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