This class adds a little convenience to setup a gradient for a set of interpolation modes given as MAXON_ATTRIBUTE. For example, a gradient can be configured as such:
using InterpolationNone = decltype(maxonexample::DATATYPE::PORTBUNDLE::GRADIENT::INTERPOLATION_ENUM_NONE);
using InterpolationLinearKnot = decltype(maxonexample::DATATYPE::PORTBUNDLE::GRADIENT::INTERPOLATION_ENUM_LINEARKNOT);
using InterpolationSmoothKnot = decltype(maxonexample::DATATYPE::PORTBUNDLE::GRADIENT::INTERPOLATION_ENUM_SMOOTHKNOT);
using InterpolationBlend = decltype(maxonexample::DATATYPE::PORTBUNDLE::GRADIENT::INTERPOLATION_ENUM_BLEND);
using InterpolationCubicKnot = decltype(maxonexample::DATATYPE::PORTBUNDLE::GRADIENT::INTERPOLATION_ENUM_CUBICKNOT);
using InterpolationCubicBias = decltype(maxonexample::DATATYPE::PORTBUNDLE::GRADIENT::INTERPOLATION_ENUM_CUBICBIAS);
auto GetKnotValue = [&knotValues](
Int index)
{
return knotValues[
index];
};
auto GetKnotInterpolationMode = [](
Int index)
{
};
{
};
Definition: gradientmath.h:526
static const UInt InterpolationBlend
Definition: gradientmath.h:214
static const UInt InterpolationNone
Definition: gradientmath.h:211
Result< ValueType > Sample(typename SortedKnotsType::FloatType absolutePosition, const SortedKnotsType &sortedKnots, const GetKnotValueFunc &getKnotValue, const GetKnotInterpolationModeFunc &getKnotInterpolationMode, const GetKnotBiasFunc &getKnotBias) const
Definition: gradientmath.h:399
static const UInt InterpolationSmoothKnot
Definition: gradientmath.h:213
static const UInt InterpolationCubicBias
Definition: gradientmath.h:216
static const UInt InterpolationCubicKnot
Definition: gradientmath.h:215
static const UInt InterpolationLinearKnot
Definition: gradientmath.h:212
Definition: gradientmath.h:53
Result< void > Sort()
Definition: gradientmath.h:173
Result< void > InsertKnot(FloatType position)
Definition: gradientmath.h:84
Py_ssize_t * index
Definition: abstract.h:374
maxon::Int Int
Definition: ge_sys_math.h:64
Float64 Float
Definition: apibase.h:197
Col3< Float, 1 > Color
Definition: vector.h:84
#define iferr_return
Definition: resultbase.h:1519
constexpr HashInt GetHashCode() const
Definition: col.h:274