Blender V5.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 664 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 677 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 685 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 709 of file BKE_attribute_math.hh.

◆ 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 714 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 701 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 693 of file BKE_attribute_math.hh.


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