Blender  V2.93
Classes | Public Member Functions | List of all members
blender::attribute_math::SimpleMixerWithAccumulationType< T, AccumulationT, ConvertToT > Class Template Reference

#include <BKE_attribute_math.hh>

Public Member Functions

 SimpleMixerWithAccumulationType (MutableSpan< T > buffer, T default_value={})
 
void mix_in (const int64_t index, const T &value, const float weight=1.0f)
 
void finalize ()
 

Detailed Description

template<typename T, typename AccumulationT, T(*)(const AccumulationT &value) ConvertToT>
class blender::attribute_math::SimpleMixerWithAccumulationType< T, AccumulationT, ConvertToT >

This mixer accumulates values in a type that is different from the one that is mixed. Some types cannot encode the floating point weights in their values (e.g. int and bool).

Definition at line 159 of file BKE_attribute_math.hh.

Constructor & Destructor Documentation

◆ SimpleMixerWithAccumulationType()

template<typename T , typename AccumulationT , T(*)(const AccumulationT &value) ConvertToT>
blender::attribute_math::SimpleMixerWithAccumulationType< T, AccumulationT, ConvertToT >::SimpleMixerWithAccumulationType ( MutableSpan< T buffer,
T  default_value = {} 
)
inline

Definition at line 172 of file BKE_attribute_math.hh.

Member Function Documentation

◆ finalize()

template<typename T , typename AccumulationT , T(*)(const AccumulationT &value) ConvertToT>
void blender::attribute_math::SimpleMixerWithAccumulationType< T, AccumulationT, ConvertToT >::finalize ( )
inline

Definition at line 185 of file BKE_attribute_math.hh.

References blender::MutableSpan< T >::index_range(), and T.

◆ mix_in()

template<typename T , typename AccumulationT , T(*)(const AccumulationT &value) ConvertToT>
void blender::attribute_math::SimpleMixerWithAccumulationType< T, AccumulationT, ConvertToT >::mix_in ( const int64_t  index,
const T value,
const float  weight = 1.0f 
)
inline

Definition at line 177 of file BKE_attribute_math.hh.


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