Blender  V2.93
Classes | Namespaces | Functions
BKE_attribute_math.hh File Reference
#include "BLI_array.hh"
#include "BLI_color.hh"
#include "BLI_float2.hh"
#include "BLI_float3.hh"
#include "DNA_customdata_types.h"

Go to the source code of this file.

Classes

class  blender::attribute_math::SimpleMixer< T >
 
class  blender::attribute_math::SimpleMixerWithAccumulationType< T, AccumulationT, ConvertToT >
 
class  blender::attribute_math::Color4fMixer
 
struct  blender::attribute_math::DefaultMixerStruct< T >
 
struct  blender::attribute_math::DefaultMixerStruct< float >
 
struct  blender::attribute_math::DefaultMixerStruct< float2 >
 
struct  blender::attribute_math::DefaultMixerStruct< float3 >
 
struct  blender::attribute_math::DefaultMixerStruct< Color4f >
 
struct  blender::attribute_math::DefaultMixerStruct< int >
 
struct  blender::attribute_math::DefaultMixerStruct< bool >
 

Namespaces

 blender
 
 blender::attribute_math
 

Typedefs

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.

template<typename T >
using blender::attribute_math::DefaultMixer = typename DefaultMixerStruct< T >::type
 

Functions

template<typename Func >
void blender::attribute_math::convert_to_static_type (const CustomDataType data_type, const Func &func)
 
Mix three values of the same type.

This is typically used to interpolate values within a triangle.

template<typename T >
T blender::attribute_math::mix3 (const float3 &weights, const T &v0, const T &v1, const T &v2)
 
template<>
bool blender::attribute_math::mix3 (const float3 &weights, const bool &v0, const bool &v1, const bool &v2)
 
template<>
int blender::attribute_math::mix3 (const float3 &weights, const int &v0, const int &v1, const int &v2)
 
template<>
float blender::attribute_math::mix3 (const float3 &weights, const float &v0, const float &v1, const float &v2)
 
template<>
float2 blender::attribute_math::mix3 (const float3 &weights, const float2 &v0, const float2 &v1, const float2 &v2)
 
template<>
float3 blender::attribute_math::mix3 (const float3 &weights, const float3 &v0, const float3 &v1, const float3 &v2)
 
template<>
Color4f blender::attribute_math::mix3 (const float3 &weights, const Color4f &v0, const Color4f &v1, const Color4f &v2)