34 class TimelineItem :
public std::enable_shared_from_this<TimelineItem>
91 virtual void update(
float relativeTime ) = 0;
128 mutable float mDuration, mInvDuration;
129 mutable bool mDirtyDuration;
bool isComplete()
Returns whether the item has completed.
Definition: TimelineItem.h:82
TimelineItemRef thisRef()
Definition: TimelineItem.h:104
virtual TimelineItemRef cloneReverse() const =0
Creates a cloned item which runs in reverse relative to a timeline of duration timelineDuration.
float loopTime(float absTime)
Converts time from absolute to absolute based on item's looping attributes.
Definition: TimelineItem.cpp:149
void setDurationDirty()
Definition: TimelineItem.h:107
virtual bool updateAtLoopStart()
Call update() only at the beginning of each loop (for example Cues exhibit require this behavior) ...
Definition: TimelineItem.h:94
void stepTo(float time, bool reverse)
go to a specific time, generally called by the parent Timeline only. If reverse then playhead is inte...
Definition: TimelineItem.cpp:50
void setLoop(bool doLoop=true)
Sets whether the item starts over when it is complete.
Definition: TimelineItem.h:57
virtual void reset(bool unsetStarted=false)
Marks the item as not completed, and if unsetStarted, marks the item as not started.
Definition: TimelineItem.h:77
GLenum target
Definition: GLee.h:13607
bool mLoop
Definition: TimelineItem.h:121
bool mAutoRemove
Definition: TimelineItem.h:123
TimelineItem(class Timeline *parent=0)
Definition: TimelineItem.cpp:31
void removeSelf()
Removes the item from its parent Timeline.
Definition: TimelineItem.cpp:45
virtual void loopStart()
Definition: TimelineItem.h:90
int32_t mLastLoopIteration
Definition: TimelineItem.h:124
virtual void complete(bool reverse)=0
bool hasStarted() const
Returns whether the item has started.
Definition: TimelineItem.h:80
void * getTarget() const
Returns the item's target pointer.
Definition: TimelineItem.h:42
virtual ~TimelineItem()
Definition: TimelineItem.h:39
float getDuration() const
Returns the item's duration.
Definition: TimelineItem.h:50
void setAutoRemove(bool autoRemove=true)
Sets whether the item will remove itself from the Timeline when it is complete.
Definition: TimelineItem.h:87
Base interface for anything that can go on a Timeline.
Definition: TimelineItem.h:34
virtual TimelineItemRef clone() const =0
Creates a clone of the item.
bool mMarkedForRemoval
Definition: TimelineItem.h:119
float getEndTime() const
Returns the time of the item's competion, equivalent to getStartTime() + getDuration().
Definition: TimelineItem.h:70
bool mComplete
Definition: TimelineItem.h:118
bool mUseAbsoluteTime
Definition: TimelineItem.h:122
bool getPingPong() const
Returns whether the item alternates between forward and reverse. Overrides loop when true...
Definition: TimelineItem.h:60
virtual void update(float relativeTime)=0
class Timeline * getParent() const
Returns a pointer to the item's parent Timeline.
Definition: TimelineItem.h:73
virtual float calcDuration() const
Definition: TimelineItem.h:95
void setStartTime(float newTime)
Set the items's start time to newTime.
Definition: TimelineItem.cpp:125
void * mTarget
Definition: TimelineItem.h:115
bool getAutoRemove() const
Should the item remove itself from the Timeline when it is complete.
Definition: TimelineItem.h:85
void updateDuration() const
Definition: TimelineItem.cpp:132
bool mHasReverseStarted
Definition: TimelineItem.h:117
std::shared_ptr< class TimelineItem > TimelineItemRef
Definition: TimelineItem.h:31
void setDuration(float newDuration)
Sets the item's duration to newDuration.
Definition: TimelineItem.cpp:141
void setPingPong(bool pingPong=true)
Sets whether the item alternates between forward and reverse. Overrides loop when true...
Definition: TimelineItem.h:62
void setTarget(void *target)
Definition: TimelineItem.h:111
void setInfinite(bool infinite=true)
Sets whether the item ever is marked as complete.
Definition: TimelineItem.h:67
bool getLoop() const
Returns whether the item starts over when it is complete.
Definition: TimelineItem.h:55
bool mHasStarted
Definition: TimelineItem.h:117
float mStartTime
Definition: TimelineItem.h:116
virtual void start(bool reverse)=0
bool mPingPong
Definition: TimelineItem.h:121
Definition: Timeline.h:42
bool mInfinite
Definition: TimelineItem.h:120
bool getInfinite() const
Returns whether the item ever is marked as complete.
Definition: TimelineItem.h:65
class Timeline * mParent
Definition: TimelineItem.h:113
float getStartTime() const
Returns the item's start time.
Definition: TimelineItem.h:45
bool mReverseComplete
Definition: TimelineItem.h:118