You.i Engine
CYIParallelTimelineGroup Class Reference

Detailed Description

This kind of timeline group will play its children in parallel, possibly with specified offsets (delays) from the beginning.

Child timelines can be added to this group in any order, order does not matter for execution.

Offsets from the beginning of the group or from the start of another child can be specified. The timeline will start after that time.

#include <animation/YiParallelTimelineGroup.h>

Inheritance diagram for CYIParallelTimelineGroup:

Public Member Functions

 CYIParallelTimelineGroup ()
 
virtual ~CYIParallelTimelineGroup ()
 
void AddTimelineWithRelativeOffset (CYIAbstractTimeline *pTimeline, const CYIAbstractTimeline *pRelativeTimeline, uint64_t millis)
 
void AddTimelineWithRelativePercentage (CYIAbstractTimeline *pTimeline, const CYIAbstractTimeline *pRelativeTimeline, float percentage)
 
void UpdateRelativeOffsetOfTimeline (const CYIAbstractTimeline *pTimeline, const CYIAbstractTimeline *pRelativeTimeline, uint64_t millis)
 
void UpdateRelativePercentageOfTimeline (const CYIAbstractTimeline *pTimeline, const CYIAbstractTimeline *pRelativeTimeline, float percentage)
 
- Public Member Functions inherited from CYITimelineGroup
virtual ~CYITimelineGroup ()
 
void AddTimeline (CYIAbstractTimeline *pTimeline)
 
void AddTimelineWithOffset (CYIAbstractTimeline *pTimeline, uint64_t millis)
 
size_t GetTimelineCount () const
 
std::vector< CYIAbstractTimeline * > GetTimelines () const
 
std::vector< std::pair< CYIAbstractTimeline *, uint64_t > > GetTimelinesWithOffsets (CYIAbstractTimeline::Direction direction=CYIAbstractTimeline::Direction::Forward) const
 
uint64_t GetTimelineOffset (CYIAbstractTimeline *pTimeline, CYIAbstractTimeline::Direction direction=CYIAbstractTimeline::Direction::Forward) const
 
void RemoveTimeline (CYIAbstractTimeline *pTimeline)
 
void RemoveAllTimelines ()
 
void RemoveTimelinesIf (const std::function< bool(CYIAbstractTimeline *)> &predicate)
 
void UpdateOffsetOfTimeline (const CYIAbstractTimeline *pTimeline, uint64_t millis)
 
- Public Member Functions inherited from CYIAbstractTimeline
virtual ~CYIAbstractTimeline ()
 
void Start ()
 
void Finish ()
 
void Pause ()
 
void Continue ()
 
void SetDirection (Direction direction)
 
Direction GetDirection () const
 
Status GetStatus () const
 
uint64_t GetStartTime () const
 
uint64_t GetCurrentTime () const
 
float GetTimeAsPercentage () const
 
uint64_t GetTotalTime () const
 
void SeekToPercentage (float percentage)
 
void SeekToTime (uint64_t millis)
 
void Abort ()
 
void SetDisablesInput (bool disablesInput)
 
void Track ()
 
void Untrack ()
 
void StartForward ()
 
void StartReverse ()
 
void ContinueForward ()
 
void ContinueReverse ()
 
void SetDirectionForward ()
 
void SetDirectionReverse ()
 
void SetFrameModes (FrameMode startFrameMode, FrameMode endFrameMode)
 
bool SetSourcePositions (CYISceneNode *pNode, const glm::vec3 &position)
 
bool ClearSourcePositions (CYISceneNode *pNode)
 
bool SetTargetPositions (CYISceneNode *pNode, const glm::vec3 &position)
 
bool ClearTargetPositions (CYISceneNode *pNode)
 
bool SetSourceScales (CYISceneNode *pNode, const glm::vec3 &scale)
 
bool ClearSourceScales (CYISceneNode *pNode)
 
void SetLooping (bool isLooping)
 
bool GetLooping () const
 
const std::shared_ptr< CYITimelineProxy > & GetProxy () const
 
void SetRootNode (CYISceneNode *pRootNode)
 
const std::shared_ptr< CYISceneNodeProxy > & GetRootNode () const
 
- Public Member Functions inherited from CYISignalHandler
 CYISignalHandler ()
 
 CYISignalHandler (const CYISignalHandler &rSignalHandler)
 
virtual ~CYISignalHandler ()
 
CYISignalHandleroperator= (const CYISignalHandler &rSignalHandler)
 
void MoveToThread (CYIThread *pThread)
 This function allows the user to override the default thread affinity to any CYIThread that may or may not be running. More...
 
CYIThreadHandle GetThreadAffinity () const
 
void SetThreadAffinity (const CYIThreadHandle &rThreadAffinity)
 
virtual bool IsConnected () const
 
virtual bool IsConnected (const CYISignalBase &rSignal) const
 
void Disconnect (CYISignalBase &rSignal)
 
void DisconnectFromAllSignals ()
 
- Public Member Functions inherited from CYIThread::Listener
 Listener ()
 
virtual ~Listener ()
 
virtual void OnThreadStarted (CYIThread *)
 
virtual void OnThreadTerminated (CYIThread *)
 
virtual void OnThreadFinished (CYIThread *)
 

Protected Member Functions

 CYIParallelTimelineGroup (std::unique_ptr< CYIParallelTimelineGroupPriv > pPriv)
 
- Protected Member Functions inherited from CYITimelineGroup
 CYITimelineGroup (std::unique_ptr< CYITimelineGroupPriv > pPriv)
 
- Protected Member Functions inherited from CYIAbstractTimeline
 CYIAbstractTimeline (std::unique_ptr< CYIAbstractTimelinePriv > pPriv)
 

Additional Inherited Members

- Public Types inherited from CYIAbstractTimeline
enum  FrameMode : uint8_t {
  FrameMode::Absolute,
  FrameMode::Relative
}
 
enum  Status : uint8_t {
  Status::Stopped,
  Status::Playing
}
 
enum  Direction : uint8_t {
  Direction::Forward,
  Direction::Reverse
}
 
- Public Attributes inherited from CYITimelineGroup
CYISignal< CYIAbstractTimeline * > ChildTimelineCompleted
 called whenever execution of one of the contained timelines completes normally More...
 
- Public Attributes inherited from CYIAbstractTimeline
CYISignal Playing
 called whenever the timeline starts playing (from any position) More...
 
CYISignal Paused
 called whenever the timeline stops playing, including if the timeline execution completes normally More...
 
CYISignal Aborted
 called when the timeline execution is aborted by the Abort() function More...
 
CYISignal Started
 called when playback of the timeline is initiated by one of the Start() functions More...
 
CYISignal Completed
 called when playback of the timeline completes normally (or when the Finish() function is called) More...
 
CYISignal TimelineLooped
 called whenever a loop completes and the next loop starts More...
 
CYISignal PlayingForward
 same as Playing, but triggered only when direction is forward More...
 
CYISignal PlayingReverse
 same as Playing, but triggered only when direction is reverse More...
 
CYISignal PausedForward
 same as Paused, but triggered only when direction is forward More...
 
CYISignal PausedReverse
 same as Paused, but triggered only when direction is reverse More...
 
CYISignal StartedForward
 same as Started, but triggered only when direction is forward More...
 
CYISignal StartedReverse
 same as Started, but triggered only when direction is reverse More...
 
CYISignal CompletedForward
 same as Completed, but triggered only when direction is forward More...
 
CYISignal CompletedReverse
 same as Completed, but triggered only when direction is reverse More...
 
- Protected Attributes inherited from CYIAbstractTimeline
std::unique_ptr< CYIAbstractTimelinePriv > m_pPriv
 

Constructor & Destructor Documentation

◆ CYIParallelTimelineGroup() [1/2]

CYIParallelTimelineGroup::CYIParallelTimelineGroup ( )

◆ ~CYIParallelTimelineGroup()

virtual CYIParallelTimelineGroup::~CYIParallelTimelineGroup ( )
virtual

◆ CYIParallelTimelineGroup() [2/2]

CYIParallelTimelineGroup::CYIParallelTimelineGroup ( std::unique_ptr< CYIParallelTimelineGroupPriv >  pPriv)
protected

Member Function Documentation

◆ AddTimelineWithRelativeOffset()

void CYIParallelTimelineGroup::AddTimelineWithRelativeOffset ( CYIAbstractTimeline pTimeline,
const CYIAbstractTimeline pRelativeTimeline,
uint64_t  millis 
)

Finds pRelativeTimeline in the group, and calculates the offset for pTimeline as offset of pRelativeTimeline + millis. The offset for pRelativeTimeline is left unchanged.

Adds pTimeline to this group with the offset being this absolute calculated value. If the offset for pRelativeTimeline later changes it will not affect the offset of pTimeline in this group.

If pRelativeTimeline is not found, pTimeline is not added to this group.

◆ AddTimelineWithRelativePercentage()

void CYIParallelTimelineGroup::AddTimelineWithRelativePercentage ( CYIAbstractTimeline pTimeline,
const CYIAbstractTimeline pRelativeTimeline,
float  percentage 
)

Adds pTimeline with an offset specified as the percentage of the total time of pRelativeTimeline. Calculates the number of milliseconds and behaves exactly like CYIParallelTimelineGroup::AddTimelineWithRelativeOffset

◆ UpdateRelativeOffsetOfTimeline()

void CYIParallelTimelineGroup::UpdateRelativeOffsetOfTimeline ( const CYIAbstractTimeline pTimeline,
const CYIAbstractTimeline pRelativeTimeline,
uint64_t  millis 
)

Finds pRelativeTimeline in the group, and calculates the offset for pTimeline as offset of pRelativeTimeline + millis. The offset for pRelativeTimeline is left unchaged.

Updates the offset of pTimeline to this absolute calculated value. If the offset for pRelativeTimeline later chages it will not affect the offset of pTimeline in this group.

If pRelativeTimeline or pTimeline is not found, the offset of pTimeline is not changed.

◆ UpdateRelativePercentageOfTimeline()

void CYIParallelTimelineGroup::UpdateRelativePercentageOfTimeline ( const CYIAbstractTimeline pTimeline,
const CYIAbstractTimeline pRelativeTimeline,
float  percentage 
)

Updates the offset of pTimeline to an offset specified as the percentage of the total time of pRelativeTimeline. Calculates the number of milliseconds and behaves exactly like CYIParallelTimelineGroup::UpdateRelativeOffsetOfTimeline


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