A representation of a single track of a CYITimeline.
This class contains the attribute of the track which defines the type of transformation the track is responsible for on a CYISceneNode. The track also contains keytimes for the track and is capable of interpolating these keytimes to update the properties of a CYISceneNode as the CYITimeline progresses. CYITimelineTracks are added to a CYITimelineBackingStore to create a CYITimeline.
#include <animation/YiTimelineTrack.h>
Classes | |
struct | TrackIdentifier |
Public Member Functions | |
CYITimelineTrack (uint32_t trackID, AttributeType attributeType, const CYIString &targetName) | |
virtual | ~CYITimelineTrack () |
void | Reserve (size_t keytimes) |
void | AddKeytime (CYITimelineKeyTime::KEYTIME_SETUP &&keytimeSetup) |
void | AddKeytime (const CYITimelineKeyTime::KEYTIME_SETUP *pKeytimeSetup) |
std::vector< const CYITimelineKeyTime * > | GetKeyTimes () const |
AttributeType | GetAttribute () const |
const char * | GetAttributeName () const |
CYIVariant::Type | GetDataType () const |
int32_t | GetTargetID () const |
int32_t | GetSubTargetID () const |
const CYIString & | GetTargetName () const |
uint64_t | GetTotalTime () const |
uint32_t | GetTrackID () const |
CYIVariant | ReadStream (uint64_t time) const |
void | SetTargetID (int32_t id) |
void | SetSubTargetID (int32_t id) |
const CYIString & | GetName () const |
void | SetName (const CYIString &trackName) |
void | SetNewAttributeType (AttributeType attributeType) |
size_t | GetApproximateSize () const |
|
strong |
Enumeration of the timeline track attributes supported by You.i Engine. These attributes represent the transformation that takes place on the timeline track.
CYITimelineTrack::CYITimelineTrack | ( | uint32_t | trackID, |
AttributeType | attributeType, | ||
const CYIString & | targetName | ||
) |
Constructs a timeline track with the trackID, the attributeType of the track and the targetName which is the name of the CYISceneNode transformed by the timeline track.
|
virtual |
void CYITimelineTrack::AddKeytime | ( | CYITimelineKeyTime::KEYTIME_SETUP && | keytimeSetup | ) |
Adds a CYITimelineKeyTime to the CYITimelineTrack. The keytime will be intialized with the information provided in keytimeSetup.
void CYITimelineTrack::AddKeytime | ( | const CYITimelineKeyTime::KEYTIME_SETUP * | pKeytimeSetup | ) |
Adds a CYITimelineKeyTime to the CYITimelineTrack. The keytime will be intialized with the information provided in pKeytimeSetup.
size_t CYITimelineTrack::GetApproximateSize | ( | ) | const |
Returns the approximate size of the CYITimelineTrack object, in bytes. This approximation includes the keytimes associated with the track as well as class signatures.
AttributeType CYITimelineTrack::GetAttribute | ( | ) | const |
Returns transformation attribute associated with this track.
const char* CYITimelineTrack::GetAttributeName | ( | ) | const |
Returns the name of the attribute associated with this track. This is a string translation of the CYITimelineTrack::AttributeType.
CYIVariant::Type CYITimelineTrack::GetDataType | ( | ) | const |
Returns the data type of the keytimes associated with this track.
std::vector<const CYITimelineKeyTime *> CYITimelineTrack::GetKeyTimes | ( | ) | const |
Returns a vector of all key times present in this timeline track.
const CYIString& CYITimelineTrack::GetName | ( | ) | const |
Returns the name of this track. In general this is the attribute name of the track.
int32_t CYITimelineTrack::GetSubTargetID | ( | ) | const |
Returns the sub ID of the component which this track modifies. This is generally used in conjunction with GetTargetID().
int32_t CYITimelineTrack::GetTargetID | ( | ) | const |
Returns the ID of the CYISceneNode which this track modifies.
const CYIString& CYITimelineTrack::GetTargetName | ( | ) | const |
Returns the name of the CYISceneNode which this track modifies. This is set via the constructor of the CYITimelineTrack.
uint64_t CYITimelineTrack::GetTotalTime | ( | ) | const |
Returns the total time of this track. This is this combined duration of all keytimes associated with this track.
uint32_t CYITimelineTrack::GetTrackID | ( | ) | const |
Returns the ID of this track. This is set via the constructor of the CYITimelineTrack.
CYIVariant CYITimelineTrack::ReadStream | ( | uint64_t | time | ) | const |
Returns the stream data closest to time, in milliseconds. This will return the interpolated data of keytimes. This is used to update the CYISceneNode properties as the associated CYITimeline progresses.
void CYITimelineTrack::Reserve | ( | size_t | keytimes | ) |
Reserves enough room in the timeline track to store at least keytimes key times without reallocating. Calling this function is optional but doing so can improve the performance of AddKeytime.
void CYITimelineTrack::SetName | ( | const CYIString & | trackName | ) |
Sets the name of this track to trackName.
void CYITimelineTrack::SetNewAttributeType | ( | AttributeType | attributeType | ) |
Sets the attributeType of this track.
void CYITimelineTrack::SetSubTargetID | ( | int32_t | id | ) |
Sets the ID of the component which this track modifies. This is generally used in conjunction with SetTargetID().
void CYITimelineTrack::SetTargetID | ( | int32_t | id | ) |
Sets the ID of the CYISceneNode which this track modifies.