|
Blender V5.3
|
#include <BLI_generic_virtual_array.hh>
Inherited by blender::GVArray, and blender::GVMutableArray.
Public Member Functions | |
| bool | may_have_ownership () const |
Protected Member Functions | |
| GVArrayCommon ()=default | |
Protected Attributes | |
| AnyDerived< const GVArrayImpl, 40 > | impl_ |
#GVArrayCommon | |
| GVArrayCommon (const GVArrayImpl *impl) | |
| GVArrayCommon (std::shared_ptr< const GVArrayImpl > impl) | |
| IndexRange | index_range () const |
| void | materialize (void *dst) const |
| void | materialize (const IndexMask &mask, void *dst) const |
| void | materialize_to_uninitialized (void *dst) const |
| void | materialize_to_uninitialized (const IndexMask &mask, void *dst) const |
| void | materialize_compressed (const IndexMask &mask, void *dst) const |
| void | materialize_compressed_to_uninitialized (const IndexMask &mask, void *dst) const |
| bool | is_span () const |
| GSpan | get_internal_span () const |
| bool | is_single () const |
| void | get_internal_single (void *r_value) const |
| void | get_internal_single_to_uninitialized (void *r_value) const |
Inline methods for #GVArrayCommon. | |
| template<typename ImplT, typename... Args> | |
| void | emplace (Args &&...args) |
| const CPPType & | type () const |
| operator bool () const | |
| int64_t | size () const |
| bool | is_empty () const |
| template<typename T> | |
| bool | try_assign_VArray (VArray< T > &varray) const |
| CommonVArrayInfo | common_info () const |
| void | get (int64_t index, void *r_value) const |
| template<typename T> | |
| T | get (int64_t index) const |
| void | get_to_uninitialized (int64_t index, void *r_value) const |
Utility class to reduce code duplication between GVArray and GVMutableArray. It pretty much follows VArrayCommon. Don't use this class outside of this header.
Definition at line 91 of file BLI_generic_virtual_array.hh.
|
protecteddefault |
References emplace(), index_range(), is_empty(), size(), try_assign_VArray(), and type().
Referenced by blender::GVArray::GVArray(), blender::GVArray::GVArray(), blender::GVMutableArray::GVMutableArray(), blender::GVMutableArray::GVMutableArray(), blender::GVMutableArray::operator GVArray(), and blender::GVMutableArray::operator GVArray().
|
protected |
Definition at line 548 of file generic_virtual_array.cc.
References impl_.
|
protected |
Definition at line 550 of file generic_virtual_array.cc.
References impl_.
|
inline |
Definition at line 770 of file BLI_generic_virtual_array.hh.
References impl_.
Referenced by blender::nodes::node_geo_instance_on_points_cc::add_instances_from_component(), blender::bke::attribute_init_to_data(), blender::GVArrayImpl_For_SlicedGVArray::common_info(), blender::VArrayImpl_For_GVArray< T >::common_info(), blender::nodes::node_geo_instances_to_points_cc::convert_instances_to_points(), blender::geometry::copy_and_mix_attributes(), blender::nodes::node_geo_duplicate_elements_cc::copy_attributes_from_other_domains(), blender::bke::subdiv::create_attrs_and_retrieve_interp_spans(), blender::geometry::create_curve_from_vert_indices(), blender::bke::curve_to_mesh_sweep(), blender::ed::pointcloud::duplicate_points(), blender::GVMutableArray::fill(), blender::bke::fill_attribute_range_default(), blender::nodes::node_geo_mesh_to_points_cc::geometry_set_mesh_to_points(), blender::nodes::node_geo_points_to_vertices_cc::geometry_set_points_to_vertices(), blender::nodes::node_geo_interpolate_curves_cc::interpolate_curve_attributes(), may_have_ownership(), blender::geometry::merge_points(), blender::bke::mesh_remesh_reproject_attributes(), blender::nodes::node_geo_distribute_points_on_faces_cc::propagate_attributes(), blender::geometry::reorder_and_flip_attributes_group_to_group(), blender::geometry::reorder_attributes_group_to_group(), blender::ed::curves::resize_curves(), blender::geometry::retrieve_attribute_spans(), blender::bke::retrieve_attributes_for_transfer(), blender::GVArray::slice(), blender::nodes::node_geo_dual_mesh_cc::transfer_attributes(), blender::nodes::node_geo_transfer_attributes_cc::transfer_attributes(), blender::bke::try_add_single_value_attribute(), blender::bke::try_capture_fields_on_geometry(), blender::ed::mesh::try_join_single_value_attribute(), blender::geometry::try_join_single_value_attribute(), blender::geometry::construct::try_propagate_single_value(), blender::GVArray::typed(), and blender::GVMutableArray::typed().
|
inlineprotected |
Definition at line 722 of file BLI_generic_virtual_array.hh.
References impl_.
Referenced by blender::GVArray::from(), blender::GVMutableArray::from(), blender::GVArray::GVArray(), blender::GVArray::GVArray(), blender::GVArray::GVArray(), and GVArrayCommon().
Returns a copy of the value at the given index. Usually a typed virtual array should be used instead, but sometimes this is simpler when only a few indices are needed.
Definition at line 736 of file BLI_generic_virtual_array.hh.
References blender::BLI_assert(), impl_, size(), T, and type().
|
inline |
Definition at line 729 of file BLI_generic_virtual_array.hh.
References blender::BLI_assert(), impl_, and size().
Referenced by blender::fn::multi_function::tests::GenericAppendFunction::call(), blender::ed::greasepencil::copy_layer_and_frames_to_target_object(), blender::GVectorArray::extend(), blender::nodes::node_fn_format_string_cc::format_with_fmt(), blender::nodes::node_fn_format_string_cc::format_with_hash_syntax(), blender::nodes::node_fn_format_string_cc::format_without_format_specifier(), blender::GVArrayImpl_For_SlicedGVArray::get(), blender::VArrayImpl_For_GVArray< T >::get(), may_have_ownership(), and blender::transform_active_color_data().
| void blender::GVArrayCommon::get_internal_single | ( | void * | r_value | ) | const |
Copies the value that is used for every element into r_value, which is expected to point to initialized memory. This invokes undefined behavior if the virtual array would not return the same value for every index.
Definition at line 602 of file generic_virtual_array.cc.
References blender::BLI_assert(), blender::CPPType::copy_assign(), blender::CommonVArrayInfo::data, impl_, is_single(), and type().
Referenced by blender::bke::CurvesGeometry::adapt_domain(), blender::bke::adapt_mesh_attribute_domain(), blender::fn::multi_function::DivideFunction::call(), blender::fn::multi_function::PowFunction::call(), get_internal_single_to_uninitialized(), and may_have_ownership().
| void blender::GVArrayCommon::get_internal_single_to_uninitialized | ( | void * | r_value | ) | const |
Same as get_internal_single, but r_value points to initialized memory.
Definition at line 609 of file generic_virtual_array.cc.
References get_internal_single(), and impl_.
Referenced by may_have_ownership().
| GSpan blender::GVArrayCommon::get_internal_span | ( | ) | const |
Returns the internally used span of the virtual array. This invokes undefined behavior if the virtual array is not stored as a span internally.
Definition at line 589 of file generic_virtual_array.cc.
References blender::BLI_assert(), blender::CommonVArrayInfo::data, blender::GSpan::GSpan(), impl_, is_span(), and type().
Referenced by blender::ed::greasepencil::attributes_varrays_span_data_equal(), blender::bke::build_mesh_positions(), blender::bke::evaluate_attribute(), blender::bke::gather_attributes(), may_have_ownership(), blender::ed::sculpt_paint::replace_attribute(), blender::bke::try_direct_evaluate_point_data(), and blender::bke::try_sharing_point_data().
|
inline |
Definition at line 747 of file BLI_generic_virtual_array.hh.
References blender::BLI_assert(), impl_, and size().
Referenced by blender::GVArrayImpl_For_SlicedGVArray::get_to_uninitialized(), blender::bke::EvaluateOnDomainInput::get_varray_for_context(), blender::nodes::LazyFunctionForReduceForeachGeometryElement::handle_generation_items_group(), may_have_ownership(), and blender::nodes::LazyFunctionForForeachGeometryElementZone::prepare_components().
| IndexRange blender::GVArrayCommon::index_range | ( | ) | const |
Definition at line 615 of file generic_virtual_array.cc.
References blender::IndexRange::IndexRange(), and size().
Referenced by blender::bke::attribute_init_to_data(), blender::array_utils::copy(), blender::bke::EvaluateAtIndexInput::get_varray_for_context(), GVArrayCommon(), and blender::geometry::threaded_copy().
|
inline |
Definition at line 783 of file BLI_generic_virtual_array.hh.
References size().
Referenced by blender::bke::CurvesGeometry::adapt_domain(), blender::bke::adapt_mesh_attribute_domain(), attr_create_generic(), and GVArrayCommon().
| bool blender::GVArrayCommon::is_single | ( | ) | const |
Returns true when the virtual array returns the same value for every index.
Definition at line 596 of file generic_virtual_array.cc.
References impl_, blender::CommonVArrayInfo::Single, and blender::CommonVArrayInfo::type.
Referenced by blender::bke::CurvesGeometry::adapt_domain(), blender::bke::adapt_mesh_attribute_domain(), blender::fn::multi_function::DivideFunction::call(), blender::fn::multi_function::PowFunction::call(), blender::draw::extract_attribute_data(), blender::fn::find_varying_fields(), get_internal_single(), and may_have_ownership().
| bool blender::GVArrayCommon::is_span | ( | ) | const |
Returns true when the virtual array is stored as a span internally.
Definition at line 583 of file generic_virtual_array.cc.
References impl_, blender::CommonVArrayInfo::Span, and blender::CommonVArrayInfo::type.
Referenced by blender::ed::greasepencil::attributes_varrays_span_data_equal(), blender::bke::build_mesh_positions(), blender::nodes::node_geo_curves_to_grease_pencil_cc::curve_instances_to_grease_pencil_layers(), blender::bke::evaluate_attribute(), blender::fn::evaluate_fields(), blender::bke::gather_attributes(), get_internal_span(), blender::GVMutableArray::get_internal_span(), may_have_ownership(), blender::nodes::node_geo_grease_pencil_to_curves_cc::node_geo_exec(), blender::ed::sculpt_paint::replace_attribute(), blender::bke::try_direct_evaluate_point_data(), and blender::bke::try_sharing_point_data().
| void blender::GVArrayCommon::materialize | ( | const IndexMask & | mask, |
| void * | dst ) const |
Definition at line 557 of file generic_virtual_array.cc.
References impl_.
| void blender::GVArrayCommon::materialize | ( | void * | dst | ) | const |
Definition at line 552 of file generic_virtual_array.cc.
References impl_, blender::IndexMask::IndexMask(), and materialize().
Referenced by blender::array_utils::copy(), blender::array_utils::copy(), blender::bke::evaluate_attribute(), blender::face_corner_color_equalize_verts(), blender::ed::mesh::join_generic_attributes(), materialize(), and may_have_ownership().
| void blender::GVArrayCommon::materialize_compressed | ( | const IndexMask & | mask, |
| void * | dst ) const |
Definition at line 573 of file generic_virtual_array.cc.
References impl_.
Referenced by blender::array_utils::gather(), and may_have_ownership().
| void blender::GVArrayCommon::materialize_compressed_to_uninitialized | ( | const IndexMask & | mask, |
| void * | dst ) const |
Definition at line 578 of file generic_virtual_array.cc.
References impl_.
Referenced by may_have_ownership().
| void blender::GVArrayCommon::materialize_to_uninitialized | ( | const IndexMask & | mask, |
| void * | dst ) const |
Definition at line 567 of file generic_virtual_array.cc.
References blender::BLI_assert(), and impl_.
| void blender::GVArrayCommon::materialize_to_uninitialized | ( | void * | dst | ) | const |
Definition at line 562 of file generic_virtual_array.cc.
References impl_, blender::IndexMask::IndexMask(), and materialize_to_uninitialized().
Referenced by blender::bke::attribute_init_to_data(), blender::fn::multi_function::CustomMF_GenericCopy::call(), blender::fn::multi_function::DivideFunction::call(), blender::fn::multi_function::PowFunction::call(), blender::nodes::node_geo_index_switch_cc::IndexSwitchFunction::call(), blender::nodes::node_geo_menu_switch_cc::MenuSwitchFn::call(), blender::ed::geometry::convert_attribute(), blender::bke::MutableAttributeAccessor::convert_or_add_for_write(), blender::ed::greasepencil::ensure_selection_domain(), materialize_to_uninitialized(), may_have_ownership(), and blender::nodes::node_geo_transfer_attributes_cc::transfer_attributes().
| bool blender::GVArrayCommon::may_have_ownership | ( | ) | const |
|
inline |
Definition at line 765 of file BLI_generic_virtual_array.hh.
References impl_.
|
inline |
Definition at line 775 of file BLI_generic_virtual_array.hh.
References impl_.
Referenced by blender::fn::multi_function::ParamsBuilder::add_readonly_single_input(), blender::bke::attribute_init_to_data(), blender::ed::greasepencil::attributes_varrays_not_equal(), blender::bke::call_convert_to_uninitialized_fn(), blender::ed::geometry::convert_attribute(), blender::bke::MutableAttributeAccessor::convert_or_add_for_write(), blender::array_utils::copy(), blender::array_utils::copy(), blender::ed::greasepencil::ensure_selection_domain(), blender::fn::evaluate_fields(), blender::GVectorArray::extend(), blender::GVMutableArray::fill(), blender::nodes::node_fn_format_string_cc::format_strings(), blender::GVArray::from_func(), blender::GVArray::from_single(), blender::GVArray::from_single_default(), blender::GVArray::from_single_ref(), blender::GVArray::from_std_func(), get(), get(), get_to_uninitialized(), blender::GVArray::GVArray(), blender::GVArray::GVArray(), blender::GVArray::GVArray(), GVArrayCommon(), blender::GVArrayImpl_For_SlicedGVArray::GVArrayImpl_For_SlicedGVArray(), index_range(), is_empty(), blender::GVMutableArray::set_by_copy(), blender::GVMutableArray::set_by_move(), blender::GVMutableArray::set_by_relocate(), blender::ed::spreadsheet::ColumnValues::size(), blender::geometry::threaded_copy(), blender::nodes::node_geo_transfer_attributes_cc::transfer_attributes(), and blender::bke::transform_custom_normal_attribute().
|
inline |
Definition at line 754 of file BLI_generic_virtual_array.hh.
References blender::BLI_assert(), impl_, and T.
Referenced by GVArrayCommon(), and blender::GVArray::typed().
|
inline |
Definition at line 760 of file BLI_generic_virtual_array.hh.
References impl_.
Referenced by blender::ed::sculpt_paint::color::active_color_attribute(), blender::bke::adapt_curve_domain_curve_to_point(), blender::bke::adapt_curve_domain_point_to_curve(), blender::bke::CurvesGeometry::adapt_domain(), blender::bke::adapt_mesh_attribute_domain(), blender::bke::adapt_mesh_domain_corner_to_edge(), blender::bke::adapt_mesh_domain_corner_to_face(), blender::bke::adapt_mesh_domain_corner_to_point(), blender::bke::adapt_mesh_domain_edge_to_corner(), blender::bke::adapt_mesh_domain_edge_to_face(), blender::bke::adapt_mesh_domain_edge_to_point(), blender::bke::adapt_mesh_domain_face_to_corner(), blender::bke::adapt_mesh_domain_face_to_edge(), blender::bke::adapt_mesh_domain_face_to_point(), blender::bke::adapt_mesh_domain_point_to_corner(), blender::bke::adapt_mesh_domain_point_to_edge(), blender::bke::adapt_mesh_domain_point_to_face(), blender::nodes::node_geo_instance_on_points_cc::add_instances_from_component(), blender::fn::multi_function::ParamsBuilder::add_readonly_single_input(), blender::ed::spreadsheet::apply_row_filter(), attr_create_generic(), attr_create_generic(), attr_create_motion_corner_normals(), attr_need_motion_vertex_normals(), blender::bke::attribute_init_to_data(), blender::ed::greasepencil::attributes_varrays_not_equal(), blender::BKE_mesh_mirror_apply_mirror_on_axis_for_modifier(), blender::geometry::construct::build_output_mesh(), blender::fn::multi_function::tests::GenericAppendFunction::call(), blender::ed::geometry::convert_attribute(), blender::nodes::node_geo_instances_to_points_cc::convert_instances_to_points(), blender::bke::MutableAttributeAccessor::convert_or_add_for_write(), blender::array_utils::copy(), blender::array_utils::copy(), blender::geometry::copy_and_mix_attributes(), copy_attributes(), blender::nodes::node_geo_duplicate_elements_cc::copy_attributes_from_other_domains(), blender::bke::copy_curve_domain_attribute_to_mesh(), blender::bke::copy_main_point_domain_attribute_to_mesh(), 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::subdiv::create_attrs_and_retrieve_interp_spans(), blender::geometry::create_curve_from_vert_indices(), blender::geometry::create_id_index_map(), blender::bke::curve_to_mesh_sweep(), blender::ed::greasepencil::curves_geometry_is_equal(), blender::ed::pointcloud::duplicate_points(), blender::ed::greasepencil::ensure_selection_domain(), blender::bke::evaluate_attribute(), blender::fn::evaluate_fields(), blender::GVectorArray::extend(), blender::draw::extract_attribute(), blender::draw::extract_attribute_data(), blender::draw::extract_attribute_subdiv(), blender::ed::curves::extrude_curves(), blender::GVMutableArray::fill(), blender::bke::fill_attribute_range_default(), blender::ed::spreadsheet::ColumnValues::fit_column_values_width_px(), blender::nodes::node_fn_format_string_cc::format_with_fmt(), blender::nodes::node_fn_format_string_cc::format_with_hash_syntax(), blender::nodes::node_fn_format_string_cc::format_with_python_compatible_syntax(), blender::nodes::node_fn_format_string_cc::format_without_format_specifier(), blender::GVArray::from_empty(), blender::GVArray::from_func(), blender::GVArray::from_single(), blender::GVArray::from_single_default(), blender::GVArray::from_single_ref(), blender::GVArray::from_std_func(), blender::array_utils::gather(), blender::bke::attribute_math::gather(), blender::geometry::gather_realize_tasks_for_instances(), blender::ed::geometry::geometry_color_attribute_duplicate_exec(), blender::nodes::node_geo_mesh_to_points_cc::geometry_set_mesh_to_points(), blender::nodes::node_geo_points_to_vertices_cc::geometry_set_points_to_vertices(), get(), get_internal_single(), get_internal_span(), blender::GVMutableArray::get_internal_span(), blender::bke::EvaluateAtIndexInput::get_varray_for_context(), blender::nodes::node_geo_accumulate_field_cc::AccumulateFieldInput::get_varray_for_context(), blender::nodes::node_geo_accumulate_field_cc::TotalFieldInput::get_varray_for_context(), blender::nodes::node_geo_field_average_cc::FieldAverageInput::get_varray_for_context(), blender::nodes::node_geo_field_min_and_max_cc::FieldMinMaxInput::get_varray_for_context(), blender::nodes::node_geo_field_variance_cc::FieldVarianceInput::get_varray_for_context(), blender::GVArray::GVArray(), blender::GVArray::GVArray(), blender::GVArray::GVArray(), GVArrayCommon(), blender::nodes::LazyFunctionForReduceForeachGeometryElement::handle_generation_items_group(), blender::nodes::node_geo_interpolate_curves_cc::interpolate_curve_attributes(), blender::ed::mesh::join_normals(), blender::geometry::merge_points(), blender::bke::mesh_remesh_reproject_attributes(), blender::geometry::preprocess_curves(), blender::geometry::preprocess_meshes(), blender::geometry::preprocess_pointclouds(), blender::nodes::node_geo_distribute_points_on_faces_cc::propagate_attributes(), blender::geometry::reorder_and_flip_attributes_group_to_group(), blender::geometry::reorder_attributes_group_to_group(), blender::ed::curves::resize_curves(), blender::geometry::retrieve_attribute_spans(), blender::geometry::retrieve_attribute_spans(), blender::bke::retrieve_attributes_for_transfer(), blender::bke::mesh_surface_sample::sample_corner_attribute(), blender::bke::sample_corner_attributes(), blender::bke::mesh_surface_sample::sample_face_attribute(), blender::bke::mesh_surface_sample::sample_point_attribute(), blender::bke::sample_vertex_attributes(), blender::GVArray::slice(), blender::bke::compare_geometry::sort_domain_using_attributes(), blender::geometry::threaded_copy(), blender::nodes::node_geo_dual_mesh_cc::transfer_attributes(), blender::nodes::node_geo_transfer_attributes_cc::transfer_attributes(), blender::transform_active_color_data(), blender::bke::transform_custom_normal_attribute(), blender::bke::try_add_single_value_attribute(), blender::bke::try_capture_fields_on_geometry(), blender::bke::DataTypeConversions::try_convert(), blender::bke::DataTypeConversions::try_convert(), blender::ed::mesh::try_join_single_value_attribute(), blender::geometry::try_join_single_value_attribute(), blender::geometry::construct::try_propagate_single_value(), blender::bke::try_sharing_point_data(), blender::ed::spreadsheet::ColumnValues::type(), blender::draw::pbvh::update_generic_attribute_grids(), blender::draw::pbvh::update_generic_attribute_mesh(), blender::VArrayImpl_For_GVArray< T >::VArrayImpl_For_GVArray(), blender::bke::compare_geometry::verify_attributes_compatible(), blender::vertex_paint_from_weight(), and blender::VMutableArrayImpl_For_GVMutableArray< T >::VMutableArrayImpl_For_GVMutableArray().
|
protected |
Definition at line 93 of file BLI_generic_virtual_array.hh.
Referenced by common_info(), emplace(), get(), get(), blender::GVArray::get_implementation(), get_internal_single(), get_internal_single_to_uninitialized(), get_internal_span(), blender::GVMutableArray::get_internal_span(), get_to_uninitialized(), GVArrayCommon(), GVArrayCommon(), is_single(), is_span(), materialize(), materialize(), materialize_compressed(), materialize_compressed_to_uninitialized(), materialize_to_uninitialized(), materialize_to_uninitialized(), operator bool(), size(), try_assign_VArray(), blender::GVMutableArray::try_assign_VMutableArray(), type(), and blender::GVArray::typed().