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

#include <TransformAnimationAsset.h>

Inheritance diagram for TransformAnimationAsset:
Asset Object

Public Member Functions

 DECLARE_ASSET (TransformAnimationAsset, Asset)
 
 TransformAnimationAsset ()
 
 ~TransformAnimationAsset ()
 
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
 
TransformKeyframe Sample (float time) const
 
size_t GetKeyframeCount () const
 
const TransformKeyframeGetKeyframe (size_t i) const
 
const std::vector< TransformKeyframe > & GetKeyframes () const
 
std::vector< TransformKeyframe > & GetKeyframesMutable ()
 
void SetKeyframes (const std::vector< TransformKeyframe > &keyframes)
 
void AddKeyframe (const TransformKeyframe &kf)
 
void RemoveKeyframe (size_t index)
 
void ClearKeyframes ()
 
float GetDuration () const
 
void SetDuration (float duration)
 
bool IsLooping () const
 
void SetLooping (bool loop)
 
float GetPlayRate () const
 
void SetPlayRate (float rate)
 
- 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)
 
void ResetLoadedFlag ()
 
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< TransformKeyframemKeyframes
 
float mDuration = 1.0f
 
bool mLoop = false
 
float mPlayRate = 1.0f
 
- 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

◆ TransformAnimationAsset()

TransformAnimationAsset::TransformAnimationAsset ( )

◆ ~TransformAnimationAsset()

TransformAnimationAsset::~TransformAnimationAsset ( )

Member Function Documentation

◆ AddKeyframe()

void TransformAnimationAsset::AddKeyframe ( const TransformKeyframe kf)

◆ ClearKeyframes()

void TransformAnimationAsset::ClearKeyframes ( )

◆ Create()

void TransformAnimationAsset::Create ( )
overridevirtual

Reimplemented from Asset.

◆ DECLARE_ASSET()

TransformAnimationAsset::DECLARE_ASSET ( TransformAnimationAsset  ,
Asset   
)

◆ Destroy()

void TransformAnimationAsset::Destroy ( )
overridevirtual

Reimplemented from Asset.

◆ GatherProperties()

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

Reimplemented from Asset.

◆ GetDuration()

float TransformAnimationAsset::GetDuration ( ) const
inline

◆ GetKeyframe()

const TransformKeyframe & TransformAnimationAsset::GetKeyframe ( size_t  i) const
inline

◆ GetKeyframeCount()

size_t TransformAnimationAsset::GetKeyframeCount ( ) const
inline

◆ GetKeyframes()

const std::vector< TransformKeyframe > & TransformAnimationAsset::GetKeyframes ( ) const
inline

◆ GetKeyframesMutable()

std::vector< TransformKeyframe > & TransformAnimationAsset::GetKeyframesMutable ( )
inline

◆ GetPlayRate()

float TransformAnimationAsset::GetPlayRate ( ) const
inline

◆ GetTypeColor()

glm::vec4 TransformAnimationAsset::GetTypeColor ( )
overridevirtual

Reimplemented from Asset.

◆ GetTypeName()

const char * TransformAnimationAsset::GetTypeName ( )
overridevirtual

Reimplemented from Asset.

◆ IsLooping()

bool TransformAnimationAsset::IsLooping ( ) const
inline

◆ LoadStream()

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

Reimplemented from Asset.

◆ RemoveKeyframe()

void TransformAnimationAsset::RemoveKeyframe ( size_t  index)

◆ Sample()

TransformKeyframe TransformAnimationAsset::Sample ( float  time) const

◆ SaveStream()

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

Reimplemented from Asset.

◆ SetDuration()

void TransformAnimationAsset::SetDuration ( float  duration)
inline

◆ SetKeyframes()

void TransformAnimationAsset::SetKeyframes ( const std::vector< TransformKeyframe > &  keyframes)

◆ SetLooping()

void TransformAnimationAsset::SetLooping ( bool  loop)
inline

◆ SetPlayRate()

void TransformAnimationAsset::SetPlayRate ( float  rate)
inline

Member Data Documentation

◆ mDuration

float TransformAnimationAsset::mDuration = 1.0f
protected

◆ mKeyframes

std::vector<TransformKeyframe> TransformAnimationAsset::mKeyframes
protected

◆ mLoop

bool TransformAnimationAsset::mLoop = false
protected

◆ mPlayRate

float TransformAnimationAsset::mPlayRate = 1.0f
protected

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