Blender  V2.93
Classes | Functions
blender::attribute_math Namespace Reference

Classes

class  SimpleMixer
 
class  SimpleMixerWithAccumulationType
 
class  Color4fMixer
 
struct  DefaultMixerStruct
 
struct  DefaultMixerStruct< float >
 
struct  DefaultMixerStruct< float2 >
 
struct  DefaultMixerStruct< float3 >
 
struct  DefaultMixerStruct< Color4f >
 
struct  DefaultMixerStruct< int >
 
struct  DefaultMixerStruct< bool >
 

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 DefaultMixer = typename DefaultMixerStruct< T >::type
 

Functions

template<typename Func >
void 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 mix3 (const float3 &weights, const T &v0, const T &v1, const T &v2)
 
template<>
bool mix3 (const float3 &weights, const bool &v0, const bool &v1, const bool &v2)
 
template<>
int mix3 (const float3 &weights, const int &v0, const int &v1, const int &v2)
 
template<>
float mix3 (const float3 &weights, const float &v0, const float &v1, const float &v2)
 
template<>
float2 mix3 (const float3 &weights, const float2 &v0, const float2 &v1, const float2 &v2)
 
template<>
float3 mix3 (const float3 &weights, const float3 &v0, const float3 &v1, const float3 &v2)
 
template<>
Color4f mix3 (const float3 &weights, const Color4f &v0, const Color4f &v1, const Color4f &v2)
 

Typedef Documentation

◆ DefaultMixer

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

Definition at line 252 of file BKE_attribute_math.hh.

Function Documentation

◆ convert_to_static_type()

template<typename Func >
void blender::attribute_math::convert_to_static_type ( const CustomDataType  data_type,
const Func &  func 
)

◆ mix3() [1/7]

template<>
bool blender::attribute_math::mix3 ( const float3 weights,
const bool &  v0,
const bool &  v1,
const bool &  v2 
)
inline

Definition at line 65 of file BKE_attribute_math.hh.

References v1, v2, blender::float3::x, blender::float3::y, and blender::float3::z.

◆ mix3() [2/7]

template<>
Color4f blender::attribute_math::mix3 ( const float3 weights,
const Color4f v0,
const Color4f v1,
const Color4f v2 
)
inline

Definition at line 94 of file BKE_attribute_math.hh.

References interp_v4_v4v4v4(), result, v1, and v2.

◆ mix3() [3/7]

template<>
float blender::attribute_math::mix3 ( const float3 weights,
const float v0,
const float v1,
const float v2 
)
inline

Definition at line 76 of file BKE_attribute_math.hh.

References v1, v2, blender::float3::x, blender::float3::y, and blender::float3::z.

◆ mix3() [4/7]

template<>
float2 blender::attribute_math::mix3 ( const float3 weights,
const float2 v0,
const float2 v1,
const float2 v2 
)
inline

Definition at line 82 of file BKE_attribute_math.hh.

References v1, v2, blender::float3::x, blender::float3::y, and blender::float3::z.

◆ mix3() [5/7]

template<>
float3 blender::attribute_math::mix3 ( const float3 weights,
const float3 v0,
const float3 v1,
const float3 v2 
)
inline

Definition at line 88 of file BKE_attribute_math.hh.

References v1, v2, blender::float3::x, blender::float3::y, and blender::float3::z.

◆ mix3() [6/7]

template<>
int blender::attribute_math::mix3 ( const float3 weights,
const int &  v0,
const int &  v1,
const int &  v2 
)
inline

Definition at line 70 of file BKE_attribute_math.hh.

References v1, v2, blender::float3::x, blender::float3::y, and blender::float3::z.

◆ mix3() [7/7]

template<typename T >
T blender::attribute_math::mix3 ( const float3 weights,
const T v0,
const T v1,
const T v2 
)