TracktionEngine
|
Represents the position of a clip on a timeline. More...
#include <tracktion_EditTime.h>
Public Member Functions | |
TimePosition | getStart () const |
Returns the start time. | |
TimePosition | getEnd () const |
Returns the end time. | |
TimeDuration | getLength () const |
Returns the length. | |
TimeDuration | getOffset () const |
Returns the offset. | |
TimePosition | getStartOfSource () const |
Returns what would be the the start of the source material in the timeline. | |
bool | operator== (const ClipPosition &other) const |
Compares two ClipPositions. | |
bool | operator!= (const ClipPosition &other) const |
Compares two ClipPositions. | |
ClipPosition | rescaled (TimePosition anchorTime, double factor) const |
Returns a ClipPosition scaled around an anchor point. | |
Public Attributes | |
TimeRange | time |
The TimeRange this ClipPosition occupies. | |
TimeDuration | offset = {} |
The offset this ClipPosition has. | |
Represents the position of a clip on a timeline.
TimePosition tracktion::engine::ClipPosition::getStart | ( | ) | const |
Returns the start time.
References time.
TimePosition tracktion::engine::ClipPosition::getEnd | ( | ) | const |
Returns the end time.
References time.
TimeDuration tracktion::engine::ClipPosition::getLength | ( | ) | const |
Returns the length.
References time.
TimeDuration tracktion::engine::ClipPosition::getOffset | ( | ) | const |
Returns the offset.
References offset.
TimePosition tracktion::engine::ClipPosition::getStartOfSource | ( | ) | const |
bool tracktion::engine::ClipPosition::operator== | ( | const ClipPosition & | other | ) | const |
bool tracktion::engine::ClipPosition::operator!= | ( | const ClipPosition & | other | ) | const |
Compares two ClipPositions.
References operator==().
ClipPosition tracktion::engine::ClipPosition::rescaled | ( | TimePosition | anchorTime, |
double | factor | ||
) | const |
Returns a ClipPosition scaled around an anchor point.
Useful for stretching a clip.
References offset, rescaled(), and time.
Referenced by rescaled().
TimeRange tracktion::engine::ClipPosition::time |
The TimeRange this ClipPosition occupies.
Referenced by tracktion::engine::TrackItem::getEditTimeRange(), getEnd(), getLength(), getStart(), getStartOfSource(), operator==(), and rescaled().
TimeDuration tracktion::engine::ClipPosition::offset = {} |
The offset this ClipPosition has.
Offset is a bit unintuitive as the position this relates to in the source material will depend on lots of factors including looping and any time-stretching. It can generally be thought of as an offset from either the start of the file or the loop start position, scaled by any time-stretching.
Referenced by getOffset(), getStartOfSource(), operator==(), and rescaled().