TracktionEngine
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
engine::ClipPosition Struct Reference

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.
 

Detailed Description

Represents the position of a clip on a timeline.

Member Function Documentation

◆ getStart()

TimePosition engine::ClipPosition::getStart ( ) const

Returns the start time.

References time.

◆ getEnd()

TimePosition engine::ClipPosition::getEnd ( ) const

Returns the end time.

References time.

◆ getLength()

TimeDuration engine::ClipPosition::getLength ( ) const

Returns the length.

References time.

◆ getOffset()

TimeDuration engine::ClipPosition::getOffset ( ) const

Returns the offset.

References offset.

◆ getStartOfSource()

TimePosition engine::ClipPosition::getStartOfSource ( ) const

Returns what would be the the start of the source material in the timeline.

References offset, and time.

◆ operator==()

bool engine::ClipPosition::operator== ( const ClipPosition other) const

Compares two ClipPositions.

References offset, and time.

Referenced by operator!=().

◆ operator!=()

bool engine::ClipPosition::operator!= ( const ClipPosition other) const

Compares two ClipPositions.

References operator==().

◆ rescaled()

ClipPosition 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().

Member Data Documentation

◆ time

TimeRange engine::ClipPosition::time

The TimeRange this ClipPosition occupies.

Referenced by getEnd(), getLength(), getStart(), getStartOfSource(), operator==(), and rescaled().

◆ offset

TimeDuration 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().


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