struct
TDistribution
template<class T>Specifies a value as a distribution, which can include a constant value, random range or a curve.
Public
Constructors
TDistribution<T>
Creates a new distribution that returns a constant value.
TDistribution<T>
Creates a new distribution that returns a random value in the specified range.
TDistribution<T>
Creates a new distribution that evaluates a curve.
TDistribution<T>
Creates a new distribution that returns a random value in a range determined by two curves.
TDistribution
Creates a new empty distribution.
TDistribution
Creates a new distribution that returns a constant value.
TDistribution
Creates a new distribution that returns a random value in the specified range.
TDistribution
Creates a new distribution that evaluates a curve.
TDistribution
Creates a new distribution that returns a random value in a range determined by two curves.
TDistribution
Creates a new empty distribution.
TDistribution
Creates a new distribution that returns a constant value.
TDistribution
Creates a new distribution that returns a random value in the specified range.
TDistribution
Creates a new distribution that evaluates a curve.
TDistribution
Creates a new distribution that returns a random value in a range determined by two curves.
TDistribution
Creates a new empty distribution.
TDistribution
Creates a new distribution that returns a constant value.
TDistribution
Creates a new distribution that returns a random value in the specified range.
TDistribution
Creates a new distribution that evaluates a curve.
TDistribution
Creates a new distribution that returns a random value in a range determined by two curves.
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 curve.
GetMaxConstant
Returns the maximum value of a constant range.
Only defined if the distribution represents a non-curve range.
GetMinCurve
Returns the curve representing the distribution, or the first curve representing a curve range.
Undefined if the distribution is represented by a constant or a non-curve range.
GetMaxCurve
Returns the curve representing the second curve of a curve range.
Only defined if the distribution represents a curve range.
Evaluate
Evaluates the value of the distribution.
- t
- Time at which to evaluate the distribution. This is only relevant if the distribution contains curves.
- 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 value.
Evaluate
Evaluates the value of the distribution.
- t
- Time at which to evaluate the distribution. This is only relevant if the distribution contains curves.
- 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 value.
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 curve.
GetMaxConstant
Returns the maximum value of a constant range.
Only defined if the distribution represents a non-curve range.
GetMinCurve
Returns the curve representing the distribution, or the first curve representing a curve range.
Undefined if the distribution is represented by a constant or a non-curve range.
GetMaxCurve
Returns the curve representing the second curve of a curve range.
Only defined if the distribution represents a curve range.
Evaluate
Evaluates the value of the distribution.
- t
- Time at which to evaluate the distribution. This is only relevant if the distribution contains curves.
- 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 value.
Evaluate
Evaluates the value of the distribution.
- t
- Time at which to evaluate the distribution. This is only relevant if the distribution contains curves.
- 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 value.
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 curve.
GetMaxConstant
Returns the maximum value of a constant range.
Only defined if the distribution represents a non-curve range.
GetMinCurve
Returns the curve representing the distribution, or the first curve representing a curve range.
Undefined if the distribution is represented by a constant or a non-curve range.
GetMaxCurve
Returns the curve representing the second curve of a curve range.
Only defined if the distribution represents a curve range.
Evaluate
Evaluates the value of the distribution.
- t
- Time at which to evaluate the distribution. This is only relevant if the distribution contains curves.
- 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 value.
Evaluate
Evaluates the value of the distribution.
- t
- Time at which to evaluate the distribution. This is only relevant if the distribution contains curves.
- 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 value.
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 curve.
GetMaxConstant
Returns the maximum value of a constant range.
Only defined if the distribution represents a non-curve range.
GetMinCurve
Returns the curve representing the distribution, or the first curve representing a curve range.
Undefined if the distribution is represented by a constant or a non-curve range.
GetMaxCurve
Returns the curve representing the second curve of a curve range.
Only defined if the distribution represents a curve range.
Evaluate
Evaluates the value of the distribution.
- t
- Time at which to evaluate the distribution. This is only relevant if the distribution contains curves.
- 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 value.
Evaluate
Evaluates the value of the distribution.
- t
- Time at which to evaluate the distribution. This is only relevant if the distribution contains curves.
- 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 value.
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.