Blender  V3.3
Public Member Functions | List of all members
blender::bke::VArray_For_SplineToPoint< T > Class Template Referencefinal
Inheritance diagram for blender::bke::VArray_For_SplineToPoint< T >:
blender::VArrayImpl< T >

Public Member Functions

 VArray_For_SplineToPoint (GVArray original_varray, Array< int > offsets)
 
T get (const int64_t index) const final
 
void materialize (const IndexMask mask, MutableSpan< T > r_span) const final
 
void materialize_to_uninitialized (const IndexMask mask, MutableSpan< T > r_span) const final
 
- Public Member Functions inherited from blender::VArrayImpl< T >
 VArrayImpl (const int64_t size)
 
virtual ~VArrayImpl ()=default
 
int64_t size () const
 
virtual CommonVArrayInfo common_info () const
 
virtual void materialize_compressed (IndexMask mask, MutableSpan< T > r_span) const
 
virtual void materialize_compressed_to_uninitialized (IndexMask mask, MutableSpan< T > r_span) const
 
virtual bool try_assign_GVArray (GVArray &UNUSED(varray)) const
 
virtual bool is_same (const VArrayImpl< T > &UNUSED(other)) const
 

Additional Inherited Members

- Protected Attributes inherited from blender::VArrayImpl< T >
int64_t size_
 

Detailed Description

template<typename T>
class blender::bke::VArray_For_SplineToPoint< T >

A virtual array implementation for the conversion of spline attributes to control point attributes. The goal is to avoid copying the spline value for every one of its control points unless it is necessary (in that case the materialize functions will be called).

Definition at line 211 of file geometry_component_curve.cc.

Constructor & Destructor Documentation

◆ VArray_For_SplineToPoint()

template<typename T >
blender::bke::VArray_For_SplineToPoint< T >::VArray_For_SplineToPoint ( GVArray  original_varray,
Array< int >  offsets 
)
inline

Definition at line 219 of file geometry_component_curve.cc.

Member Function Documentation

◆ get()

template<typename T >
T blender::bke::VArray_For_SplineToPoint< T >::get ( const int64_t  index) const
inlinefinalvirtual

Get the element at #index. This does not return a reference, because the value may be computed on the fly.

Implements blender::VArrayImpl< T >.

Definition at line 227 of file geometry_component_curve.cc.

References indices, and blender::bke::lookup_point_indices().

◆ materialize()

template<typename T >
void blender::bke::VArray_For_SplineToPoint< T >::materialize ( const IndexMask  mask,
MutableSpan< T r_span 
) const
inlinefinalvirtual

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 from blender::VArrayImpl< T >.

Definition at line 233 of file geometry_component_curve.cc.

References blender::Array< T, InlineBufferCapacity, Allocator >::fill(), blender::Span< T >::index_range(), blender::Array< T, InlineBufferCapacity, Allocator >::last(), mask(), offset, and spline_index.

◆ materialize_to_uninitialized()

template<typename T >
void blender::bke::VArray_For_SplineToPoint< T >::materialize_to_uninitialized ( const IndexMask  mask,
MutableSpan< T r_span 
) const
inlinefinalvirtual

The documentation for this class was generated from the following file: