The base class for types of timeline groups.
This class provides a common interface for any timeline group. Basic operations including adding, removing, and updating offsets. Groups can be nested to create the desired effect.
Groups do NOT take ownership of their children. Children may be added to multiple groups without a problem. As expected, if the same properties of a CYISceneNode are modified simultaneously the modifiers will compete. This is true whether the modifiers are the same timeline or different timelines.
This class cannot be instantiated.
#include <animation/YiTimelineGroup.h>
Public Member Functions | |
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) |
![]() | |
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 |
const std::shared_ptr< CYISceneNodeProxy > & | GetRootNode () const |
const CYIString & | GetMarkerName () const |
uint64_t | GetUniqueID () const |
![]() | |
CYISignalHandler () | |
CYISignalHandler (const CYISignalHandler &signalHandler) | |
virtual | ~CYISignalHandler () |
CYISignalHandler & | operator= (const CYISignalHandler &signalHandler) |
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 &threadAffinity) |
virtual bool | IsConnected () const |
virtual bool | IsConnected (const CYISignalBase &signal) const |
void | Disconnect (CYISignalBase &signal) |
void | DisconnectFromAllSignals () |
![]() | |
Listener () | |
virtual | ~Listener () |
virtual void | OnThreadStarted (CYIThread *) |
virtual void | OnThreadTerminated (CYIThread *) |
virtual void | OnThreadFinished (CYIThread *) |
Public Attributes | |
CYISignal< CYIAbstractTimeline * > | ChildTimelineCompleted |
called whenever execution of one of the contained timelines completes normally More... | |
![]() | |
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 Member Functions | |
CYITimelineGroup (std::unique_ptr< CYITimelineGroupPriv > pPriv) | |
![]() | |
CYIAbstractTimeline (std::unique_ptr< CYIAbstractTimelinePriv > pPriv) | |
void | SetRootNode (CYISceneNode *pRootNode) |
Additional Inherited Members | |
![]() | |
enum | FrameMode : uint8_t { FrameMode::Absolute, FrameMode::Relative } |
enum | Status : uint8_t { Status::Stopped, Status::Playing } |
enum | Direction : uint8_t { Direction::Forward, Direction::Reverse } |
![]() | |
std::unique_ptr< CYIAbstractTimelinePriv > | m_pPriv |
|
virtual |
|
protected |
void CYITimelineGroup::AddTimeline | ( | CYIAbstractTimeline * | pTimeline | ) |
Adds pTimeline to the group in the default way. For CYISerialTimelineGroup, this has the same effect as calling CYISerialTimelineGroup::AddTimelineToEnd. For CYIParallelTimelineGroup, this adds pTimeline with no offset.
void CYITimelineGroup::AddTimelineWithOffset | ( | CYIAbstractTimeline * | pTimeline, |
uint64_t | millis | ||
) |
Adds pTimeline to the group with an offset in the default way. For CYISerialTimelineGroup, this has the same effect as calling CYISerialTimelineGroup::AddTimelineToEndWithOffset. For CYIParallelTimelineGroup, this adds a timeline with an offset of millis.
size_t CYITimelineGroup::GetTimelineCount | ( | ) | const |
Returns the number of immediate children.
uint64_t CYITimelineGroup::GetTimelineOffset | ( | CYIAbstractTimeline * | pTimeline, |
CYIAbstractTimeline::Direction | direction = CYIAbstractTimeline::Direction::Forward |
||
) | const |
Returns the offset of child timeline pTimeline. If pTimeline is not a child of this timeline group, 0 is returned. Specify direction as CYIAbstractTimeline::Direction::Reverse to obtain the offset from the end this offset is used when the group is playing in reverse.
std::vector<CYIAbstractTimeline *> CYITimelineGroup::GetTimelines | ( | ) | const |
Returns the immediate children of this timeline group.
std::vector<std::pair<CYIAbstractTimeline *, uint64_t> > CYITimelineGroup::GetTimelinesWithOffsets | ( | CYIAbstractTimeline::Direction | direction = CYIAbstractTimeline::Direction::Forward | ) | const |
Returns the immediate children of this timeline group, along with the offsets for each timeline.
void CYITimelineGroup::RemoveAllTimelines | ( | ) |
void CYITimelineGroup::RemoveTimeline | ( | CYIAbstractTimeline * | pTimeline | ) |
Finds pTimeline among the children of this group and removes it.
void CYITimelineGroup::RemoveTimelinesIf | ( | const std::function< bool(CYIAbstractTimeline *)> & | predicate | ) |
Removes from this group all timelines for which predicate returns true.
void CYITimelineGroup::UpdateOffsetOfTimeline | ( | const CYIAbstractTimeline * | pTimeline, |
uint64_t | millis | ||
) |
Finds pTimeline among the children of this group and changes the offset of pTimeline to millis. If pTimeline is not found, there is no effect.
CYISignal<CYIAbstractTimeline *> CYITimelineGroup::ChildTimelineCompleted |
called whenever execution of one of the contained timelines completes normally