Kanzi 3.9.10
kanzi::interpolation Namespace Reference

Functions

Matrix3x3 lerp (const Matrix3x3 &v1, const Matrix3x3 &v2, const Matrix3x3 &phase)
 Linear interpolation between v1..v2 at phase[0..1].
 
Matrix4x4 lerp (const Matrix4x4 &v1, const Matrix4x4 &v2, const Matrix4x4 &phase)
 Linear interpolation between v1..v2 at phase[0..1].
 
template<typename T , typename T2 >
constexpr T lerp (const T &v1, const T &v2, const T2 &phase)
 Linear interpolation between v1..v2 at phase[0..1].
 
constexpr float lerp (float v1, float v2, float phase)
 Linear interpolation between v1..v2 at phase[0..1].
 
constexpr int lerp (int v1, int v2, float phase)
 Linear interpolation between v1..v2 at phase[0..1].
 
template<typename T , typename T2 >
T linearstep (const T &v1, const T &v2, const T2 &value)
 Linearstep remapping of value between [0..1].
 
float linearstep (float v1, float v2, float value)
 Linearstep remapping of value between [0..1].
 
int linearstep (int v1, int v2, float value)
 Linearstep remapping of value between [0..1].
 
Matrix3x3 linearstep (Matrix3x3 v1, Matrix3x3 v2, Matrix3x3 value)
 Component-wise linearstep remapping of value between [0..1].
 
Matrix4x4 linearstep (Matrix4x4 v1, Matrix4x4 v2, Matrix4x4 value)
 Component-wise linearstep remapping of value between [0..1].
 
constexpr float smootherstep (const float phase)
 Smootherstep phase between [0..1].
 
Matrix3x3 smootherstep (const Matrix3x3 &v1, const Matrix3x3 &v2, const Matrix3x3 &value)
 Smootherstep-clamped remapping of value between v1 and v2 to within [0..1].
 
Matrix4x4 smootherstep (const Matrix4x4 &v1, const Matrix4x4 &v2, const Matrix4x4 &value)
 Smootherstep-clamped remapping of value between v1 and v2 to within [0..1].
 
template<typename T , typename T2 >
T smootherstep (const T &v1, const T &v2, const T2 &value)
 Smootherstep-clamped remapping of value between v1 and v2 to within [0..1].
 
float smootherstep (float v1, float v2, float value)
 Smootherstep-clamped remapping of value between v1 and v2 to within [0..1].
 
int smootherstep (int v1, int v2, float value)
 Smootherstep-clamped remapping of value between v1 and v2 to within [0..1].
 
constexpr float smoothstep (const float phase)
 Smoothstep phase between [0..1].
 
Matrix3x3 smoothstep (const Matrix3x3 &v1, const Matrix3x3 &v2, const Matrix3x3 &value)
 Smoothstep-clamped remapping of value between v1 and v2 to within [0..1].
 
Matrix4x4 smoothstep (const Matrix4x4 &v1, const Matrix4x4 &v2, const Matrix4x4 &value)
 Smoothstep-clamped remapping of value between v1 and v2 to within [0..1].
 
template<typename T , typename T2 >
T smoothstep (const T &v1, const T &v2, const T2 &value)
 Smoothstep-clamped remapping of value between v1 and v2 to within [0..1].
 
float smoothstep (float v1, float v2, float value)
 Smoothstep-clamped remapping of value between v1 and v2 to within [0..1].
 
int smoothstep (int v1, int v2, float value)
 Smoothstep-clamped remapping of value between v1 and v2 to within [0..1].
 

Function Documentation

◆ smoothstep() [1/6]

constexpr float kanzi::interpolation::smoothstep ( const float phase)
constexpr

Smoothstep phase between [0..1].

Parameters
phaseLinear phase value [0..1].
Returns
Smoothstep-transformed phase value.

◆ smootherstep() [1/6]

constexpr float kanzi::interpolation::smootherstep ( const float phase)
constexpr

Smootherstep phase between [0..1].

Parameters
phaseLinear phase value [0..1].
Returns
Smootherstep-transformed phase value.

◆ lerp() [1/5]

template<typename T , typename T2 >
constexpr T kanzi::interpolation::lerp ( const T & v1,
const T & v2,
const T2 & phase )
constexpr

Linear interpolation between v1..v2 at phase[0..1].

Parameters
v1Start value.
v2End value.
phaseInterpolation phase between [0..1].
Returns
Linear-interpolated result of type T.

◆ lerp() [2/5]

constexpr float kanzi::interpolation::lerp ( float v1,
float v2,
float phase )
constexpr

Linear interpolation between v1..v2 at phase[0..1].

Parameters
v1Start value.
v2End value.
phaseInterpolation phase between [0..1].
Returns
Linear-interpolated result.

◆ lerp() [3/5]

constexpr int kanzi::interpolation::lerp ( int v1,
int v2,
float phase )
constexpr

Linear interpolation between v1..v2 at phase[0..1].

Parameters
v1Start value.
v2End value.
phaseInterpolation phase between [0..1].
Returns
Linear-interpolated result.

◆ lerp() [4/5]

Matrix3x3 kanzi::interpolation::lerp ( const Matrix3x3 & v1,
const Matrix3x3 & v2,
const Matrix3x3 & phase )
inline

Linear interpolation between v1..v2 at phase[0..1].

Parameters
v1Start value.
v2End value.
phaseInterpolation phase between [0..1].
Returns
Linear-interpolated result.
Since
Kanzi 3.9.9

◆ lerp() [5/5]

Matrix4x4 kanzi::interpolation::lerp ( const Matrix4x4 & v1,
const Matrix4x4 & v2,
const Matrix4x4 & phase )
inline

Linear interpolation between v1..v2 at phase[0..1].

Parameters
v1Start value.
v2End value.
phaseInterpolation phase between [0..1].
Returns
Linear-interpolated result.
Since
Kanzi 3.9.9

◆ linearstep() [1/5]

template<typename T , typename T2 >
T kanzi::interpolation::linearstep ( const T & v1,
const T & v2,
const T2 & value )
inline

Linearstep remapping of value between [0..1].

Parameters
v1Minimum value.
v2Maximum value.
valueInput value between [v1..v2].
Returns
Input value remapped from [v1..v2] to [0..1].

◆ linearstep() [2/5]

float kanzi::interpolation::linearstep ( float v1,
float v2,
float value )
inline

Linearstep remapping of value between [0..1].

Parameters
v1Minimum value.
v2Maximum value.
valueInput value between [v1..v2].
Returns
Input value remapped from [v1..v2] to [0..1].

◆ linearstep() [3/5]

int kanzi::interpolation::linearstep ( int v1,
int v2,
float value )
inline

Linearstep remapping of value between [0..1].

Parameters
v1Minimum value.
v2Maximum value.
valueInput value between [v1..v2].
Returns
Input value remapped from [v1..v2] to [0..1].

◆ linearstep() [4/5]

Matrix3x3 kanzi::interpolation::linearstep ( Matrix3x3 v1,
Matrix3x3 v2,
Matrix3x3 value )
inline

Component-wise linearstep remapping of value between [0..1].

Parameters
v1Minimum values.
v2Maximum values.
valueInput values between [v1..v2].
Returns
Input values remapped from [v1..v2] to [0..1].
Since
Kanzi 3.9.9

◆ linearstep() [5/5]

Matrix4x4 kanzi::interpolation::linearstep ( Matrix4x4 v1,
Matrix4x4 v2,
Matrix4x4 value )
inline

Component-wise linearstep remapping of value between [0..1].

Parameters
v1Minimum values.
v2Maximum values.
valueInput values between [v1..v2].
Returns
Input values remapped from [v1..v2] to [0..1].
Since
Kanzi 3.9.9

◆ smoothstep() [2/6]

template<typename T , typename T2 >
T kanzi::interpolation::smoothstep ( const T & v1,
const T & v2,
const T2 & value )
inline

Smoothstep-clamped remapping of value between v1 and v2 to within [0..1].

Parameters
v1Minimum value.
v2Maximum value.
valueInput value between [v1..v2].
Returns
Input value remapped through interpolation with the smoothstep polynomial from [v1..v2] to [0..1].

◆ smoothstep() [3/6]

float kanzi::interpolation::smoothstep ( float v1,
float v2,
float value )
inline

Smoothstep-clamped remapping of value between v1 and v2 to within [0..1].

Parameters
v1Minimum value.
v2Maximum value.
valueInput value between [v1..v2].
Returns
Input value remapped through interpolation with the smoothstep polynomial from [v1..v2] to [0..1].

◆ smoothstep() [4/6]

Matrix3x3 kanzi::interpolation::smoothstep ( const Matrix3x3 & v1,
const Matrix3x3 & v2,
const Matrix3x3 & value )
inline

Smoothstep-clamped remapping of value between v1 and v2 to within [0..1].

Parameters
v1Minimum value.
v2Maximum value.
valueInput value between [v1..v2].
Returns
Input value remapped through interpolation with the smoothstep polynomial from [v1..v2] to [0..1].
Since
Kanzi 3.9.9

◆ smoothstep() [5/6]

Matrix4x4 kanzi::interpolation::smoothstep ( const Matrix4x4 & v1,
const Matrix4x4 & v2,
const Matrix4x4 & value )
inline

Smoothstep-clamped remapping of value between v1 and v2 to within [0..1].

Parameters
v1Minimum value.
v2Maximum value.
valueInput value between [v1..v2].
Returns
Input value remapped through interpolation with the smoothstep polynomial from [v1..v2] to [0..1].
Since
Kanzi 3.9.9

◆ smoothstep() [6/6]

int kanzi::interpolation::smoothstep ( int v1,
int v2,
float value )
inline

Smoothstep-clamped remapping of value between v1 and v2 to within [0..1].

Parameters
v1Minimum value.
v2Maximum value.
valueInput value between [v1..v2].
Returns
Input value remapped through interpolation with the smoothstep polynomial from [v1..v2] to [0..1].

◆ smootherstep() [2/6]

template<typename T , typename T2 >
T kanzi::interpolation::smootherstep ( const T & v1,
const T & v2,
const T2 & value )
inline

Smootherstep-clamped remapping of value between v1 and v2 to within [0..1].

Parameters
v1Minimum value.
v2Maximum value.
valueInput value between [v1..v2].
Returns
Input value remapped through interpolation with the smootherstep curve from [v1..v2] to [0..1].

◆ smootherstep() [3/6]

float kanzi::interpolation::smootherstep ( float v1,
float v2,
float value )
inline

Smootherstep-clamped remapping of value between v1 and v2 to within [0..1].

Parameters
v1Minimum value.
v2Maximum value.
valueInput value between [v1..v2].
Returns
Input value remapped through interpolation with the smootherstep curve from [v1..v2] to [0..1].

◆ smootherstep() [4/6]

int kanzi::interpolation::smootherstep ( int v1,
int v2,
float value )
inline

Smootherstep-clamped remapping of value between v1 and v2 to within [0..1].

Parameters
v1Minimum value.
v2Maximum value.
valueInput value between [v1..v2].
Returns
Input value remapped through interpolation with the smootherstep curve from [v1..v2] to [0..1].

◆ smootherstep() [5/6]

Matrix3x3 kanzi::interpolation::smootherstep ( const Matrix3x3 & v1,
const Matrix3x3 & v2,
const Matrix3x3 & value )
inline

Smootherstep-clamped remapping of value between v1 and v2 to within [0..1].

Parameters
v1Minimum value.
v2Maximum value.
valueInput value between [v1..v2].
Returns
Input value remapped through interpolation with the smootherstep curve from [v1..v2] to [0..1].
Since
Kanzi 3.9.9

◆ smootherstep() [6/6]

Matrix4x4 kanzi::interpolation::smootherstep ( const Matrix4x4 & v1,
const Matrix4x4 & v2,
const Matrix4x4 & value )
inline

Smootherstep-clamped remapping of value between v1 and v2 to within [0..1].

Parameters
v1Minimum value.
v2Maximum value.
valueInput value between [v1..v2].
Returns
Input value remapped through interpolation with the smootherstep curve from [v1..v2] to [0..1].
Since
Kanzi 3.9.9