|
Blender V4.5
|
#include <BLI_virtual_array.hh>
Inherits blender::VArrayCommon< T >.
Public Member Functions | |
| VArray ()=default | |
| VArray (const VArray &other)=default | |
| VArray (VArray &&other) noexcept=default | |
| VArray (const VArrayImpl< T > *impl) | |
| VArray (std::shared_ptr< const VArrayImpl< T > > impl) | |
| VArray (varray_tag::span, Span< T > span) | |
| VArray (varray_tag::single, T value, const int64_t size) | |
| VArray & | operator= (const VArray &other) |
| VArray & | operator= (VArray &&other) noexcept |
| Public Member Functions inherited from blender::VArrayCommon< T > | |
| operator bool () const | |
| T | operator[] (const int64_t index) const |
| T | get (const int64_t index) const |
| int64_t | size () const |
| T | first () const |
| T | last (const int64_t n=0) const |
| bool | is_empty () const |
| IndexRange | index_range () const |
| CommonVArrayInfo | common_info () const |
| bool | is_span () const |
| Span< T > | get_internal_span () const |
| bool | is_single () const |
| T | get_internal_single () const |
| std::optional< T > | get_if_single () const |
| void | materialize (MutableSpan< T > r_span) const |
| void | materialize (const IndexMask &mask, MutableSpan< T > r_span) const |
| void | materialize_to_uninitialized (MutableSpan< T > r_span) const |
| void | materialize_to_uninitialized (const IndexMask &mask, MutableSpan< T > r_span) const |
| void | materialize_compressed (const IndexMask &mask, MutableSpan< T > r_span) const |
| void | materialize_compressed_to_uninitialized (const IndexMask &mask, MutableSpan< T > r_span) const |
| bool | try_assign_GVArray (GVArray &varray) const |
| const VArrayImpl< T > * | get_implementation () const |
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 | |
| Protected Types inherited from blender::VArrayCommon< T > | |
| using | Storage = Any<blender::detail::VArrayAnyExtraInfo<T>, 24, 8> |
| Protected Member Functions inherited from blender::VArrayCommon< T > | |
| 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 |
| Protected Attributes inherited from blender::VArrayCommon< T > | |
| 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 798 of file BLI_virtual_array.hh.
|
default |
|
default |
|
defaultnoexcept |
|
inline |
Definition at line 806 of file BLI_virtual_array.hh.
|
inline |
Definition at line 808 of file BLI_virtual_array.hh.
|
inline |
Definition at line 810 of file BLI_virtual_array.hh.
|
inline |
Definition at line 815 of file BLI_virtual_array.hh.
|
inlinestatic |
Construct a new virtual array for a custom #VArrayImpl.
Definition at line 823 of file BLI_virtual_array.hh.
Referenced by blender::bke::varray_for_deform_verts().
|
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 875 of file BLI_virtual_array.hh.
Referenced by blender::nodes::node_geo_input_tangent_cc::construct_curve_tangent_gvarray(), blender::nodes::node_geo_curve_spline_parameter_cc::CurveLengthParameterFieldInput::get_varray_for_context(), blender::nodes::node_geo_curve_spline_parameter_cc::CurveParameterFieldInput::get_varray_for_context(), blender::nodes::node_geo_edge_paths_to_selection_cc::PathToEdgeSelectionFieldInput::get_varray_for_context(), blender::nodes::node_geo_input_shortest_edge_paths_cc::ShortestEdgePathsNextVertFieldInput::get_varray_for_context(), and blender::ed::greasepencil::gpencil_stroke_subdivide_exec().
|
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 862 of file BLI_virtual_array.hh.
Referenced by blender::draw::bmesh_normals_domain().
|
inlinestatic |
Construct a new virtual that will invoke the provided function whenever an element is accessed.
Definition at line 852 of file BLI_virtual_array.hh.
Referenced by blender::nodes::node_geo_input_mesh_face_neighbors_cc::construct_vertex_count_varray().
|
inlinestatic |
Construct a new virtual array that has the same value at every index.
Definition at line 834 of file BLI_virtual_array.hh.
Referenced by blender::ed::greasepencil::fit_poly_curves(), blender::bke::MeshVertexGroupsAttributeProvider::get_for_vertex_group_index(), get_varray_attribute(), blender::nodes::node_geo_input_shortest_edge_paths_cc::ShortestEdgePathsCostFieldInput::get_varray_for_context(), blender::ed::greasepencil::gpencil_stroke_subdivide_exec(), blender::geometry::realize_instances(), and blender::ed::greasepencil::render_strokes().
Construct a new virtual array for an existing span. This does not take ownership of the underlying memory.
Definition at line 843 of file BLI_virtual_array.hh.
Referenced by blender::nodes::node_geo_input_tangent_cc::construct_curve_tangent_gvarray(), do_multires_bake(), ensure_weight_attribute_meta_data(), get_varray_attribute(), blender::geometry::preprocess_meshes(), and blender::ed::greasepencil::subdivide_last_segement().
Definition at line 880 of file BLI_virtual_array.hh.
|
inlinenoexcept |
Definition at line 886 of file BLI_virtual_array.hh.