class TAnimationCurve

template<class T>
Inherits: IScriptExportable

Animation spline represented by a set of keyframes, each representing an endpoint of a cubic hermite curve.

The spline can be evaluated at any time, and uses caching to speed up multiple sequential evaluations.

Public

Constructors

TAnimationCurve<T>

TAnimationCurve<T>() = default

TAnimationCurve<T>

TAnimationCurve<T>(const Vector<KeyFrame> &keyframes)

Creates a new animation curve.

keyframes
Keyframes to initialize the curve with. They must be sorted by time.

TAnimationCurve

TAnimationCurve() = default

TAnimationCurve

TAnimationCurve(const Vector<KeyFrame> &keyframes)

Creates a new animation curve.

keyframes
Keyframes to initialize the curve with. They must be sorted by time.

TAnimationCurve

TAnimationCurve() = default

TAnimationCurve

TAnimationCurve(const Vector<KeyFrame> &keyframes)

Creates a new animation curve.

keyframes
Keyframes to initialize the curve with. They must be sorted by time.

TAnimationCurve

TAnimationCurve() = default

TAnimationCurve

TAnimationCurve(const Vector<KeyFrame> &keyframes)

Creates a new animation curve.

keyframes
Keyframes to initialize the curve with. They must be sorted by time.

TAnimationCurve

TAnimationCurve() = default

TAnimationCurve

TAnimationCurve(const Vector<KeyFrame> &keyframes)

Creates a new animation curve.

keyframes
Keyframes to initialize the curve with. They must be sorted by time.

TAnimationCurve

TAnimationCurve() = default

TAnimationCurve

TAnimationCurve(const Vector<KeyFrame> &keyframes)

Creates a new animation curve.

keyframes
Keyframes to initialize the curve with. They must be sorted by time.

Methods

Evaluate

T Evaluate(float time, const TCurveCache<T> &cache, bool loop = true) const

Evaluate the animation curve using caching.

Caching can significantly speed of evaluation if the evaluation happens sequential order (which should be true for most curves). If evaluation is not happening in sequential order using the non-caching version of Evaluate() might yield better performance.

time
Time to evaluate the curve at.
cache
Cached data from previous requests that can be used for speeding up sequential calls to this method. Caller should ensure to maintain a persistent instance of this data for every animation using this curve in order to ensure cache is maintained.
loop
If true the curve will loop when it goes past the end or beggining. Otherwise the curve value will be clamped.

Returns: Interpolated value from the curve at provided time.

Evaluate

T Evaluate(float time, bool loop = true) const

Evaluate the animation curve at the specified time.

If evaluating multiple values in a sequential order consider using the cached version of Evaluate() for better performance.

time
Time to evaluate the curve at.
loop
If true the curve will loop when it goes past the end or beggining. Otherwise the curve value will be clamped.

Returns: Interpolated value from the curve at provided time.

EvaluateIntegrated

T EvaluateIntegrated(float time, const TCurveIntegrationCache<T> &integrationCache) const

Evaluates the integrated animation curve. (e.g. evaluating a curve containing velocity values will return a position).

time
Time to evaluate the curve at.
integrationCache
Cache storing the values required for integration. Generated the first time this method is called and re-used on subsequent calls. Caller must ensure to use the cache only with the curve it was originally used on. Separate caches need to be used for single and double integration evaluation.

Returns: Interpolated value from the curve at provided time.

EvaluateIntegratedDouble

T EvaluateIntegratedDouble(float time, const TCurveIntegrationCache<T> &integrationCache) const

Evaluates the double integrated animation curve. (e.g. evaluating a curve containing acceleration values will return a position).

time
Time to evaluate the curve at.
integrationCache
Cache storing the values required for integration. Generated the first time this method is called and re-used on subsequent calls. Caller must ensure to use the cache only with the curve it was originally used on. Separate caches need to be used for single and double integration evaluation.

Returns: Interpolated value from the curve at provided time.

EvaluateKey

KeyFrame EvaluateKey(float time, bool loop = true) const

Evaluate the animation curve at the specified time and returns a new keyframe containing the evaluated value and tangents.

time
Time to evaluate the curve at.
loop
If true the curve will loop when it goes past the end or beginning. Otherwise the curve value will be clamped.

Returns: Keyframe containing the interpolated value and tangents at provided time.

Split

TAnimationCurve<T> Split(float start, float end)

Splits a piece of the animation curve into a separate animation curve.

start
Beginning time of the split curve.
end
End time of the split curve.

Returns: New curve with data corresponding to the provided split times.

MakeAdditive

void MakeAdditive()

Converts a normal curve into an additive curve.

It is assumed the first keyframe in the curve is the reference key from which to generate the additive curve. Such curves can then be added on top of a curve containing reference keys.

GetTimeRange

std::pair<float, float> GetTimeRange() const

Returns the time of the first and last keyframe in the curve.

CalculateRange

std::pair<T, T> CalculateRange() const

Calculates the minimal and maximal value of the curve.

CalculateRangeIntegrated

std::pair<T, T> CalculateRangeIntegrated(const TCurveIntegrationCache<T> &cache) const

Calculates the minimal and maximal value of the integrated curve.

CalculateRangeIntegratedDouble

std::pair<T, T> CalculateRangeIntegratedDouble(const TCurveIntegrationCache<T> &cache) const

Calculates the minimal and maximal value of the doubly integrated curve.

GetLength

float GetLength() const

Returns the length of the animation curve, from time zero to last keyframe.

GetNumKeyFrames

u32 GetNumKeyFrames() const

Returns the total number of key-frames in the curve.

GetKeyFrame

const TKeyframe<T> &GetKeyFrame(u32 index) const

Returns a keyframe at the specified index.

GetKeyFrames

const Vector<TKeyframe<T>> &GetKeyFrames() const

Returns a list of all keyframes in the curve.

Evaluate

float Evaluate(float time, const TCurveCache<float> &cache, bool loop) const

Evaluate the animation curve using caching.

Caching can significantly speed of evaluation if the evaluation happens sequential order (which should be true for most curves). If evaluation is not happening in sequential order using the non-caching version of Evaluate() might yield better performance.

time
Time to evaluate the curve at.
cache
Cached data from previous requests that can be used for speeding up sequential calls to this method. Caller should ensure to maintain a persistent instance of this data for every animation using this curve in order to ensure cache is maintained.
loop
If true the curve will loop when it goes past the end or beggining. Otherwise the curve value will be clamped.

Returns: Interpolated value from the curve at provided time.

Evaluate

float Evaluate(float time, bool loop = true) const

Evaluate the animation curve at the specified time.

If evaluating multiple values in a sequential order consider using the cached version of Evaluate() for better performance.

time
Time to evaluate the curve at.
loop
If true the curve will loop when it goes past the end or beggining. Otherwise the curve value will be clamped.

Returns: Interpolated value from the curve at provided time.

EvaluateIntegrated

float EvaluateIntegrated(float time, const TCurveIntegrationCache<float> &integrationCache) const

Evaluates the integrated animation curve. (e.g. evaluating a curve containing velocity values will return a position).

time
Time to evaluate the curve at.
integrationCache
Cache storing the values required for integration. Generated the first time this method is called and re-used on subsequent calls. Caller must ensure to use the cache only with the curve it was originally used on. Separate caches need to be used for single and double integration evaluation.

Returns: Interpolated value from the curve at provided time.

EvaluateIntegratedDouble

float EvaluateIntegratedDouble(float time, const TCurveIntegrationCache<float> &integrationCache) const

Evaluates the double integrated animation curve. (e.g. evaluating a curve containing acceleration values will return a position).

time
Time to evaluate the curve at.
integrationCache
Cache storing the values required for integration. Generated the first time this method is called and re-used on subsequent calls. Caller must ensure to use the cache only with the curve it was originally used on. Separate caches need to be used for single and double integration evaluation.

Returns: Interpolated value from the curve at provided time.

EvaluateKey

KeyFrame EvaluateKey(float time, bool loop) const

Evaluate the animation curve at the specified time and returns a new keyframe containing the evaluated value and tangents.

time
Time to evaluate the curve at.
loop
If true the curve will loop when it goes past the end or beginning. Otherwise the curve value will be clamped.

Returns: Keyframe containing the interpolated value and tangents at provided time.

Split

TAnimationCurve<float> Split(float start, float end)

Splits a piece of the animation curve into a separate animation curve.

start
Beginning time of the split curve.
end
End time of the split curve.

Returns: New curve with data corresponding to the provided split times.

MakeAdditive

void MakeAdditive()

Converts a normal curve into an additive curve.

It is assumed the first keyframe in the curve is the reference key from which to generate the additive curve. Such curves can then be added on top of a curve containing reference keys.

GetTimeRange

std::pair<float, float> GetTimeRange() const

Returns the time of the first and last keyframe in the curve.

CalculateRange

std::pair<float, float> CalculateRange() const

Calculates the minimal and maximal value of the curve.

CalculateRangeIntegrated

std::pair<float, float> CalculateRangeIntegrated(const TCurveIntegrationCache<float> &cache) const

Calculates the minimal and maximal value of the integrated curve.

CalculateRangeIntegratedDouble

std::pair<float, float> CalculateRangeIntegratedDouble(const TCurveIntegrationCache<float> &cache) const

Calculates the minimal and maximal value of the doubly integrated curve.

GetLength

float GetLength() const

Returns the length of the animation curve, from time zero to last keyframe.

GetNumKeyFrames

u32 GetNumKeyFrames() const

Returns the total number of key-frames in the curve.

GetKeyFrame

const TKeyframe<float> &GetKeyFrame(u32 index) const

Returns a keyframe at the specified index.

GetKeyFrames

const Vector<TKeyframe<float>> &GetKeyFrames() const

Returns a list of all keyframes in the curve.

Evaluate

TVector3<float> Evaluate(float time, const TCurveCache<TVector3<float>> &cache, bool loop) const

Evaluate the animation curve using caching.

Caching can significantly speed of evaluation if the evaluation happens sequential order (which should be true for most curves). If evaluation is not happening in sequential order using the non-caching version of Evaluate() might yield better performance.

time
Time to evaluate the curve at.
cache
Cached data from previous requests that can be used for speeding up sequential calls to this method. Caller should ensure to maintain a persistent instance of this data for every animation using this curve in order to ensure cache is maintained.
loop
If true the curve will loop when it goes past the end or beggining. Otherwise the curve value will be clamped.

Returns: Interpolated value from the curve at provided time.

Evaluate

TVector3<float> Evaluate(float time, bool loop = true) const

Evaluate the animation curve at the specified time.

If evaluating multiple values in a sequential order consider using the cached version of Evaluate() for better performance.

time
Time to evaluate the curve at.
loop
If true the curve will loop when it goes past the end or beggining. Otherwise the curve value will be clamped.

Returns: Interpolated value from the curve at provided time.

EvaluateIntegrated

TVector3<float> EvaluateIntegrated(float time, const TCurveIntegrationCache<TVector3<float>> &integrationCache) const

Evaluates the integrated animation curve. (e.g. evaluating a curve containing velocity values will return a position).

time
Time to evaluate the curve at.
integrationCache
Cache storing the values required for integration. Generated the first time this method is called and re-used on subsequent calls. Caller must ensure to use the cache only with the curve it was originally used on. Separate caches need to be used for single and double integration evaluation.

Returns: Interpolated value from the curve at provided time.

EvaluateIntegratedDouble

TVector3<float> EvaluateIntegratedDouble(float time, const TCurveIntegrationCache<TVector3<float>> &integrationCache) const

Evaluates the double integrated animation curve. (e.g. evaluating a curve containing acceleration values will return a position).

time
Time to evaluate the curve at.
integrationCache
Cache storing the values required for integration. Generated the first time this method is called and re-used on subsequent calls. Caller must ensure to use the cache only with the curve it was originally used on. Separate caches need to be used for single and double integration evaluation.

Returns: Interpolated value from the curve at provided time.

EvaluateKey

KeyFrame EvaluateKey(float time, bool loop) const

Evaluate the animation curve at the specified time and returns a new keyframe containing the evaluated value and tangents.

time
Time to evaluate the curve at.
loop
If true the curve will loop when it goes past the end or beginning. Otherwise the curve value will be clamped.

Returns: Keyframe containing the interpolated value and tangents at provided time.

Split

TAnimationCurve<TVector3<float>> Split(float start, float end)

Splits a piece of the animation curve into a separate animation curve.

start
Beginning time of the split curve.
end
End time of the split curve.

Returns: New curve with data corresponding to the provided split times.

MakeAdditive

void MakeAdditive()

Converts a normal curve into an additive curve.

It is assumed the first keyframe in the curve is the reference key from which to generate the additive curve. Such curves can then be added on top of a curve containing reference keys.

GetTimeRange

std::pair<float, float> GetTimeRange() const

Returns the time of the first and last keyframe in the curve.

CalculateRange

std::pair<TVector3<float>, TVector3<float>> CalculateRange() const

Calculates the minimal and maximal value of the curve.

CalculateRangeIntegrated

std::pair<TVector3<float>, TVector3<float>> CalculateRangeIntegrated(const TCurveIntegrationCache<TVector3<float>> &cache) const

Calculates the minimal and maximal value of the integrated curve.

CalculateRangeIntegratedDouble

std::pair<TVector3<float>, TVector3<float>> CalculateRangeIntegratedDouble(const TCurveIntegrationCache<TVector3<float>> &cache) const

Calculates the minimal and maximal value of the doubly integrated curve.

GetLength

float GetLength() const

Returns the length of the animation curve, from time zero to last keyframe.

GetNumKeyFrames

u32 GetNumKeyFrames() const

Returns the total number of key-frames in the curve.

GetKeyFrame

const TKeyframe<TVector3<float>> &GetKeyFrame(u32 index) const

Returns a keyframe at the specified index.

GetKeyFrames

const Vector<TKeyframe<TVector3<float>>> &GetKeyFrames() const

Returns a list of all keyframes in the curve.

Evaluate

TVector2<float> Evaluate(float time, const TCurveCache<TVector2<float>> &cache, bool loop) const

Evaluate the animation curve using caching.

Caching can significantly speed of evaluation if the evaluation happens sequential order (which should be true for most curves). If evaluation is not happening in sequential order using the non-caching version of Evaluate() might yield better performance.

time
Time to evaluate the curve at.
cache
Cached data from previous requests that can be used for speeding up sequential calls to this method. Caller should ensure to maintain a persistent instance of this data for every animation using this curve in order to ensure cache is maintained.
loop
If true the curve will loop when it goes past the end or beggining. Otherwise the curve value will be clamped.

Returns: Interpolated value from the curve at provided time.

Evaluate

TVector2<float> Evaluate(float time, bool loop = true) const

Evaluate the animation curve at the specified time.

If evaluating multiple values in a sequential order consider using the cached version of Evaluate() for better performance.

time
Time to evaluate the curve at.
loop
If true the curve will loop when it goes past the end or beggining. Otherwise the curve value will be clamped.

Returns: Interpolated value from the curve at provided time.

EvaluateIntegrated

TVector2<float> EvaluateIntegrated(float time, const TCurveIntegrationCache<TVector2<float>> &integrationCache) const

Evaluates the integrated animation curve. (e.g. evaluating a curve containing velocity values will return a position).

time
Time to evaluate the curve at.
integrationCache
Cache storing the values required for integration. Generated the first time this method is called and re-used on subsequent calls. Caller must ensure to use the cache only with the curve it was originally used on. Separate caches need to be used for single and double integration evaluation.

Returns: Interpolated value from the curve at provided time.

EvaluateIntegratedDouble

TVector2<float> EvaluateIntegratedDouble(float time, const TCurveIntegrationCache<TVector2<float>> &integrationCache) const

Evaluates the double integrated animation curve. (e.g. evaluating a curve containing acceleration values will return a position).

time
Time to evaluate the curve at.
integrationCache
Cache storing the values required for integration. Generated the first time this method is called and re-used on subsequent calls. Caller must ensure to use the cache only with the curve it was originally used on. Separate caches need to be used for single and double integration evaluation.

Returns: Interpolated value from the curve at provided time.

EvaluateKey

KeyFrame EvaluateKey(float time, bool loop) const

Evaluate the animation curve at the specified time and returns a new keyframe containing the evaluated value and tangents.

time
Time to evaluate the curve at.
loop
If true the curve will loop when it goes past the end or beginning. Otherwise the curve value will be clamped.

Returns: Keyframe containing the interpolated value and tangents at provided time.

Split

TAnimationCurve<TVector2<float>> Split(float start, float end)

Splits a piece of the animation curve into a separate animation curve.

start
Beginning time of the split curve.
end
End time of the split curve.

Returns: New curve with data corresponding to the provided split times.

MakeAdditive

void MakeAdditive()

Converts a normal curve into an additive curve.

It is assumed the first keyframe in the curve is the reference key from which to generate the additive curve. Such curves can then be added on top of a curve containing reference keys.

GetTimeRange

std::pair<float, float> GetTimeRange() const

Returns the time of the first and last keyframe in the curve.

CalculateRange

std::pair<TVector2<float>, TVector2<float>> CalculateRange() const

Calculates the minimal and maximal value of the curve.

CalculateRangeIntegrated

std::pair<TVector2<float>, TVector2<float>> CalculateRangeIntegrated(const TCurveIntegrationCache<TVector2<float>> &cache) const

Calculates the minimal and maximal value of the integrated curve.

CalculateRangeIntegratedDouble

std::pair<TVector2<float>, TVector2<float>> CalculateRangeIntegratedDouble(const TCurveIntegrationCache<TVector2<float>> &cache) const

Calculates the minimal and maximal value of the doubly integrated curve.

GetLength

float GetLength() const

Returns the length of the animation curve, from time zero to last keyframe.

GetNumKeyFrames

u32 GetNumKeyFrames() const

Returns the total number of key-frames in the curve.

GetKeyFrame

const TKeyframe<TVector2<float>> &GetKeyFrame(u32 index) const

Returns a keyframe at the specified index.

GetKeyFrames

const Vector<TKeyframe<TVector2<float>>> &GetKeyFrames() const

Returns a list of all keyframes in the curve.

Evaluate

TQuaternion<float> Evaluate(float time, const TCurveCache<TQuaternion<float>> &cache, bool loop) const

Evaluate the animation curve using caching.

Caching can significantly speed of evaluation if the evaluation happens sequential order (which should be true for most curves). If evaluation is not happening in sequential order using the non-caching version of Evaluate() might yield better performance.

time
Time to evaluate the curve at.
cache
Cached data from previous requests that can be used for speeding up sequential calls to this method. Caller should ensure to maintain a persistent instance of this data for every animation using this curve in order to ensure cache is maintained.
loop
If true the curve will loop when it goes past the end or beggining. Otherwise the curve value will be clamped.

Returns: Interpolated value from the curve at provided time.

Evaluate

TQuaternion<float> Evaluate(float time, bool loop) const

Evaluate the animation curve at the specified time.

If evaluating multiple values in a sequential order consider using the cached version of Evaluate() for better performance.

time
Time to evaluate the curve at.
loop
If true the curve will loop when it goes past the end or beggining. Otherwise the curve value will be clamped.

Returns: Interpolated value from the curve at provided time.

EvaluateIntegrated

TQuaternion<float> EvaluateIntegrated(float time, const TCurveIntegrationCache<TQuaternion<float>> &integrationCache) const

Evaluates the integrated animation curve. (e.g. evaluating a curve containing velocity values will return a position).

time
Time to evaluate the curve at.
integrationCache
Cache storing the values required for integration. Generated the first time this method is called and re-used on subsequent calls. Caller must ensure to use the cache only with the curve it was originally used on. Separate caches need to be used for single and double integration evaluation.

Returns: Interpolated value from the curve at provided time.

EvaluateIntegratedDouble

TQuaternion<float> EvaluateIntegratedDouble(float time, const TCurveIntegrationCache<TQuaternion<float>> &integrationCache) const

Evaluates the double integrated animation curve. (e.g. evaluating a curve containing acceleration values will return a position).

time
Time to evaluate the curve at.
integrationCache
Cache storing the values required for integration. Generated the first time this method is called and re-used on subsequent calls. Caller must ensure to use the cache only with the curve it was originally used on. Separate caches need to be used for single and double integration evaluation.

Returns: Interpolated value from the curve at provided time.

EvaluateKey

KeyFrame EvaluateKey(float time, bool loop) const

Evaluate the animation curve at the specified time and returns a new keyframe containing the evaluated value and tangents.

time
Time to evaluate the curve at.
loop
If true the curve will loop when it goes past the end or beginning. Otherwise the curve value will be clamped.

Returns: Keyframe containing the interpolated value and tangents at provided time.

Split

TAnimationCurve<TQuaternion<float>> Split(float start, float end)

Splits a piece of the animation curve into a separate animation curve.

start
Beginning time of the split curve.
end
End time of the split curve.

Returns: New curve with data corresponding to the provided split times.

MakeAdditive

void MakeAdditive()

Converts a normal curve into an additive curve.

It is assumed the first keyframe in the curve is the reference key from which to generate the additive curve. Such curves can then be added on top of a curve containing reference keys.

GetTimeRange

std::pair<float, float> GetTimeRange() const

Returns the time of the first and last keyframe in the curve.

CalculateRange

std::pair<TQuaternion<float>, TQuaternion<float>> CalculateRange() const

Calculates the minimal and maximal value of the curve.

CalculateRangeIntegrated

std::pair<TQuaternion<float>, TQuaternion<float>> CalculateRangeIntegrated(const TCurveIntegrationCache<TQuaternion<float>> &cache) const

Calculates the minimal and maximal value of the integrated curve.

CalculateRangeIntegratedDouble

std::pair<TQuaternion<float>, TQuaternion<float>> CalculateRangeIntegratedDouble(const TCurveIntegrationCache<TQuaternion<float>> &cache) const

Calculates the minimal and maximal value of the doubly integrated curve.

GetLength

float GetLength() const

Returns the length of the animation curve, from time zero to last keyframe.

GetNumKeyFrames

u32 GetNumKeyFrames() const

Returns the total number of key-frames in the curve.

GetKeyFrame

const TKeyframe<TQuaternion<float>> &GetKeyFrame(u32 index) const

Returns a keyframe at the specified index.

GetKeyFrames

const Vector<TKeyframe<TQuaternion<float>>> &GetKeyFrames() const

Returns a list of all keyframes in the curve.

Evaluate

int Evaluate(float time, const TCurveCache<int> &cache, bool loop) const

Evaluate the animation curve using caching.

Caching can significantly speed of evaluation if the evaluation happens sequential order (which should be true for most curves). If evaluation is not happening in sequential order using the non-caching version of Evaluate() might yield better performance.

time
Time to evaluate the curve at.
cache
Cached data from previous requests that can be used for speeding up sequential calls to this method. Caller should ensure to maintain a persistent instance of this data for every animation using this curve in order to ensure cache is maintained.
loop
If true the curve will loop when it goes past the end or beggining. Otherwise the curve value will be clamped.

Returns: Interpolated value from the curve at provided time.

Evaluate

int Evaluate(float time, bool loop) const

Evaluate the animation curve at the specified time.

If evaluating multiple values in a sequential order consider using the cached version of Evaluate() for better performance.

time
Time to evaluate the curve at.
loop
If true the curve will loop when it goes past the end or beggining. Otherwise the curve value will be clamped.

Returns: Interpolated value from the curve at provided time.

EvaluateIntegrated

int EvaluateIntegrated(float time, const TCurveIntegrationCache<int> &integrationCache) const

Evaluates the integrated animation curve. (e.g. evaluating a curve containing velocity values will return a position).

time
Time to evaluate the curve at.
integrationCache
Cache storing the values required for integration. Generated the first time this method is called and re-used on subsequent calls. Caller must ensure to use the cache only with the curve it was originally used on. Separate caches need to be used for single and double integration evaluation.

Returns: Interpolated value from the curve at provided time.

EvaluateIntegratedDouble

int EvaluateIntegratedDouble(float time, const TCurveIntegrationCache<int> &integrationCache) const

Evaluates the double integrated animation curve. (e.g. evaluating a curve containing acceleration values will return a position).

time
Time to evaluate the curve at.
integrationCache
Cache storing the values required for integration. Generated the first time this method is called and re-used on subsequent calls. Caller must ensure to use the cache only with the curve it was originally used on. Separate caches need to be used for single and double integration evaluation.

Returns: Interpolated value from the curve at provided time.

EvaluateKey

KeyFrame EvaluateKey(float time, bool loop) const

Evaluate the animation curve at the specified time and returns a new keyframe containing the evaluated value and tangents.

time
Time to evaluate the curve at.
loop
If true the curve will loop when it goes past the end or beginning. Otherwise the curve value will be clamped.

Returns: Keyframe containing the interpolated value and tangents at provided time.

Split

TAnimationCurve<int> Split(float start, float end)

Splits a piece of the animation curve into a separate animation curve.

start
Beginning time of the split curve.
end
End time of the split curve.

Returns: New curve with data corresponding to the provided split times.

MakeAdditive

void MakeAdditive()

Converts a normal curve into an additive curve.

It is assumed the first keyframe in the curve is the reference key from which to generate the additive curve. Such curves can then be added on top of a curve containing reference keys.

GetTimeRange

std::pair<float, float> GetTimeRange() const

Returns the time of the first and last keyframe in the curve.

CalculateRange

std::pair<int, int> CalculateRange() const

Calculates the minimal and maximal value of the curve.

CalculateRangeIntegrated

std::pair<int, int> CalculateRangeIntegrated(const TCurveIntegrationCache<int> &cache) const

Calculates the minimal and maximal value of the integrated curve.

CalculateRangeIntegratedDouble

std::pair<int, int> CalculateRangeIntegratedDouble(const TCurveIntegrationCache<int> &cache) const

Calculates the minimal and maximal value of the doubly integrated curve.

GetLength

float GetLength() const

Returns the length of the animation curve, from time zero to last keyframe.

GetNumKeyFrames

u32 GetNumKeyFrames() const

Returns the total number of key-frames in the curve.

GetKeyFrame

const TKeyframe<int> &GetKeyFrame(u32 index) const

Returns a keyframe at the specified index.

GetKeyFrames

const Vector<TKeyframe<int>> &GetKeyFrames() const

Returns a list of all keyframes in the curve.

Operators

operator==

bool operator==(const TAnimationCurve<T> &rhs) const

operator!=

bool operator!=(const TAnimationCurve<T> &rhs) const

operator==

bool operator==(const TAnimationCurve<float> &rhs) const

operator!=

bool operator!=(const TAnimationCurve<float> &rhs) const

operator==

bool operator==(const TAnimationCurve<TVector3<float>> &rhs) const

operator!=

bool operator!=(const TAnimationCurve<TVector3<float>> &rhs) const

operator==

bool operator==(const TAnimationCurve<TVector2<float>> &rhs) const

operator!=

bool operator!=(const TAnimationCurve<TVector2<float>> &rhs) const

operator==

bool operator==(const TAnimationCurve<TQuaternion<float>> &rhs) const

operator!=

bool operator!=(const TAnimationCurve<TQuaternion<float>> &rhs) const

operator==

bool operator==(const TAnimationCurve<int> &rhs) const

operator!=

bool operator!=(const TAnimationCurve<int> &rhs) const

Private

Methods

FindKeys

void FindKeys(float time, const TCurveCache<T> &cache, u32 &outLeftKey, u32 &outRightKey) const

Returns a pair of keys that can be used for interpolating to field the value at the provided time.

This attempts to find keys using the cache first, and if not possible falls back to a full search.

time
Time for which to find the relevant keys from. It is expected to be clamped to a valid range within the curve.
cache
Animation instance data holding the time to evaluate the curve at, and any cached data from previous requests. Time is expected to be clamped to a valid range within the curve.
outLeftKey
Index of the key to interpolate from.
outRightKey
Index of the key to interpolate to.

FindKeys

void FindKeys(float time, u32 &outLeftKey, u32 &outRightKey) const

Returns a pair of keys that can be used for interpolating to field the value at the provided time.

time
Time for which to find the relevant keys from. It is expected to be clamped to a valid range within the curve.
outLeftKey
Index of the key to interpolate from.
outRightKey
Index of the key to interpolate to.

FindKey

u32 FindKey(float time)

Returns a keyframe index nearest to the provided time.

EvaluateKey

KeyFrame EvaluateKey(const KeyFrame &lhs, const KeyFrame &rhs, float time) const

Calculates a key in-between the provided two keys.

lhs
Key to interpolate from.
rhs
Key to interpolate to.
time
Curve time to interpolate the keys at.

Returns: Interpolated key value.

BuildIntegrationCache

void BuildIntegrationCache(const TCurveIntegrationCache<T> &cache) const

Creates a cache used for quick evaluation of single integrated curves.

BuildDoubleIntegrationCache

void BuildDoubleIntegrationCache(const TCurveIntegrationCache<T> &cache) const

Creates a cache used for quick evaluation of double integrated curves.

FindKeys

void FindKeys(float time, const TCurveCache<float> &cache, u32 &outLeftKey, u32 &outRightKey) const

Returns a pair of keys that can be used for interpolating to field the value at the provided time.

This attempts to find keys using the cache first, and if not possible falls back to a full search.

time
Time for which to find the relevant keys from. It is expected to be clamped to a valid range within the curve.
cache
Animation instance data holding the time to evaluate the curve at, and any cached data from previous requests. Time is expected to be clamped to a valid range within the curve.
outLeftKey
Index of the key to interpolate from.
outRightKey
Index of the key to interpolate to.

FindKeys

void FindKeys(float time, u32 &outLeftKey, u32 &outRightKey) const

Returns a pair of keys that can be used for interpolating to field the value at the provided time.

time
Time for which to find the relevant keys from. It is expected to be clamped to a valid range within the curve.
outLeftKey
Index of the key to interpolate from.
outRightKey
Index of the key to interpolate to.

FindKey

u32 FindKey(float time)

Returns a keyframe index nearest to the provided time.

EvaluateKey

KeyFrame EvaluateKey(const KeyFrame &lhs, const KeyFrame &rhs, float time) const

Calculates a key in-between the provided two keys.

lhs
Key to interpolate from.
rhs
Key to interpolate to.
time
Curve time to interpolate the keys at.

Returns: Interpolated key value.

BuildIntegrationCache

void BuildIntegrationCache(const TCurveIntegrationCache<float> &cache) const

Creates a cache used for quick evaluation of single integrated curves.

BuildDoubleIntegrationCache

void BuildDoubleIntegrationCache(const TCurveIntegrationCache<float> &cache) const

Creates a cache used for quick evaluation of double integrated curves.

FindKeys

void FindKeys(float time, const TCurveCache<TVector3<float>> &cache, u32 &outLeftKey, u32 &outRightKey) const

Returns a pair of keys that can be used for interpolating to field the value at the provided time.

This attempts to find keys using the cache first, and if not possible falls back to a full search.

time
Time for which to find the relevant keys from. It is expected to be clamped to a valid range within the curve.
cache
Animation instance data holding the time to evaluate the curve at, and any cached data from previous requests. Time is expected to be clamped to a valid range within the curve.
outLeftKey
Index of the key to interpolate from.
outRightKey
Index of the key to interpolate to.

FindKeys

void FindKeys(float time, u32 &outLeftKey, u32 &outRightKey) const

Returns a pair of keys that can be used for interpolating to field the value at the provided time.

time
Time for which to find the relevant keys from. It is expected to be clamped to a valid range within the curve.
outLeftKey
Index of the key to interpolate from.
outRightKey
Index of the key to interpolate to.

FindKey

u32 FindKey(float time)

Returns a keyframe index nearest to the provided time.

EvaluateKey

KeyFrame EvaluateKey(const KeyFrame &lhs, const KeyFrame &rhs, float time) const

Calculates a key in-between the provided two keys.

lhs
Key to interpolate from.
rhs
Key to interpolate to.
time
Curve time to interpolate the keys at.

Returns: Interpolated key value.

BuildIntegrationCache

void BuildIntegrationCache(const TCurveIntegrationCache<TVector3<float>> &cache) const

Creates a cache used for quick evaluation of single integrated curves.

BuildDoubleIntegrationCache

void BuildDoubleIntegrationCache(const TCurveIntegrationCache<TVector3<float>> &cache) const

Creates a cache used for quick evaluation of double integrated curves.

FindKeys

void FindKeys(float time, const TCurveCache<TVector2<float>> &cache, u32 &outLeftKey, u32 &outRightKey) const

Returns a pair of keys that can be used for interpolating to field the value at the provided time.

This attempts to find keys using the cache first, and if not possible falls back to a full search.

time
Time for which to find the relevant keys from. It is expected to be clamped to a valid range within the curve.
cache
Animation instance data holding the time to evaluate the curve at, and any cached data from previous requests. Time is expected to be clamped to a valid range within the curve.
outLeftKey
Index of the key to interpolate from.
outRightKey
Index of the key to interpolate to.

FindKeys

void FindKeys(float time, u32 &outLeftKey, u32 &outRightKey) const

Returns a pair of keys that can be used for interpolating to field the value at the provided time.

time
Time for which to find the relevant keys from. It is expected to be clamped to a valid range within the curve.
outLeftKey
Index of the key to interpolate from.
outRightKey
Index of the key to interpolate to.

FindKey

u32 FindKey(float time)

Returns a keyframe index nearest to the provided time.

EvaluateKey

KeyFrame EvaluateKey(const KeyFrame &lhs, const KeyFrame &rhs, float time) const

Calculates a key in-between the provided two keys.

lhs
Key to interpolate from.
rhs
Key to interpolate to.
time
Curve time to interpolate the keys at.

Returns: Interpolated key value.

BuildIntegrationCache

void BuildIntegrationCache(const TCurveIntegrationCache<TVector2<float>> &cache) const

Creates a cache used for quick evaluation of single integrated curves.

BuildDoubleIntegrationCache

void BuildDoubleIntegrationCache(const TCurveIntegrationCache<TVector2<float>> &cache) const

Creates a cache used for quick evaluation of double integrated curves.

FindKeys

void FindKeys(float time, const TCurveCache<TQuaternion<float>> &cache, u32 &outLeftKey, u32 &outRightKey) const

Returns a pair of keys that can be used for interpolating to field the value at the provided time.

This attempts to find keys using the cache first, and if not possible falls back to a full search.

time
Time for which to find the relevant keys from. It is expected to be clamped to a valid range within the curve.
cache
Animation instance data holding the time to evaluate the curve at, and any cached data from previous requests. Time is expected to be clamped to a valid range within the curve.
outLeftKey
Index of the key to interpolate from.
outRightKey
Index of the key to interpolate to.

FindKeys

void FindKeys(float time, u32 &outLeftKey, u32 &outRightKey) const

Returns a pair of keys that can be used for interpolating to field the value at the provided time.

time
Time for which to find the relevant keys from. It is expected to be clamped to a valid range within the curve.
outLeftKey
Index of the key to interpolate from.
outRightKey
Index of the key to interpolate to.

FindKey

u32 FindKey(float time)

Returns a keyframe index nearest to the provided time.

EvaluateKey

KeyFrame EvaluateKey(const KeyFrame &lhs, const KeyFrame &rhs, float time) const

Calculates a key in-between the provided two keys.

lhs
Key to interpolate from.
rhs
Key to interpolate to.
time
Curve time to interpolate the keys at.

Returns: Interpolated key value.

BuildIntegrationCache

void BuildIntegrationCache(const TCurveIntegrationCache<TQuaternion<float>> &cache) const

Creates a cache used for quick evaluation of single integrated curves.

BuildDoubleIntegrationCache

void BuildDoubleIntegrationCache(const TCurveIntegrationCache<TQuaternion<float>> &cache) const

Creates a cache used for quick evaluation of double integrated curves.

FindKeys

void FindKeys(float time, const TCurveCache<int> &cache, u32 &outLeftKey, u32 &outRightKey) const

Returns a pair of keys that can be used for interpolating to field the value at the provided time.

This attempts to find keys using the cache first, and if not possible falls back to a full search.

time
Time for which to find the relevant keys from. It is expected to be clamped to a valid range within the curve.
cache
Animation instance data holding the time to evaluate the curve at, and any cached data from previous requests. Time is expected to be clamped to a valid range within the curve.
outLeftKey
Index of the key to interpolate from.
outRightKey
Index of the key to interpolate to.

FindKeys

void FindKeys(float time, u32 &outLeftKey, u32 &outRightKey) const

Returns a pair of keys that can be used for interpolating to field the value at the provided time.

time
Time for which to find the relevant keys from. It is expected to be clamped to a valid range within the curve.
outLeftKey
Index of the key to interpolate from.
outRightKey
Index of the key to interpolate to.

FindKey

u32 FindKey(float time)

Returns a keyframe index nearest to the provided time.

EvaluateKey

KeyFrame EvaluateKey(const KeyFrame &lhs, const KeyFrame &rhs, float time) const

Calculates a key in-between the provided two keys.

lhs
Key to interpolate from.
rhs
Key to interpolate to.
time
Curve time to interpolate the keys at.

Returns: Interpolated key value.

BuildIntegrationCache

void BuildIntegrationCache(const TCurveIntegrationCache<int> &cache) const

Creates a cache used for quick evaluation of single integrated curves.

BuildDoubleIntegrationCache

void BuildDoubleIntegrationCache(const TCurveIntegrationCache<int> &cache) const

Creates a cache used for quick evaluation of double integrated curves.

Fields

mKeyframes

Vector<KeyFrame> mKeyframes

mStart

float mStart

mEnd

float mEnd

mLength

float mLength

mKeyframes

Vector<KeyFrame> mKeyframes

mStart

float mStart

mEnd

float mEnd

mLength

float mLength

mKeyframes

Vector<KeyFrame> mKeyframes

mStart

float mStart

mEnd

float mEnd

mLength

float mLength

mKeyframes

Vector<KeyFrame> mKeyframes

mStart

float mStart

mEnd

float mEnd

mLength

float mLength

mKeyframes

Vector<KeyFrame> mKeyframes

mStart

float mStart

mEnd

float mEnd

mLength

float mLength

mKeyframes

Vector<KeyFrame> mKeyframes

mStart

float mStart

mEnd

float mEnd

mLength

float mLength