Blender V5.0
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 386 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 394 of file BKE_attribute_math.hh.

References BooleanPropagationMixer().

Referenced by BooleanPropagationMixer().

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

References i, and mask().

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

◆ finalize() [2/2]

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

Definition at line 428 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 418 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 410 of file BKE_attribute_math.hh.


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