Blender
V3.3
|
#include <BLI_generic_span.hh>
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 |
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 |
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 109 of file BLI_generic_span.hh.
|
default |
Referenced by slice().
Definition at line 118 of file BLI_generic_span.hh.
References BLI_assert, buffer, blender::CPPType::pointer_has_valid_alignment(), size(), and type().
Definition at line 127 of file BLI_generic_span.hh.
|
inline |
Definition at line 131 of file BLI_generic_span.hh.
|
inline |
Definition at line 135 of file BLI_generic_span.hh.
|
inline |
Definition at line 140 of file BLI_generic_span.hh.
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 207 of file BLI_generic_span.hh.
References BLI_assert, blender::CPPType::copy_assign_n(), blender::GSpan::data(), data_, blender::GSpan::size(), size_, blender::GSpan::type(), and type_.
Referenced by blender::bke::curves::nurbs::interpolate_to_evaluated(), and blender::bke::CurvesGeometry::interpolate_to_evaluated().
|
inline |
Definition at line 171 of file BLI_generic_span.hh.
References data_.
Referenced by blender::fn::CustomMF_DefaultOutput::call(), blender::nodes::node_geo_instances_to_points_cc::convert_instances_to_points(), blender::bke::DataTypeConversions::convert_to_initialized_n(), blender::fn::evaluate_fields(), blender::nodes::node_geo_points_to_vertices_cc::geometry_set_points_to_vertices(), and blender::bke::CurvesGeometry::interpolate_to_evaluated().
|
inline |
Definition at line 161 of file BLI_generic_span.hh.
References size_.
Referenced by blender::fn::MultiFunction::call_auto(), blender::bke::mesh_surface_sample::MeshAttributeInterpolator::sample_data(), blender::tests::TEST(), and blender::fn::MFParams::uninitialized_single_output().
|
inline |
Definition at line 145 of file BLI_generic_span.hh.
Definition at line 176 of file BLI_generic_span.hh.
References BLI_assert, data_, POINTER_OFFSET, blender::CPPType::size(), size_, and type_.
|
inline |
Definition at line 166 of file BLI_generic_span.hh.
References size_.
Referenced by blender::fn::MFParamsBuilder::add_single_mutable(), blender::fn::MFParamsBuilder::add_uninitialized_single_output(), blender::bke::DataTypeConversions::convert_to_initialized_n(), GMutableSpan(), 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::nodes::node_geo_mesh_to_points_cc::materialize_compressed_to_uninitialized_threaded(), slice(), blender::tests::TEST(), blender::geometry::threaded_copy(), and blender::geometry::threaded_fill().
|
inline |
Definition at line 189 of file BLI_generic_span.hh.
References BLI_assert, data_, GMutableSpan(), min, POINTER_OFFSET, blender::CPPType::size(), size(), size_, and type_.
Referenced by blender::fn::MultiFunction::call_auto(), blender::bke::CurvesGeometry::interpolate_to_evaluated(), and slice().
|
inline |
Definition at line 197 of file BLI_generic_span.hh.
References blender::IndexRange::size(), slice(), and blender::IndexRange::start().
|
inline |
Definition at line 150 of file BLI_generic_span.hh.
References BLI_assert, and type_.
Referenced by blender::fn::MFParamsBuilder::add_single_mutable(), blender::fn::MFParamsBuilder::add_uninitialized_single_output(), blender::fn::CustomMF_DefaultOutput::call(), blender::bke::DataTypeConversions::convert_to_initialized_n(), blender::geometry::duplicate_fillet_point_data(), blender::bke::curves::fill_points(), GMutableSpan(), blender::bke::CurvesGeometry::interpolate_to_evaluated(), blender::nodes::node_geo_mesh_to_points_cc::materialize_compressed_to_uninitialized_threaded(), blender::bke::mesh_surface_sample::sample_corner_attribute(), blender::bke::mesh_surface_sample::sample_face_attribute(), blender::bke::mesh_surface_sample::sample_point_attribute(), blender::geometry::subdivide_attribute_catmull_rom(), blender::geometry::subdivide_attribute_linear(), blender::geometry::threaded_copy(), and blender::geometry::threaded_fill().
|
inline |
Definition at line 156 of file BLI_generic_span.hh.
References type_.
|
inline |
Definition at line 183 of file BLI_generic_span.hh.
References BLI_assert, data_, blender::CPPType::is(), size_, T, and type_.
Referenced by blender::nodes::node_geo_delete_geometry_cc::copy_attributes(), blender::nodes::node_geo_delete_geometry_cc::copy_attributes_based_on_map(), blender::nodes::node_geo_delete_geometry_cc::copy_attributes_based_on_mask(), blender::nodes::node_geo_duplicate_elements_cc::copy_attributes_without_id(), blender::nodes::node_geo_duplicate_elements_cc::copy_curve_attributes_without_id(), blender::nodes::node_geo_duplicate_elements_cc::copy_edge_attributes_without_id(), blender::nodes::node_geo_duplicate_elements_cc::copy_face_attributes_without_id(), 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::bke::mesh_surface_sample::sample_corner_attribute(), blender::bke::mesh_surface_sample::sample_face_attribute(), blender::bke::mesh_surface_sample::sample_point_attribute(), blender::tests::TEST(), and blender::nodes::node_geo_dual_mesh_cc::transfer_attributes().
|
protected |
Definition at line 112 of file BLI_generic_span.hh.
Referenced by copy_from(), data(), blender::GMutableVArraySpan::GMutableVArraySpan(), operator GSpan(), operator[](), blender::GMutableVArraySpan::save(), slice(), and typed().
|
protected |
Definition at line 113 of file BLI_generic_span.hh.
Referenced by copy_from(), blender::GMutableVArraySpan::GMutableVArraySpan(), is_empty(), operator GSpan(), operator[](), size(), slice(), typed(), and blender::GMutableVArraySpan::~GMutableVArraySpan().
|
protected |
Definition at line 111 of file BLI_generic_span.hh.
Referenced by copy_from(), blender::GMutableVArraySpan::GMutableVArraySpan(), operator GSpan(), operator[](), slice(), type(), type_ptr(), typed(), and blender::GMutableVArraySpan::~GMutableVArraySpan().