An individual point in a CYITimelineTrack which represents a CYISceneNode property value for a specific time in the track.
Keytimes are added to a CYITimelineTrack. The keytime contains information about the type of interpolation which is used to calculate a sample property value between two keytimes. The keytime also contains information relating to the speed and influence (EASE) at which the keytime property value is approached.
#include <animation/YiTimelineKeyTime.h>

Classes | |
| struct | EASE |
| struct | KEYTIME_SETUP |
| struct | SPATIAL_EASE |
Public Types | |
| enum | INTERPOLATION_TYPE { LINEAR, BEZIER, HOLD } |
Static Public Attributes | |
| static const uint32_t | MAX_EASE_DIMENSIONS = 3 |
Enumeration of the interpolation types which the keytime is processed with.
| Enumerator | |
|---|---|
| LINEAR |
Only takes into account the keytimes on either side of the current keytime and values change uniformly between keytimes. This interpolation type is not as smooth as BEZIER. |
| BEZIER |
The smoothest of the available interpolation types, creates a smooth curve between keytimes. |
| HOLD |
Changes a CYISceneNode property over time without a gradual transition. This is a temporal interpolation method and not used for spatial properties. |
| CYITimelineKeyTime::CYITimelineKeyTime | ( | ) |
|
virtual |
| void CYITimelineKeyTime::CalculateValue | ( | const CYITimelineKeyTime * | pPrevious, |
| float | fDataPositions[MAX_EASE_DIMENSIONS], | ||
| uint32_t | uDimensionCount, | ||
| CYIVariant & | rOutValue | ||
| ) | const |
Calculates the interpolated value between this keytime and the pPrevious keytime. fDataPositions represents the ease positions and uDimensionCount specifies the number of dimensions represented by fDataPositions. The interpolated output value will be stored in rOutValue.
| void CYITimelineKeyTime::ClearInterpolators | ( | ) |
Resets the state of all temporal interpolators associated with this keytime.
| void CYITimelineKeyTime::DumpSpatialInterpolatorData | ( | ) |
Logs the current spatial interpolator data for each dimension index.
| uint32_t CYITimelineKeyTime::GetAbsoluteTime | ( | ) | const |
Returns the absolute time of this keytime, in milliseconds.
| int32_t CYITimelineKeyTime::GetApproximateSize | ( | ) | const |
Returns the approximate size of the keytime, in bytes. This approximation includes ease values associated with the keytime as well as class signature sizes.
| uint32_t CYITimelineKeyTime::GetDuration | ( | ) | const |
Returns the duration of this keytime, in milliseconds.
| const EASE* CYITimelineKeyTime::GetEase | ( | uint32_t | uDimensionIndex | ) | const |
Returns the ease values for uDimensionIndex. Returns nullptr if uDimensionIndex is out of range for the number of ease dimensions associated with this keytime.
| uint32_t CYITimelineKeyTime::GetEaseDimensionCount | ( | ) | const |
Returns the number of ease dimensions associated with this keytime. This is based on the number of KEYTIME_SETUP::easeValues the keytime is initialized with.
| INTERPOLATION_TYPE CYITimelineKeyTime::GetInterpolationType | ( | ) | const |
Returns the type of interpolation associated with this keytime. This is set at initialization time.
| const CYIVariant& CYITimelineKeyTime::GetKeyValue | ( | ) | const |
Returns the property value at this keytime. This is set at initialization time.
| float CYITimelineKeyTime::GetKeyValueAsFloat | ( | uint32_t | nDimensionIndex | ) | const |
Returns the property value at this keytime as a float. nDimensionIndex represents the dimension of the value, if the value is a vector.
| const SPATIAL_EASE* CYITimelineKeyTime::GetSpatialEaseIn | ( | ) | const |
Returns the spatial ease values coming into the keytime. This is set at initialization time.
| const SPATIAL_EASE* CYITimelineKeyTime::GetSpatialEaseOut | ( | ) | const |
Returns the spatial ease values going out of the keytime. This is set at initialization time.
| CYITimeInterpolator* CYITimelineKeyTime::GetTimeInterpolator | ( | uint32_t | uValueIndex | ) |
Returns the time interpolator for uValueIndex. Returns nullptr if the interpolator for the index has not been set or if the index is greater than or equal to MAX_EASE_DIMENSIONS.
| void CYITimelineKeyTime::InitKeyTime | ( | const CYITimelineKeyTime::KEYTIME_SETUP * | pKeytimeSetup | ) |
Initializes the keytime with the values provided in pKeytimeSetup.
| void CYITimelineKeyTime::SetAbsoluteTime | ( | uint32_t | uAbsoluteTime | ) |
Sets the absolute time of this keytime to uAbsoluteTime. This is the absolute position of this keytime in the timeline, in milliseconds.
| void CYITimelineKeyTime::SetDuration | ( | uint32_t | uDuration | ) |
Sets the duration of this keytime to uDuration, in milliseconds.
| void CYITimelineKeyTime::SetSpatialInterpolator | ( | float | fC0, |
| float | fC1, | ||
| float | fC2, | ||
| float | fC3, | ||
| uint32_t | uDimensionIndex | ||
| ) |
Sets the spatial interpolator data for the specified uDimensionIndex. uDimensionIndex must be less than MAX_EASE_DIMENSIONS.
| void CYITimelineKeyTime::SetTimeInterpolator | ( | std::unique_ptr< CYITimeInterpolator > | pInterpolator, |
| uint32_t | uDimensionIndex | ||
| ) |
Sets the time interpolator for the specified uDimensionIndex to pInterpolator. uDimensionIndex must be less than MAX_EASE_DIMENSIONS.
|
static |
Represents the the number of dimensions that ease values can represent. The three dimensions are x, y and z.