Blender V5.3
attribute_math.cc File Reference
#include <algorithm>
#include "BLI_array_utils.hh"
#include "BLI_math_euler.hh"
#include "BLI_math_matrix.hh"
#include "BLI_math_quaternion.hh"
#include "PRF_profile.hh"
#include "BKE_attribute_math.hh"

Go to the source code of this file.

Namespaces

namespace  blender
 BMesh Iterators.
namespace  blender::bke
namespace  blender::bke::attribute_math

Functions

template<>
math::Quaternion blender::bke::attribute_math::mix2 (const float factor, const math::Quaternion &a, const math::Quaternion &b)
template<>
math::Quaternion blender::bke::attribute_math::mix3 (const float3 &weights, const math::Quaternion &v0, const math::Quaternion &v1, const math::Quaternion &v2)
template<>
math::Quaternion blender::bke::attribute_math::mix4 (const float4 &weights, const math::Quaternion &v0, const math::Quaternion &v1, const math::Quaternion &v2, const math::Quaternion &v3)
template<>
float4x4 blender::bke::attribute_math::mix2 (const float factor, const float4x4 &a, const float4x4 &b)
template<>
float4x4 blender::bke::attribute_math::mix3 (const float3 &weights, const float4x4 &v0, const float4x4 &v1, const float4x4 &v2)
template<>
float4x4 blender::bke::attribute_math::mix4 (const float4 &weights, const float4x4 &v0, const float4x4 &v1, const float4x4 &v2, const float4x4 &v3)
template<typename T>
void blender::bke::attribute_math::mix_groups (const Span< T > src, const OffsetIndices< int > groups, const Span< int > all_indices, const IndexMask &dst_mask, MutableSpan< T > dst)
template<typename T>
void blender::bke::attribute_math::mix_groups (const Span< T > src, const OffsetIndices< int > groups, const Span< int > all_indices, const Span< float > all_weights, const IndexMask &dst_mask, MutableSpan< T > dst)
template<typename T>
void blender::bke::attribute_math::shift_left (MutableSpan< T > data, int src_begin, int src_end, int dst_begin)
template<typename T>
void blender::bke::attribute_math::shift_right (MutableSpan< T > data, int src_begin, int src_end, int dst_end)
Mix a dynamic amount of values with weights for many elements.

This section provides an abstraction for "mixers". The abstraction encapsulates details about how different types should be mixed. Usually DefaultMixer<T> should be used to get a mixer for a specific type.

float4x4 blender::bke::attribute_math::mix_indices (Span< float4x4 > src, Span< int > indices)
float4x4 blender::bke::attribute_math::mix_indices (Span< float4x4 > src, Span< int > indices, Span< float > weights)
void blender::bke::attribute_math::mix_groups (GSpan src, OffsetIndices< int > groups, Span< int > all_indices, std::optional< Span< float > > all_weights, GMutableSpan dst)
void blender::bke::attribute_math::mix_groups (GSpan src, OffsetIndices< int > groups, Span< int > all_indices, std::optional< Span< float > > all_weights, const IndexMask &dst_mask, GMutableSpan dst)
Generic Array Utils Implementations

Extra implementations of functions from #BLI_array_utils.hh for all attribute types, used to avoid templating the same logic for each type in many places.

void blender::bke::attribute_math::shift_left (GMutableSpan data, int src_begin, int src_end, int dst_begin)
void blender::bke::attribute_math::shift_right (GMutableSpan data, int src_begin, int src_end, int dst_begin)
void blender::bke::attribute_math::gather (GSpan src, Span< int > map, GMutableSpan dst)
void blender::bke::attribute_math::gather (const GVArray &src, Span< int > map, GMutableSpan dst)
void blender::bke::attribute_math::gather (GSpan src, Span< int > map, const IndexMask &dst_mask, GMutableSpan dst)
void blender::bke::attribute_math::gather (const GVArray &src, Span< int > map, const IndexMask &dst_mask, GMutableSpan dst)
void blender::bke::attribute_math::gather_group_to_group (OffsetIndices< int > src_offsets, OffsetIndices< int > dst_offsets, const IndexMask &selection, GSpan src, GMutableSpan dst)
void blender::bke::attribute_math::gather_ranges_to_groups (Span< IndexRange > src_ranges, OffsetIndices< int > dst_offsets, GSpan src, GMutableSpan dst)
void blender::bke::attribute_math::gather_to_groups (OffsetIndices< int > dst_offsets, const IndexMask &src_selection, GSpan src, GMutableSpan dst)