Blender V4.3
blender::bke::attribute_math::SimpleMixerWithAccumulationType< T, AccumulationT, ValueToAccumulate, AccumulateToValue > Class Template Reference

#include <BKE_attribute_math.hh>

Public Member Functions

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

Detailed Description

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

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 412 of file BKE_attribute_math.hh.

Constructor & Destructor Documentation

◆ SimpleMixerWithAccumulationType() [1/2]

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

Definition at line 425 of file BKE_attribute_math.hh.

◆ SimpleMixerWithAccumulationType() [2/2]

template<typename T , typename AccumulationT , AccumulationT(*)(const T &value) ValueToAccumulate, T(*)(const AccumulationT &value) AccumulateToValue>
blender::bke::attribute_math::SimpleMixerWithAccumulationType< T, AccumulationT, ValueToAccumulate, AccumulateToValue >::SimpleMixerWithAccumulationType ( MutableSpan< T > buffer,
const IndexMask & mask,
T default_value = {} )
inline
Parameters
maskOnly initialize these indices. Other indices in the buffer will be invalid.

Definition at line 433 of file BKE_attribute_math.hh.

Member Function Documentation

◆ finalize() [1/2]

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

Definition at line 457 of file BKE_attribute_math.hh.

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

◆ finalize() [2/2]

template<typename T , typename AccumulationT , AccumulationT(*)(const T &value) ValueToAccumulate, T(*)(const AccumulationT &value) AccumulateToValue>
void blender::bke::attribute_math::SimpleMixerWithAccumulationType< T, AccumulationT, ValueToAccumulate, AccumulateToValue >::finalize ( const IndexMask & mask)
inline

Definition at line 462 of file BKE_attribute_math.hh.

◆ mix_in()

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

Definition at line 449 of file BKE_attribute_math.hh.

◆ set()

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

Definition at line 441 of file BKE_attribute_math.hh.


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