BlendFunctionInterface Manual

About

The maxon::BlendFunctionInterface is a simple interface that allows to blend between a minimum and maximum value. Various implementations for different interpolation modes exist.

Classes

Various implementations of maxon::BlendFunctionInterface can be found under maxon::BlendFunctions:

Linear interpolation:

  • maxon::BlendFunctions::Linear

Quadratic interpolation:

  • maxon::BlendFunctions::EaseInQuad
  • maxon::BlendFunctions::EaseOutQuad
  • maxon::BlendFunctions::EaseInOutQuad
  • maxon::BlendFunctions::EaseOutInQuad

Cubic interpolation:

  • maxon::BlendFunctions::EaseInCubic
  • maxon::BlendFunctions::EaseOutCubic
  • maxon::BlendFunctions::EaseInOutCubic
  • maxon::BlendFunctions::EaseOutInCubic

Quartic interpolation:

  • maxon::BlendFunctions::EaseInQuart
  • maxon::BlendFunctions::EaseOutQuart
  • maxon::BlendFunctions::EaseInOutQuart
  • maxon::BlendFunctions::EaseOutInQuart

Quintic interpolation:

  • maxon::BlendFunctions::EaseInQuint
  • maxon::BlendFunctions::EaseOutQuint
  • maxon::BlendFunctions::EaseInOutQuint
  • maxon::BlendFunctions::EaseOutInQuint

Sextic interpolation:

  • maxon::BlendFunctions::EaseInSext
  • maxon::BlendFunctions::EaseOutSext
  • maxon::BlendFunctions::EaseInOutSext
  • maxon::BlendFunctions::EaseOutInSext

Sinusoidal interpolation:

  • maxon::BlendFunctions::EaseInSine
  • maxon::BlendFunctions::EaseOutSine
  • maxon::BlendFunctions::EaseInOutSine
  • maxon::BlendFunctions::EaseOutInSine

Exponential interpolation:

  • maxon::BlendFunctions::EaseInExpo
  • maxon::BlendFunctions::EaseOutExpo
  • maxon::BlendFunctions::EaseInOutExpo
  • maxon::BlendFunctions::EaseOutInExpo

Circular interpolation:

  • maxon::BlendFunctions::EaseInCirc
  • maxon::BlendFunctions::EaseOutCirc
  • maxon::BlendFunctions::EaseInOutCirc
  • maxon::BlendFunctions::EaseOutInCirc

Elastic interpolation:

  • maxon::BlendFunctions::EaseInElastic
  • maxon::BlendFunctions::EaseOutElastic
  • maxon::BlendFunctions::EaseInOutElastic
  • maxon::BlendFunctions::EaseOutInElastic

Back interpolation:

  • maxon::BlendFunctions::EaseInBack
  • maxon::BlendFunctions::EaseOutBack
  • maxon::BlendFunctions::EaseInOutBack
  • maxon::BlendFunctions::EaseOutInBack

Bounce interpolation:

  • maxon::BlendFunctions::EaseInBounce
  • maxon::BlendFunctions::EaseOutBounce
  • maxon::BlendFunctions::EaseInOutBounce
  • maxon::BlendFunctions::EaseOutInBounce

BlendFunctionInterface

The function represented by maxon::BlendFunctionInterface is used with:

// This example samples the interpolation curve defined by the given blend function.
// get BlendFunctionRef for EaseInOutQuad
const maxon::BlendFunctionRef& easeInOut = maxon::BlendFunctions::EaseInOutQuad();
// prepare sampling the function
const maxon::Data min(0.0);
const maxon::Data max(10.0);
// sample the function
for (maxon::Int i = 0; i < count; ++i)
{
const maxon::Data res = easeInOut.MapValue(pos, min, max) iferr_return;
pos += step;
}
DiagnosticOutput("@", values);
Py_ssize_t i
Definition: abstract.h:645
Py_ssize_t count
Definition: abstract.h:640
PyObject * value
Definition: abstract.h:715
Definition: basearray.h:415
ResultMem EnsureCapacity(Int requestedCapacity, COLLECTION_RESIZE_FLAGS resizeFlags=COLLECTION_RESIZE_FLAGS::ON_GROW_RESERVE_CAPACITY)
Definition: basearray.h:1320
MAXON_ATTRIBUTE_FORCE_INLINE ResultRef< T > Append(ARG &&x)
Appends a new element at the end of the array and constructs it using the forwarded value.
Definition: basearray.h:619
Definition: datatypebase.h:1204
void Py_ssize_t * pos
Definition: dictobject.h:50
Py_UCS4 * res
Definition: unicodeobject.h:1113
Int64 Int
signed 32/64 bit int, size depends on the platform
Definition: apibase.h:213
Float64 Float
Definition: apibase.h:222
#define DiagnosticOutput(formatString,...)
Definition: debugdiagnostics.h:176
const char Py_ssize_t const char Py_ssize_t Py_ssize_t max
Definition: modsupport.h:59
const char Py_ssize_t const char Py_ssize_t min
Definition: modsupport.h:58
#define iferr_return
Definition: resultbase.h:1521
PyObject PyObject * step
Definition: sliceobject.h:34

Further Reading