Blender V5.3
blender::VecSwizzleReadWrite< T, Size > Struct Template Reference

#include <BLI_math_vector_swizzle.hh>

Public Types

using VecT = VecBase<T, Size>

Public Member Functions

VecT & operator() ()
const VecT & operator() () const

Detailed Description

template<typename T, int Size>
struct blender::VecSwizzleReadWrite< T, Size >

Swizzle class that supports assignment. Does not support reordering of component. Will decay to a vector of the same size. Can only be used if all swizzled components points to different memory locations (no xxyy).

IMPORTANT: Must be declared at the same memory location as the first component referenced in the swizzle. So for yz it is y. We do this to allow the copy constructor to copy only the referenced component in the case of something like a.zzy = b.zzy. This is because we do not want to override (or delete) the copy constructor as it would make the vector types non-trivial.

Definition at line 125 of file BLI_math_vector_swizzle.hh.

Member Typedef Documentation

◆ VecT

template<typename T, int Size>
using blender::VecSwizzleReadWrite< T, Size >::VecT = VecBase<T, Size>

Definition at line 126 of file BLI_math_vector_swizzle.hh.

Member Function Documentation

◆ operator()() [1/2]

template<typename T, int Size>
VecT & blender::VecSwizzleReadWrite< T, Size >::operator() ( )
inlinenodiscard

Definition at line 132 of file BLI_math_vector_swizzle.hh.

References blender::BLI_STATIC_ASSERT(), and T.

◆ operator()() [2/2]

template<typename T, int Size>
const VecT & blender::VecSwizzleReadWrite< T, Size >::operator() ( ) const
inlinenodiscard

Definition at line 142 of file BLI_math_vector_swizzle.hh.

References blender::BLI_STATIC_ASSERT(), and T.


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