Blender V4.3
blender::bke::attribute_math::BooleanPropagationMixer Class Reference

#include <BKE_attribute_math.hh>

Public Member Functions

 BooleanPropagationMixer (MutableSpan< bool > buffer)
 
 BooleanPropagationMixer (MutableSpan< bool > buffer, const IndexMask &mask)
 
void set (const int64_t index, const bool value, const float weight=1.0f)
 
void mix_in (const int64_t index, const bool value, const float weight=1.0f)
 
void finalize ()
 
void finalize (const IndexMask &)
 

Detailed Description

Mixes together booleans with "or" while fitting the same interface as the other mixers in order to be simpler to use. This mixing method has a few benefits:

  • An "average" for selections is relatively meaningless.
  • Predictable selection propagation is very super important.
  • It's generally easier to remove an element from a selection that is slightly too large than the opposite.

Definition at line 359 of file BKE_attribute_math.hh.

Constructor & Destructor Documentation

◆ BooleanPropagationMixer() [1/2]

blender::bke::attribute_math::BooleanPropagationMixer::BooleanPropagationMixer ( MutableSpan< bool > buffer)
inline
Parameters
bufferSpan where the interpolated values should be stored.

Definition at line 367 of file BKE_attribute_math.hh.

◆ BooleanPropagationMixer() [2/2]

blender::bke::attribute_math::BooleanPropagationMixer::BooleanPropagationMixer ( MutableSpan< bool > buffer,
const IndexMask & mask )
inline
Parameters
maskOnly initialize these indices. Other indices in the buffer will be invalid.

Definition at line 375 of file BKE_attribute_math.hh.

Member Function Documentation

◆ finalize() [1/2]

void blender::bke::attribute_math::BooleanPropagationMixer::finalize ( )
inline

Does not do anything, since the mixing is trivial.

Definition at line 399 of file BKE_attribute_math.hh.

◆ finalize() [2/2]

void blender::bke::attribute_math::BooleanPropagationMixer::finalize ( const IndexMask & )
inline

Definition at line 401 of file BKE_attribute_math.hh.

◆ mix_in()

void blender::bke::attribute_math::BooleanPropagationMixer::mix_in ( const int64_t index,
const bool value,
const float weight = 1.0f )
inline

Mix a #value into the element with the given #index.

Definition at line 391 of file BKE_attribute_math.hh.

◆ set()

void blender::bke::attribute_math::BooleanPropagationMixer::set ( const int64_t index,
const bool value,
const float weight = 1.0f )
inline

Set a #value into the element with the given #index.

Definition at line 383 of file BKE_attribute_math.hh.


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