struct
TColorDistribution
template<class T>Specifies a color as a distribution, which can include a constant color, random color range or a color gradient.
Public
Constructors
TColorDistribution<T>
Creates a new distribution that returns a constant color.
TColorDistribution<T>
Creates a new distribution that returns a random color in the specified range.
TColorDistribution<T>
Creates a new distribution that evaluates a color gradient.
TColorDistribution<T>
Creates a new distribution that returns a random color in a range determined by two gradients.
TColorDistribution
Creates a new empty distribution.
TColorDistribution
Creates a new distribution that returns a constant color.
TColorDistribution
Creates a new distribution that returns a random color in the specified range.
TColorDistribution
Creates a new distribution that evaluates a color gradient.
TColorDistribution
Creates a new distribution that returns a random color in a range determined by two gradients.
TColorDistribution
Creates a new empty distribution.
TColorDistribution
Creates a new distribution that returns a constant color.
TColorDistribution
Creates a new distribution that returns a random color in the specified range.
TColorDistribution
Creates a new distribution that evaluates a color gradient.
TColorDistribution
Creates a new distribution that returns a random color in a range determined by two gradients.
Methods
GetMinConstant
Returns the constant value of the distribution, or the minimal value of a constant range.
Undefined if the distribution is represented by a gradient.
GetMaxConstant
Returns the maximum value of a constant range.
Only defined if the distribution represents a non-gradient range.
GetMinGradient
Returns the gradient representing the distribution, or the first gradient representing a gradient range.
Undefined if the distribution is represented by a constant or a non-gradient range.
GetMaxGradient
Returns the curve representing the second gradient of a gradient range.
Only defined if the distribution represents a gradient range.
Evaluate
Evaluates the value of the distribution.
- t
- Time at which to evaluate the distribution. This is only relevant if the distribution contains gradients.
- factor
- Value in range [0, 1] that determines how to interpolate between min/max value, if the distribution represents a range. Value of 0 will return the minimum value, while value of 1 will return the maximum value, and interpolate the values in-between.
Returns: Evaluated color.
Evaluate
Evaluates the value of the distribution.
- t
- Time at which to evaluate the distribution. This is only relevant if the distribution contains gradients.
- factor
- Random number generator that determines the factor. Factor determines how to interpolate between min/max value, if the distribution represents a range.
Returns: Evaluated color.
ToLookupTable
Converts the distribution into a lookup table that's faster to access.
The distribution will be resampled using a fixed sample rate with equidistant samples.
- numSamples
- Determines how many samples to output in the lookup table. This value is ignored for non-curve distributions in which case there is always just one sample.
- ignoreRange
- If the curve represents a range (either between constants or curves), this determines should the other value of the range be included in the lookup table. If true, only the minimum constant/curve will be included, and if false then the maximum curve values will follow the minimum curve values of each sample.
Returns: Resampled lookup table.
GetMinConstant
Returns the constant value of the distribution, or the minimal value of a constant range.
Undefined if the distribution is represented by a gradient.
GetMaxConstant
Returns the maximum value of a constant range.
Only defined if the distribution represents a non-gradient range.
GetMinGradient
Returns the gradient representing the distribution, or the first gradient representing a gradient range.
Undefined if the distribution is represented by a constant or a non-gradient range.
GetMaxGradient
Returns the curve representing the second gradient of a gradient range.
Only defined if the distribution represents a gradient range.
Evaluate
Evaluates the value of the distribution.
- t
- Time at which to evaluate the distribution. This is only relevant if the distribution contains gradients.
- factor
- Value in range [0, 1] that determines how to interpolate between min/max value, if the distribution represents a range. Value of 0 will return the minimum value, while value of 1 will return the maximum value, and interpolate the values in-between.
Returns: Evaluated color.
Evaluate
Evaluates the value of the distribution.
- t
- Time at which to evaluate the distribution. This is only relevant if the distribution contains gradients.
- factor
- Random number generator that determines the factor. Factor determines how to interpolate between min/max value, if the distribution represents a range.
Returns: Evaluated color.
ToLookupTable
Converts the distribution into a lookup table that's faster to access.
The distribution will be resampled using a fixed sample rate with equidistant samples.
- numSamples
- Determines how many samples to output in the lookup table. This value is ignored for non-curve distributions in which case there is always just one sample.
- ignoreRange
- If the curve represents a range (either between constants or curves), this determines should the other value of the range be included in the lookup table. If true, only the minimum constant/curve will be included, and if false then the maximum curve values will follow the minimum curve values of each sample.
Returns: Resampled lookup table.
GetMinConstant
Returns the constant value of the distribution, or the minimal value of a constant range.
Undefined if the distribution is represented by a gradient.
GetMaxConstant
Returns the maximum value of a constant range.
Only defined if the distribution represents a non-gradient range.
GetMinGradient
Returns the gradient representing the distribution, or the first gradient representing a gradient range.
Undefined if the distribution is represented by a constant or a non-gradient range.
GetMaxGradient
Returns the curve representing the second gradient of a gradient range.
Only defined if the distribution represents a gradient range.
Evaluate
Evaluates the value of the distribution.
- t
- Time at which to evaluate the distribution. This is only relevant if the distribution contains gradients.
- factor
- Value in range [0, 1] that determines how to interpolate between min/max value, if the distribution represents a range. Value of 0 will return the minimum value, while value of 1 will return the maximum value, and interpolate the values in-between.
Returns: Evaluated color.
Evaluate
Evaluates the value of the distribution.
- t
- Time at which to evaluate the distribution. This is only relevant if the distribution contains gradients.
- factor
- Random number generator that determines the factor. Factor determines how to interpolate between min/max value, if the distribution represents a range.
Returns: Evaluated color.
ToLookupTable
Converts the distribution into a lookup table that's faster to access.
The distribution will be resampled using a fixed sample rate with equidistant samples.
- numSamples
- Determines how many samples to output in the lookup table. This value is ignored for non-curve distributions in which case there is always just one sample.
- ignoreRange
- If the curve represents a range (either between constants or curves), this determines should the other value of the range be included in the lookup table. If true, only the minimum constant/curve will be included, and if false then the maximum curve values will follow the minimum curve values of each sample.
Returns: Resampled lookup table.