You.i Engine
CYITimelineBackingStore Class Reference

Detailed Description

A class containing timeline marker and track data required to create a CYITimeline.

The timeline backing store maintains all data required to create a CYITimeline. You.i Engine builds a timeline backing store for each CYIAssetViewTemplate when loading the template asset. This process of building the timeline backing store for each CYIAssetViewTemplate at load time allows a user of You.i Engine to access CYITimelines through CYISceneView APIs.

See also
CYISceneView::GetTimeline
CYISceneView::GetViewTemplate
CYIAEViewTemplate::GetTimelineSource
CYIAssetTimelineSource::GetTimelineBackingStore
CYITimelineTrack
CYIMarkerData

#include <animation/YiTimelineBackingStore.h>

Inheritance diagram for CYITimelineBackingStore:

Public Member Functions

 CYITimelineBackingStore ()
 
virtual ~CYITimelineBackingStore ()
 
void ReserveTracks (size_t tracksCount)
 
CYITimelineTrackAddTrack (uint32_t trackID, CYITimelineTrack::AttributeType attribute, const CYIString &targetName)
 
void ReserveMarkers (size_t markersCount)
 
void AddMarker (CYIString name, uint32_t startTime, uint32_t duration, std::vector< CYITimelineTrack::TrackIdentifier > tracksSelection, std::map< CYIString, CYIString > markerProperties)
 
void AddMarker (CYIMarkerData::ID markerID, uint32_t startTime, uint32_t duration, std::vector< CYITimelineTrack::TrackIdentifier > tracksSelection, std::map< CYIString, CYIString > markerProperties)
 
std::unique_ptr< CYITimelineCreateTimeline (CYISceneNode *pRootNode=nullptr)
 
std::unique_ptr< CYITimelineCreateTimeline (CYIStringView markerName, CYISceneNode *pRootNode=nullptr)
 
std::unique_ptr< CYITimelineCreateTimeline (CYIMarkerData::ID markerID, CYISceneNode *pRootNode=nullptr)
 
std::unique_ptr< CYITimelineCreateTimelineFromMarkerIndex (size_t markerIndex, CYISceneNode *pRootNode=nullptr)
 
std::unique_ptr< CYITimelineCreateTimeline (uint32_t startTime, uint32_t duration, CYISceneNode *pRootNode=nullptr)
 
void Finalize ()
 
virtual uint32_t GetTotalTime () const
 
const CYITimelineTrackGetTrack (size_t trackID) const
 
const CYITimelineTrackGetTrack (CYITimelineTrack::AttributeType attribute, CYIStringView name) const
 
size_t GetTrackCount () const
 
size_t GetMarkerCount () const
 
const CYIMarkerDataGetMarkerData (CYIStringView markerName) const
 
const CYIStringGetMarkerNameFromMarkerIndex (size_t markerIndex) const
 
size_t GetApproximateSize () const
 

Friends

class CYITimelineBackingStorePriv
 

Constructor & Destructor Documentation

◆ CYITimelineBackingStore()

CYITimelineBackingStore::CYITimelineBackingStore ( )

◆ ~CYITimelineBackingStore()

virtual CYITimelineBackingStore::~CYITimelineBackingStore ( )
virtual

Member Function Documentation

◆ AddMarker() [1/2]

void CYITimelineBackingStore::AddMarker ( CYIString  name,
uint32_t  startTime,
uint32_t  duration,
std::vector< CYITimelineTrack::TrackIdentifier tracksSelection,
std::map< CYIString, CYIString markerProperties 
)

Adds a marker to the backing store given the name of the marker, the startTime of the marker in milliseconds and a duration of the marker in milliseconds. Only the tracks specified by the rTrackSelection list will be used when creating the CYITimeline for this marker, if no tracks are specified all tracks in the backing store will be included.

See also
CYIMarkerData

◆ AddMarker() [2/2]

void CYITimelineBackingStore::AddMarker ( CYIMarkerData::ID  markerID,
uint32_t  startTime,
uint32_t  duration,
std::vector< CYITimelineTrack::TrackIdentifier tracksSelection,
std::map< CYIString, CYIString markerProperties 
)

◆ AddTrack()

CYITimelineTrack* CYITimelineBackingStore::AddTrack ( uint32_t  trackID,
CYITimelineTrack::AttributeType  attribute,
const CYIString targetName 
)

Creates a CYITimelineTrack and adds the track to the backing store.

Returns a new CYITimelineTrack constructed with the provided parameters, this CYITimelineTrack is owned by the backing store. Returns nullptr if the track with trackID already exists in the backing store.

◆ CreateTimeline() [1/4]

std::unique_ptr<CYITimeline> CYITimelineBackingStore::CreateTimeline ( CYISceneNode pRootNode = nullptr)

Returns a new timeline, the timeline will be constructed to span the full length of the backing store. pRootNode should be specified if there is a node associated with the timeline at the time of creation.

See also
CYITimeline::SetRootNode

◆ CreateTimeline() [2/4]

std::unique_ptr<CYITimeline> CYITimelineBackingStore::CreateTimeline ( CYIStringView  markerName,
CYISceneNode pRootNode = nullptr 
)

Returns a new timeline given a markerName, the timeline will be constructed only for the provided marker. pRootNode should be specified if there is a node associated with the timeline at the time of creation. Returns nullptr if the marker is not found in the backing store.

See also
CYITimeline::SetRootNode

◆ CreateTimeline() [3/4]

std::unique_ptr<CYITimeline> CYITimelineBackingStore::CreateTimeline ( CYIMarkerData::ID  markerID,
CYISceneNode pRootNode = nullptr 
)

Returns a new timeline given an markerID, the timeline will be constructed only for the provided marker. pRootNode should be specified if there is a node associated with the timeline at the time of creation. Returns nullptr if the marker is not found in the backing store.

See also
CYITimeline::SetRootNode

◆ CreateTimeline() [4/4]

std::unique_ptr<CYITimeline> CYITimelineBackingStore::CreateTimeline ( uint32_t  startTime,
uint32_t  duration,
CYISceneNode pRootNode = nullptr 
)

Returns a new timeline starting at startTime and running for duration of the backing store. startTime and duration should be provided in milliseconds. pRootNode should be specified if there is a node associated with the timeline at the time of creation.

Warning
When exporting timelines from After Effects, keyframes that fall outside of markers may be omitted by the exporter. If this function is used to create a timeline that falls outside of existing markers, it is recommended to create a 'fake' marker in After Effects that spans the desired range. This ensures that the required keyframes are present in the exported data.
See also
CYITimeline::SetRootNode

◆ CreateTimelineFromMarkerIndex()

std::unique_ptr<CYITimeline> CYITimelineBackingStore::CreateTimelineFromMarkerIndex ( size_t  markerIndex,
CYISceneNode pRootNode = nullptr 
)

Returns a new timeline given a markerIndex, the timeline will be constructed only for the provided marker. pRootNode should be specified if there is a node associated with the timeline at the time of creation. Returns nullptr if the index is greater than the number of markers in the backing store.

Note
- markerIndex is zero based.

◆ Finalize()

void CYITimelineBackingStore::Finalize ( )

Must be called after adding tracks to the backing store to configure the tracks and update backing store totals.

See also
GetTotalTime

◆ GetApproximateSize()

size_t CYITimelineBackingStore::GetApproximateSize ( ) const

Returns the approximate size of the backing store, in bytes. This approximation includes all markers and tracks in the backing store as well as class signature sizes.

◆ GetMarkerCount()

size_t CYITimelineBackingStore::GetMarkerCount ( ) const

Returns the total number of markers in the backing store.

◆ GetMarkerData()

const CYIMarkerData* CYITimelineBackingStore::GetMarkerData ( CYIStringView  markerName) const

Returns the CYIMarkerData for the marker in the backing store with rMarkerName. Returns nullptr if the marker is not found in the backing store.

Warning
The returned pointer is invalidated upon subsequent calls to AddMarker().

◆ GetMarkerNameFromMarkerIndex()

const CYIString& CYITimelineBackingStore::GetMarkerNameFromMarkerIndex ( size_t  markerIndex) const

Returns the name of a marker in the backing store given the marker's markerIndex. Return an empty string if the markerIndex is greater than the number of markers in the backing store.

◆ GetTotalTime()

virtual uint32_t CYITimelineBackingStore::GetTotalTime ( ) const
virtual

Returns the total time of the backing store. This is equivalent to the longest track in the backing store.

◆ GetTrack() [1/2]

const CYITimelineTrack* CYITimelineBackingStore::GetTrack ( size_t  trackID) const

Returns a track from the backing store given the track's trackID. Returns nullptr if the track is not found in the backing store.

◆ GetTrack() [2/2]

const CYITimelineTrack* CYITimelineBackingStore::GetTrack ( CYITimelineTrack::AttributeType  attribute,
CYIStringView  name 
) const

Returns a track from the backing store given the track's attribute and name. Returns nullptr if the track is not found in the backing store.

◆ GetTrackCount()

size_t CYITimelineBackingStore::GetTrackCount ( ) const

Returns the total number of tracks in the backing store.

◆ ReserveMarkers()

void CYITimelineBackingStore::ReserveMarkers ( size_t  markersCount)

Reserves enough room in the backing store to store at least markersCount markers without reallocating. Calling this function is optional but doing so can improve the performance of AddMarker.

◆ ReserveTracks()

void CYITimelineBackingStore::ReserveTracks ( size_t  tracksCount)

Reserves enough room in the backing store to store at least tracksCount tracks without reallocating. Calling this function is optional but doing so can improve the performance of AddTrack.

Friends And Related Function Documentation

◆ CYITimelineBackingStorePriv

friend class CYITimelineBackingStorePriv
friend

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