Polyphase Game Engine
Loading...
Searching...
No Matches
Timeline Class Reference

#include <Timeline.h>

Inheritance diagram for Timeline:
Asset Object

Public Member Functions

 DECLARE_ASSET (Timeline, Asset)
 
 Timeline ()
 
 ~Timeline ()
 
virtual void LoadStream (Stream &stream, Platform platform) override
 
virtual void SaveStream (Stream &stream, Platform platform) override
 
virtual void Create () override
 
virtual void Destroy () override
 
virtual void GatherProperties (std::vector< Property > &outProps) override
 
virtual glm::vec4 GetTypeColor () override
 
virtual const char * GetTypeName () override
 
uint32_t GetNumTracks () const
 
TimelineTrackGetTrack (uint32_t index) const
 
const std::vector< TimelineTrack * > & GetTracks () const
 
TimelineTrackAddTrack (TypeId trackType)
 
void RemoveTrack (uint32_t index)
 
void MoveTrack (uint32_t from, uint32_t to)
 
void InsertTrack (TimelineTrack *track, uint32_t index)
 
float GetDuration () const
 
void SetDuration (float duration)
 
float GetPlayRate () const
 
void SetPlayRate (float rate)
 
bool IsLooping () const
 
void SetLooping (bool loop)
 
bool IsAutoPlay () const
 
void SetAutoPlay (bool autoPlay)
 
- Public Member Functions inherited from Asset
 DECLARE_FACTORY_MANAGER (Asset)
 
 DECLARE_FACTORY (Asset, Asset)
 
 DECLARE_OBJECT (Asset, Object)
 
 Asset ()
 
virtual ~Asset ()
 
virtual void Copy (Asset *srcAsset)
 
const std::string & GetName () const
 
bool IsLoaded () const
 
bool IsRefCounted () const
 
int32_t GetRefCount () const
 
bool IsEmbedded () const
 
void SetEmbedded (bool embed)
 
bool IsEngineAsset () const
 
void SetEngineAsset (bool engineAsset)
 
void SetName (const std::string &name)
 
void IncrementRefCount ()
 
void DecrementRefCount ()
 
void LoadFile (const char *path, AsyncLoadRequest *request=nullptr)
 
void LoadEmbedded (const EmbeddedFile *embeddedAsset, AsyncLoadRequest *request=nullptr)
 
void SaveFile (const char *path, Platform platform)
 
virtual bool Import (const std::string &path, ImportOptions *options=nullptr)
 
virtual const char * GetTypeImportExt ()
 
virtual bool ShouldSnapshotForPie () const
 
bool IsTransient () const
 
void SetTransient (bool transient)
 
uint64_t GetUuid () const
 
void SetUuid (uint64_t uuid)
 
void EnsureUuid ()
 
void WriteHeader (Stream &stream)
 
- Public Member Functions inherited from Object
virtual ~Object ()=default
 
virtual const char * RuntimeName () const =0
 
virtual const char * RuntimeParentName () const =0
 
virtual RuntimeId InstanceRuntimeId () const =0
 
virtual ObjectQueryInterface (RuntimeId id) const
 
virtual bool Is (RuntimeId id) const
 
virtual bool Is (const char *name) const
 
virtual bool DrawCustomProperty (Property &prop)
 
template<typename T >
T * As () const
 
virtual bool Equals (const Object *rhs) const
 

Protected Attributes

std::vector< TimelineTrack * > mTracks
 
float mDuration = 5.0f
 
float mPlayRate = 1.0f
 
bool mLoop = false
 
bool mAutoPlay = false
 
- Protected Attributes inherited from Asset
uint32_t mVersion = 0
 
TypeId mType = INVALID_TYPE_ID
 
uint64_t mUuid = 0
 
bool mEmbedded = false
 
bool mLoaded = false
 
bool mEnableRefCount = true
 
bool mEngineAsset = false
 
bool mTransient = false
 
std::string mName = "Asset"
 
int32_t mRefCount = 0
 

Additional Inherited Members

- Static Public Member Functions inherited from Asset
static AssetHeader ReadHeader (Stream &stream)
 
static std::string GetNameFromPath (const std::string &path)
 
static std::string GetDirectoryFromPath (const std::string &path)
 
static const char * GetNameFromTypeId (TypeId id)
 
static TypeId GetTypeIdFromName (const char *name)
 
- Static Public Member Functions inherited from Object
static const char * ClassRuntimeName ()
 

Constructor & Destructor Documentation

◆ Timeline()

Timeline::Timeline ( )

◆ ~Timeline()

Timeline::~Timeline ( )

Member Function Documentation

◆ AddTrack()

TimelineTrack * Timeline::AddTrack ( TypeId  trackType)

◆ Create()

void Timeline::Create ( )
overridevirtual

Reimplemented from Asset.

◆ DECLARE_ASSET()

Timeline::DECLARE_ASSET ( Timeline  ,
Asset   
)

◆ Destroy()

void Timeline::Destroy ( )
overridevirtual

Reimplemented from Asset.

◆ GatherProperties()

void Timeline::GatherProperties ( std::vector< Property > &  outProps)
overridevirtual

Reimplemented from Asset.

◆ GetDuration()

float Timeline::GetDuration ( ) const
inline

◆ GetNumTracks()

uint32_t Timeline::GetNumTracks ( ) const
inline

◆ GetPlayRate()

float Timeline::GetPlayRate ( ) const
inline

◆ GetTrack()

TimelineTrack * Timeline::GetTrack ( uint32_t  index) const

◆ GetTracks()

const std::vector< TimelineTrack * > & Timeline::GetTracks ( ) const
inline

◆ GetTypeColor()

glm::vec4 Timeline::GetTypeColor ( )
overridevirtual

Reimplemented from Asset.

◆ GetTypeName()

const char * Timeline::GetTypeName ( )
overridevirtual

Reimplemented from Asset.

◆ InsertTrack()

void Timeline::InsertTrack ( TimelineTrack track,
uint32_t  index 
)

◆ IsAutoPlay()

bool Timeline::IsAutoPlay ( ) const
inline

◆ IsLooping()

bool Timeline::IsLooping ( ) const
inline

◆ LoadStream()

void Timeline::LoadStream ( Stream stream,
Platform  platform 
)
overridevirtual

Reimplemented from Asset.

◆ MoveTrack()

void Timeline::MoveTrack ( uint32_t  from,
uint32_t  to 
)

◆ RemoveTrack()

void Timeline::RemoveTrack ( uint32_t  index)

◆ SaveStream()

void Timeline::SaveStream ( Stream stream,
Platform  platform 
)
overridevirtual

Reimplemented from Asset.

◆ SetAutoPlay()

void Timeline::SetAutoPlay ( bool  autoPlay)
inline

◆ SetDuration()

void Timeline::SetDuration ( float  duration)
inline

◆ SetLooping()

void Timeline::SetLooping ( bool  loop)
inline

◆ SetPlayRate()

void Timeline::SetPlayRate ( float  rate)
inline

Member Data Documentation

◆ mAutoPlay

bool Timeline::mAutoPlay = false
protected

◆ mDuration

float Timeline::mDuration = 5.0f
protected

◆ mLoop

bool Timeline::mLoop = false
protected

◆ mPlayRate

float Timeline::mPlayRate = 1.0f
protected

◆ mTracks

std::vector<TimelineTrack*> Timeline::mTracks
protected

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