|
Blender V5.0
|
#include <BLI_virtual_array.hh>
Inherited by blender::VArrayImpl_For_Func< T, GetFunc >, blender::VArrayImpl_For_GVArray< T >, blender::VArrayImpl_For_Single< T >, and blender::VMutableArrayImpl< T >.
Public Member Functions | |
| VArrayImpl (const int64_t size) | |
| virtual | ~VArrayImpl ()=default |
| int64_t | size () const |
| virtual T | get (int64_t index) const =0 |
| virtual CommonVArrayInfo | common_info () const |
| virtual void | materialize (const IndexMask &mask, T *dst, const bool dst_is_uninitialized) const |
| virtual void | materialize_compressed (const IndexMask &mask, T *dst, const bool dst_is_uninitialized) const |
| virtual bool | try_assign_GVArray (GVArray &) const |
Protected Attributes | |
| int64_t | size_ |
Implements the specifics of how the elements of a virtual array are accessed. It contains a bunch of virtual methods that are wrapped by VArray.
Definition at line 77 of file BLI_virtual_array.hh.
|
inline |
Definition at line 86 of file BLI_virtual_array.hh.
References BLI_assert, size(), and size_.
Referenced by blender::VArrayImpl_For_Func< T, GetFunc >::VArrayImpl_For_Func(), blender::VArrayImpl_For_GVArray< T >::VArrayImpl_For_GVArray(), and blender::VArrayImpl_For_Single< T >::VArrayImpl_For_Single().
|
virtualdefault |
|
inlinevirtual |
Reimplemented in blender::VArrayImpl_For_GVArray< T >, blender::VArrayImpl_For_Single< T >, blender::VArrayImpl_For_Span< T >, and blender::VArrayImpl_For_Span< typename Container::value_type >.
Definition at line 104 of file BLI_virtual_array.hh.
Referenced by blender::VMutableArrayImpl< T >::set_all().
|
pure virtual |
Get the element at #index. This does not return a reference, because the value may be computed on the fly.
Implemented in blender::bke::VArrayImpl_For_VertexWeights, blender::VArrayImpl_For_GVArray< T >, blender::VArrayImpl_For_Single< T >, blender::VArrayImpl_For_Span< T >, and blender::VArrayImpl_For_Span< typename Container::value_type >.
References T.
Referenced by materialize(), and materialize_compressed().
|
inlinevirtual |
Copy values from the virtual array into the provided span. The index of the value in the virtual array is the same as the index in the span.
Reimplemented in blender::bke::VArrayImpl_For_VertexWeights, blender::VArrayImpl_For_GVArray< T >, blender::VArrayImpl_For_Single< T >, blender::VArrayImpl_For_Span< T >, and blender::VArrayImpl_For_Span< typename Container::value_type >.
Definition at line 113 of file BLI_virtual_array.hh.
|
inlinevirtual |
Copy values from the virtual array into the provided span. Contrary to materialize, the index in virtual array is not the same as the index in the output span. Instead, the span is filled without gaps.
Reimplemented in blender::VArrayImpl_For_GVArray< T >, blender::VArrayImpl_For_Single< T >, blender::VArrayImpl_For_Span< T >, and blender::VArrayImpl_For_Span< typename Container::value_type >.
Definition at line 133 of file BLI_virtual_array.hh.
|
inline |
Definition at line 93 of file BLI_virtual_array.hh.
References size_.
Referenced by blender::VMutableArrayImpl< T >::set_all(), VArrayImpl(), blender::VArrayImpl_For_Func< T, GetFunc >::VArrayImpl_For_Func(), blender::VArrayImpl_For_GVArray< T >::VArrayImpl_For_GVArray(), blender::VArrayImpl_For_Single< T >::VArrayImpl_For_Single(), blender::VArrayImpl_For_Span< T >::VArrayImpl_For_Span(), blender::VArrayImpl_For_Span< T >::VArrayImpl_For_Span(), and blender::VMutableArrayImpl_For_GVMutableArray< T >::VMutableArrayImpl_For_GVMutableArray().
|
inlinevirtual |
If this virtual wraps another GVArray, this method should assign the wrapped array to the provided reference. This allows losslessly converting between generic and typed virtual arrays in all cases. Return true when the virtual array was assigned and false when nothing was done.
Reimplemented in blender::VArrayImpl_For_GVArray< T >.
Definition at line 157 of file BLI_virtual_array.hh.
|
protected |
Number of elements in the virtual array. All virtual arrays have a size, but in some cases it may make sense to set it to the max value.
Definition at line 83 of file BLI_virtual_array.hh.
Referenced by blender::VMutableArrayImpl< T >::set_all(), size(), and VArrayImpl().