Blender V5.0
blender::bke::NormalsCache Class Reference

#include <BKE_mesh_types.hh>

Classes

struct  UseTrueCache

Public Member Functions

MutableSpan< float3ensure_vector_size (const int size)
Span< float3get_span () const
void store_varray (const VArray< float3 > &data)
void store_vector (Vector< float3 > &&data)

Public Attributes

std::variant< UseTrueCache, Vector< float3 >, Span< float3 > > data

Detailed Description

Similar to VArraySpan but with the ability to be resized and updated.

Definition at line 102 of file BKE_mesh_types.hh.

Member Function Documentation

◆ ensure_vector_size()

MutableSpan< float3 > blender::bke::NormalsCache::ensure_vector_size ( const int size)

Definition at line 60 of file mesh_normals.cc.

References data, size(), and blender::bke::Vector.

Referenced by store_varray().

◆ get_span()

Span< float3 > blender::bke::NormalsCache::get_span ( ) const

Definition at line 71 of file mesh_normals.cc.

References data.

◆ store_varray()

void blender::bke::NormalsCache::store_varray ( const VArray< float3 > & data)
Note
The caller must ensure that the data is valid as long as the cache.

Definition at line 79 of file mesh_normals.cc.

References data, ensure_vector_size(), and blender::VArrayCommon< T >::size().

◆ store_vector()

void blender::bke::NormalsCache::store_vector ( Vector< float3 > && data)

Definition at line 89 of file mesh_normals.cc.

References data.

Member Data Documentation

◆ data

std::variant<UseTrueCache, Vector<float3>, Span<float3> > blender::bke::NormalsCache::data

Definition at line 110 of file BKE_mesh_types.hh.

Referenced by ensure_vector_size(), get_span(), store_varray(), and store_vector().


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