You.i Engine
CYITimelineTrack Class Reference

Detailed Description

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.

See also
CYITimelineKeyTime
CYITimelineBackingStore
CYITimeline

#include <animation/YiTimelineTrack.h>

Classes

struct  TrackIdentifier
 

Public Types

enum  AttributeType : uint8_t {
  AttributeType::Invalid = 0,
  AttributeType::Position,
  AttributeType::SeparatedPositionX,
  AttributeType::SeparatedPositionY,
  AttributeType::SeparatedPositionZ,
  AttributeType::RotationX,
  AttributeType::RotationY,
  AttributeType::RotationZ,
  AttributeType::Orientation,
  AttributeType::Scale,
  AttributeType::Opacity,
  AttributeType::Visibility,
  AttributeType::AnchorPoint,
  AttributeType::ShapePosition,
  AttributeType::ShapeEndPosition,
  AttributeType::ShapeRotation,
  AttributeType::ShapeScale,
  AttributeType::ShapeOpacity,
  AttributeType::ShapeEndOpacity,
  AttributeType::ShapeAnchorPoint,
  AttributeType::ShapeSize,
  AttributeType::ShapeSkew,
  AttributeType::ShapeSkewAxis,
  AttributeType::ShapeRoundness,
  AttributeType::ShapeColor,
  AttributeType::ShapeGradientColors,
  AttributeType::ShapeHighlightLength,
  AttributeType::ShapeHighlightAngle,
  AttributeType::ShapeStrokeWidth,
  AttributeType::ShapeMiterLimit,
  AttributeType::ShapeCopies,
  AttributeType::ShapeOffset,
  AttributeType::ShapePath,
  AttributeType::Custom
}
 

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 CYIStringGetTargetName () 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 CYIStringGetName () const
 
void SetName (const CYIString &trackName)
 
void SetNewAttributeType (AttributeType attributeType)
 
size_t GetApproximateSize () const
 

Member Enumeration Documentation

◆ AttributeType

enum CYITimelineTrack::AttributeType : uint8_t
strong

Enumeration of the timeline track attributes supported by You.i Engine. These attributes represent the transformation that takes place on the timeline track.

Enumerator
Invalid 
Position 
SeparatedPositionX 
SeparatedPositionY 
SeparatedPositionZ 
RotationX 
RotationY 
RotationZ 
Orientation 
Scale 
Opacity 
Visibility 
AnchorPoint 
ShapePosition 
ShapeEndPosition 
ShapeRotation 
ShapeScale 
ShapeOpacity 
ShapeEndOpacity 
ShapeAnchorPoint 
ShapeSize 
ShapeSkew 
ShapeSkewAxis 
ShapeRoundness 
ShapeColor 
ShapeGradientColors 
ShapeHighlightLength 
ShapeHighlightAngle 
ShapeStrokeWidth 
ShapeMiterLimit 
ShapeCopies 
ShapeOffset 
ShapePath 
Custom 

Constructor & Destructor Documentation

◆ CYITimelineTrack()

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.

◆ ~CYITimelineTrack()

virtual CYITimelineTrack::~CYITimelineTrack ( )
virtual

Member Function Documentation

◆ AddKeytime() [1/2]

void CYITimelineTrack::AddKeytime ( CYITimelineKeyTime::KEYTIME_SETUP &&  keytimeSetup)

Adds a CYITimelineKeyTime to the CYITimelineTrack. The keytime will be intialized with the information provided in keytimeSetup.

◆ AddKeytime() [2/2]

void CYITimelineTrack::AddKeytime ( const CYITimelineKeyTime::KEYTIME_SETUP pKeytimeSetup)
Deprecated:
This function is deprecated and may be removed in a future release. AddKeytime(CYITimelineKeyTime::KEYTIME_SETUP &&) should be used instead.

Adds a CYITimelineKeyTime to the CYITimelineTrack. The keytime will be intialized with the information provided in pKeytimeSetup.

Note
The caller retains ownership of pKeytimeSetup.

◆ GetApproximateSize()

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.

◆ GetAttribute()

AttributeType CYITimelineTrack::GetAttribute ( ) const

Returns transformation attribute associated with this track.

See also
SetNewAttributeType
GetAttributeName

◆ GetAttributeName()

const char* CYITimelineTrack::GetAttributeName ( ) const

Returns the name of the attribute associated with this track. This is a string translation of the CYITimelineTrack::AttributeType.

See also
GetAttribute

◆ GetDataType()

CYIVariant::Type CYITimelineTrack::GetDataType ( ) const

Returns the data type of the keytimes associated with this track.

See also
CYITimelineKeyTime::GetKeyValue
CYIVariant::GetType

◆ GetKeyTimes()

std::vector<const CYITimelineKeyTime *> CYITimelineTrack::GetKeyTimes ( ) const

Returns a vector of all key times present in this timeline track.

Note
This object retains ownership of the CYITimelineKeyTime objects.

◆ GetName()

const CYIString& CYITimelineTrack::GetName ( ) const

Returns the name of this track. In general this is the attribute name of the track.

See also
GetAttributeName
SetName

◆ GetSubTargetID()

int32_t CYITimelineTrack::GetSubTargetID ( ) const

Returns the sub ID of the component which this track modifies. This is generally used in conjunction with GetTargetID().

See also
GetTargetID
SetSubTargetID

◆ GetTargetID()

int32_t CYITimelineTrack::GetTargetID ( ) const

Returns the ID of the CYISceneNode which this track modifies.

See also
SetTargetID
CYISceneNode::GetID

◆ GetTargetName()

const CYIString& CYITimelineTrack::GetTargetName ( ) const

Returns the name of the CYISceneNode which this track modifies. This is set via the constructor of the CYITimelineTrack.

◆ GetTotalTime()

uint64_t CYITimelineTrack::GetTotalTime ( ) const

Returns the total time of this track. This is this combined duration of all keytimes associated with this track.

See also
CYITimelineKeyTime::GetDuration

◆ GetTrackID()

uint32_t CYITimelineTrack::GetTrackID ( ) const

Returns the ID of this track. This is set via the constructor of the CYITimelineTrack.

◆ ReadStream()

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.

◆ Reserve()

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.

◆ SetName()

void CYITimelineTrack::SetName ( const CYIString trackName)

Sets the name of this track to trackName.

See also
GetName

◆ SetNewAttributeType()

void CYITimelineTrack::SetNewAttributeType ( AttributeType  attributeType)

Sets the attributeType of this track.

See also
GetAttribute

◆ SetSubTargetID()

void CYITimelineTrack::SetSubTargetID ( int32_t  id)

Sets the ID of the component which this track modifies. This is generally used in conjunction with SetTargetID().

See also
GetSubTargetID

◆ SetTargetID()

void CYITimelineTrack::SetTargetID ( int32_t  id)

Sets the ID of the CYISceneNode which this track modifies.

See also
GetTargetID

The documentation for this class was generated from the following file: