Blender
V3.3
|
#include <BLI_virtual_array.hh>
Static Public Member Functions | |
template<typename ImplT , typename... Args> | |
static VArray | For (Args &&...args) |
static VArray | ForSingle (T value, const int64_t size) |
static VArray | ForSpan (Span< T > values) |
template<typename GetFunc > | |
static VArray | ForFunc (const int64_t size, GetFunc get_func) |
template<typename StructT , T(*)(const StructT &) GetFunc> | |
static VArray | ForDerivedSpan (Span< StructT > values) |
template<typename ContainerT > | |
static VArray | ForContainer (ContainerT container) |
Additional Inherited Members | |
![]() | |
using | Storage = Any< detail::VArrayAnyExtraInfo< T >, 24, 8 > |
![]() | |
VArrayCommon ()=default | |
VArrayCommon (const VArrayCommon &other) | |
VArrayCommon (VArrayCommon &&other) noexcept | |
VArrayCommon (const VArrayImpl< T > *impl) | |
VArrayCommon (std::shared_ptr< const VArrayImpl< T >> impl) | |
template<typename ImplT , typename... Args> | |
void | emplace (Args &&...args) |
void | copy_from (const VArrayCommon &other) |
void | move_from (VArrayCommon &&other) noexcept |
const VArrayImpl< T > * | impl_from_storage () const |
![]() | |
const VArrayImpl< T > * | impl_ = nullptr |
Storage | storage_ |
A VArray wraps a virtual array implementation and provides easy access to its elements. It can be copied and moved. While it is relatively small, it should still be passed by reference if possible (other than e.g. #Span).
Definition at line 883 of file BLI_virtual_array.hh.
|
default |
Referenced by blender::VArray< T >::ForSingle(), and blender::VArray< T >::ForSpan().
|
default |
|
defaultnoexcept |
|
inline |
Definition at line 891 of file BLI_virtual_array.hh.
|
inline |
Definition at line 895 of file BLI_virtual_array.hh.
|
inline |
Definition at line 899 of file BLI_virtual_array.hh.
References blender::Span< T >::data(), blender::Span< T >::size(), and T.
|
inline |
Definition at line 907 of file BLI_virtual_array.hh.
References blender::VArrayCommon< T >::size().
|
inlinestatic |
Construct a new virtual array for a custom #VArrayImpl.
Definition at line 915 of file BLI_virtual_array.hh.
Referenced by blender::VArray< T >::ForFunc().
|
inlinestatic |
Construct a new virtual array for an existing container. Every container that lays out the elements in a plain array works. This takes ownership of the passed in container. If that is not desired, use ForSpan instead.
Definition at line 967 of file BLI_virtual_array.hh.
Referenced by blender::nodes::node_geo_input_mesh_vertex_neighbors_cc::construct_face_count_gvarray(), blender::nodes::node_geo_input_mesh_face_neighbors_cc::construct_neighbor_count_gvarray(), blender::nodes::node_geo_uv_unwrap_cc::construct_uv_gvarray(), blender::nodes::node_geo_uv_pack_islands_cc::construct_uv_gvarray(), blender::nodes::node_geo_input_mesh_vertex_neighbors_cc::construct_vertex_count_gvarray(), blender::nodes::node_geo_edge_paths_to_selection_cc::PathToEdgeSelectionFieldInput::get_varray_for_context(), blender::nodes::node_geo_curve_handle_type_selection_cc::HandleTypeFieldInput::get_varray_for_context(), blender::nodes::node_geo_field_at_index_cc::FieldAtIndex::get_varray_for_context(), blender::nodes::node_geo_input_curve_handles_cc::HandlePositionFieldInput::get_varray_for_context(), blender::nodes::node_geo_accumulate_field_cc::AccumulateFieldInput< T >::get_varray_for_context(), blender::nodes::node_geo_accumulate_field_cc::TotalFieldInput< T >::get_varray_for_context(), blender::nodes::node_geo_input_mesh_edge_neighbors_cc::EdgeNeighborCountFieldInput::get_varray_for_context(), blender::nodes::node_geo_input_mesh_island_cc::IslandFieldInput::get_varray_for_context(), blender::bke::mesh_normals_varray(), and blender::tests::TEST().
|
inlinestatic |
Construct a new virtual array for an existing span with a mapping function. This does not take ownership of the span.
Definition at line 954 of file BLI_virtual_array.hh.
References blender::Span< T >::data(), and blender::Span< T >::size().
|
inlinestatic |
Construct a new virtual that will invoke the provided function whenever an element is accessed.
Definition at line 944 of file BLI_virtual_array.hh.
References blender::VArray< T >::For(), blender::VArrayCommon< T >::size(), and T.
Referenced by blender::ed::spreadsheet::GeometryDataSource::apply_selection_filter(), blender::nodes::node_geo_input_spline_length_cc::construct_curve_point_count_gvarray(), blender::nodes::node_geo_input_mesh_edge_vertices_cc::construct_edge_positions_gvarray(), blender::nodes::node_geo_input_mesh_edge_vertices_cc::construct_edge_vertices_gvarray(), blender::nodes::node_geo_input_mesh_face_area_cc::construct_face_area_gvarray(), blender::nodes::node_geo_input_mesh_face_neighbors_cc::construct_vertex_count_gvarray(), blender::fn::IndexFieldInput::get_index_varray(), blender::fn::tests::IndexFieldInput::get_varray_for_context(), blender::nodes::node_geo_input_mesh_face_is_planar_cc::PlanarFieldInput::get_varray_for_context(), blender::nodes::node_geo_input_mesh_edge_angle_cc::AngleFieldInput::get_varray_for_context(), blender::nodes::node_geo_input_mesh_edge_angle_cc::SignedAngleFieldInput::get_varray_for_context(), blender::nodes::node_geo_input_instance_rotation_cc::VectorFieldInput::get_varray_for_context(), blender::nodes::node_geo_input_instance_scale_cc::VectorFieldInput::get_varray_for_context(), and blender::tests::TEST().
|
inlinestatic |
Construct a new virtual array that has the same value at every index.
Definition at line 926 of file BLI_virtual_array.hh.
References blender::VArrayCommon< T >::size(), and blender::VArray< T >::VArray().
Referenced by blender::ed::sculpt_paint::get_curves_selection(), blender::ed::sculpt_paint::get_point_selection(), blender::bke::get_varray_attribute(), blender::nodes::node_geo_accumulate_field_cc::TotalFieldInput< T >::get_varray_for_context(), blender::nodes::node_geo_input_mesh_island_cc::IslandCountFieldInput::get_varray_for_context(), blender::bke::AttributeAccessor::lookup_or_default(), blender::tests::TEST(), blender::bke::VertexGroupsAttributeProvider::try_get_for_read(), and blender::GVArray::typed().
|
inlinestatic |
Construct a new virtual array for an existing span. This does not take ownership of the underlying memory.
Definition at line 935 of file BLI_virtual_array.hh.
References blender::VArray< T >::VArray().
Referenced by blender::bke::get_varray_attribute(), blender::bke::make_array_read_attribute(), blender::bke::mesh_normals_varray(), blender::tests::TEST(), blender::bke::NormalAttributeProvider::try_get_for_read(), and blender::GVArray::typed().
|
inline |
Definition at line 972 of file BLI_virtual_array.hh.
References blender::VArrayCommon< T >::copy_from().
|
inlinenoexcept |
Definition at line 978 of file BLI_virtual_array.hh.
References blender::VArrayCommon< T >::move_from().