Cinder  0.8.6
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
cinder::Cue Class Reference

#include <Timeline.h>

Inheritance diagram for cinder::Cue:
[legend]

Public Member Functions

 Cue (const std::function< void()> &fn, float atTime=0)
 
CueRef create (const std::function< void()> &fn, float atTime=0)
 
void setFn (const std::function< void()> &fn)
 
std::function< void()> getFn () const
 
voidgetTarget () const
 Returns the item's target pointer. More...
 
float getStartTime () const
 Returns the item's start time. More...
 
void setStartTime (float newTime)
 Set the items's start time to newTime. More...
 
float getDuration () const
 Returns the item's duration. More...
 
void setDuration (float newDuration)
 Sets the item's duration to newDuration. More...
 
bool getLoop () const
 Returns whether the item starts over when it is complete. More...
 
void setLoop (bool doLoop=true)
 Sets whether the item starts over when it is complete. More...
 
bool getPingPong () const
 Returns whether the item alternates between forward and reverse. Overrides loop when true. More...
 
void setPingPong (bool pingPong=true)
 Sets whether the item alternates between forward and reverse. Overrides loop when true. More...
 
bool getInfinite () const
 Returns whether the item ever is marked as complete. More...
 
void setInfinite (bool infinite=true)
 Sets whether the item ever is marked as complete. More...
 
float getEndTime () const
 Returns the time of the item's competion, equivalent to getStartTime() + getDuration(). More...
 
class TimelinegetParent () const
 Returns a pointer to the item's parent Timeline. More...
 
void removeSelf ()
 Removes the item from its parent Timeline. More...
 
virtual void reset (bool unsetStarted=false)
 Marks the item as not completed, and if unsetStarted, marks the item as not started. More...
 
bool hasStarted () const
 Returns whether the item has started. More...
 
bool isComplete ()
 Returns whether the item has completed. More...
 
bool getAutoRemove () const
 Should the item remove itself from the Timeline when it is complete. More...
 
void setAutoRemove (bool autoRemove=true)
 Sets whether the item will remove itself from the Timeline when it is complete. More...
 
virtual float calcDuration () const
 
void stepTo (float time, bool reverse)
 go to a specific time, generally called by the parent Timeline only. If reverse then playhead is interpreted as retreating rather than advancing. More...
 
TimelineItemRef thisRef ()
 

Protected Member Functions

virtual void reverse ()
 
virtual TimelineItemRef cloneReverse () const
 Creates a cloned item which runs in reverse relative to a timeline of duration timelineDuration. More...
 
virtual TimelineItemRef clone () const
 Creates a clone of the item. More...
 
virtual void start (bool reverse)
 
virtual void loopStart ()
 
virtual void update (float relativeTime)
 
virtual void complete (bool reverse)
 
virtual bool updateAtLoopStart ()
 Call update() only at the beginning of each loop (for example Cues exhibit require this behavior) More...
 
void setDurationDirty ()
 
void updateDuration () const
 
float loopTime (float absTime)
 Converts time from absolute to absolute based on item's looping attributes. More...
 
void setTarget (void *target)
 

Protected Attributes

std::function< void()> mFunction
 
class TimelinemParent
 
voidmTarget
 
float mStartTime
 
bool mHasStarted
 
bool mHasReverseStarted
 
bool mComplete
 
bool mReverseComplete
 
bool mMarkedForRemoval
 
bool mInfinite
 
bool mLoop
 
bool mPingPong
 
bool mUseAbsoluteTime
 
bool mAutoRemove
 
int32_t mLastLoopIteration
 

Constructor & Destructor Documentation

cinder::Cue::Cue ( const std::function< void()> &  fn,
float  atTime = 0 
)

Member Function Documentation

CueRef cinder::Cue::create ( const std::function< void()> &  fn,
float  atTime = 0 
)
void cinder::Cue::setFn ( const std::function< void()> &  fn)
std::function<void ()> cinder::Cue::getFn ( ) const
virtual void cinder::Cue::reverse ( )
protectedvirtual

Implements cinder::TimelineItem.

TimelineItemRef cinder::Cue::cloneReverse ( ) const
protectedvirtual

Creates a cloned item which runs in reverse relative to a timeline of duration timelineDuration.

Implements cinder::TimelineItem.

TimelineItemRef cinder::Cue::clone ( ) const
protectedvirtual

Creates a clone of the item.

Implements cinder::TimelineItem.

virtual void cinder::Cue::start ( bool  reverse)
protectedvirtual

Implements cinder::TimelineItem.

void cinder::Cue::loopStart ( )
protectedvirtual

Reimplemented from cinder::TimelineItem.

virtual void cinder::Cue::update ( float  relativeTime)
protectedvirtual

Implements cinder::TimelineItem.

virtual void cinder::Cue::complete ( bool  reverse)
protectedvirtual

Implements cinder::TimelineItem.

virtual bool cinder::Cue::updateAtLoopStart ( )
protectedvirtual

Call update() only at the beginning of each loop (for example Cues exhibit require this behavior)

Reimplemented from cinder::TimelineItem.

void* cinder::TimelineItem::getTarget ( ) const
inherited

Returns the item's target pointer.

float cinder::TimelineItem::getStartTime ( ) const
inherited

Returns the item's start time.

void cinder::TimelineItem::setStartTime ( float  newTime)
inherited

Set the items's start time to newTime.

float cinder::TimelineItem::getDuration ( ) const
inherited

Returns the item's duration.

void cinder::TimelineItem::setDuration ( float  newDuration)
inherited

Sets the item's duration to newDuration.

bool cinder::TimelineItem::getLoop ( ) const
inherited

Returns whether the item starts over when it is complete.

void cinder::TimelineItem::setLoop ( bool  doLoop = true)
inherited

Sets whether the item starts over when it is complete.

bool cinder::TimelineItem::getPingPong ( ) const
inherited

Returns whether the item alternates between forward and reverse. Overrides loop when true.

void cinder::TimelineItem::setPingPong ( bool  pingPong = true)
inherited

Sets whether the item alternates between forward and reverse. Overrides loop when true.

bool cinder::TimelineItem::getInfinite ( ) const
inherited

Returns whether the item ever is marked as complete.

void cinder::TimelineItem::setInfinite ( bool  infinite = true)
inherited

Sets whether the item ever is marked as complete.

float cinder::TimelineItem::getEndTime ( ) const
inherited

Returns the time of the item's competion, equivalent to getStartTime() + getDuration().

class Timeline* cinder::TimelineItem::getParent ( ) const
inherited

Returns a pointer to the item's parent Timeline.

void cinder::TimelineItem::removeSelf ( )
inherited

Removes the item from its parent Timeline.

virtual void cinder::TimelineItem::reset ( bool  unsetStarted = false)
virtualinherited

Marks the item as not completed, and if unsetStarted, marks the item as not started.

Reimplemented in cinder::Timeline, and cinder::TweenBase.

bool cinder::TimelineItem::hasStarted ( ) const
inherited

Returns whether the item has started.

bool cinder::TimelineItem::isComplete ( )
inherited

Returns whether the item has completed.

bool cinder::TimelineItem::getAutoRemove ( ) const
inherited

Should the item remove itself from the Timeline when it is complete.

void cinder::TimelineItem::setAutoRemove ( bool  autoRemove = true)
inherited

Sets whether the item will remove itself from the Timeline when it is complete.

virtual float cinder::TimelineItem::calcDuration ( ) const
virtualinherited

Reimplemented in cinder::Timeline.

void cinder::TimelineItem::stepTo ( float  time,
bool  reverse 
)
inherited

go to a specific time, generally called by the parent Timeline only. If reverse then playhead is interpreted as retreating rather than advancing.

TimelineItemRef cinder::TimelineItem::thisRef ( )
inherited
void cinder::TimelineItem::setDurationDirty ( )
protectedinherited
void cinder::TimelineItem::updateDuration ( ) const
protectedinherited
float cinder::TimelineItem::loopTime ( float  absTime)
protectedinherited

Converts time from absolute to absolute based on item's looping attributes.

void cinder::TimelineItem::setTarget ( void target)
protectedinherited

Member Data Documentation

std::function<void ()> cinder::Cue::mFunction
protected
class Timeline* cinder::TimelineItem::mParent
protectedinherited
void* cinder::TimelineItem::mTarget
protectedinherited
float cinder::TimelineItem::mStartTime
protectedinherited
bool cinder::TimelineItem::mHasStarted
protectedinherited
bool cinder::TimelineItem::mHasReverseStarted
protectedinherited
bool cinder::TimelineItem::mComplete
protectedinherited
bool cinder::TimelineItem::mReverseComplete
protectedinherited
bool cinder::TimelineItem::mMarkedForRemoval
protectedinherited
bool cinder::TimelineItem::mInfinite
protectedinherited
bool cinder::TimelineItem::mLoop
protectedinherited
bool cinder::TimelineItem::mPingPong
protectedinherited
bool cinder::TimelineItem::mUseAbsoluteTime
protectedinherited
bool cinder::TimelineItem::mAutoRemove
protectedinherited
int32_t cinder::TimelineItem::mLastLoopIteration
protectedinherited

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