class
TColorGradient
template<class COLOR, class TIME>Common templated class for different color gradient implementations.
Public
Constructors
TColorGradient<COLOR, TIME>
TColorGradient<COLOR, TIME>() = default
TColorGradient<COLOR, TIME>
TColorGradient<COLOR, TIME>
Methods
Evaluate
COLOR Evaluate(float t) const
Evaluates a color at the specified .
SetKeys
Keys that control the gradient, sorted by time from first to last.
Key times should be in range [0, 1].
GetKeys
Vector<ColorGradientKey> GetKeys() const
GetNumKeys
u32 GetNumKeys() const
Returns the number of color keys in the gradient.
GetKey
Returns the color key at the specified index.
If out of range an empty key is returned.
SetConstant
Specify a "gradient" that represents a single color value.
GetDuration
float GetDuration() const
Returns the duration over which the gradient values are interpolated over.
Corresponds to the time value of the final keyframe.
GetTimeRange
std::pair<float, float> GetTimeRange() const
Returns the time of the first and last keyframe in the gradient.
Operators
operator==
operator!=
Protected
Fields
mColors
COLOR[8] mColors
mTimes
TIME[8] mTimes
mNumKeys
uint32_t mNumKeys
mDuration
float mDuration