Loading...
Searching...
No Matches
EfTimeInterval Class Reference

A class that represents an interval in EfTime. More...

#include <timeInterval.h>

Public Member Functions

 EfTimeInterval (const GfMultiInterval &timeMultiInterval=GfMultiInterval(), bool defaultTime=false)
 
 EfTimeInterval (const GfInterval &timeInterval, bool defaultTime=false)
 
 EfTimeInterval (const std::vector< double > &times, bool defaultTime=false)
 For convenience, constructs a multiInterval from the discrete times.
 
 EfTimeInterval (const std::initializer_list< double > &times, bool defaultTime=false)
 For convenience, constructs a multiInterval from the discrete times.
 
void Clear ()
 Clears the time interval to an empty interval.
 
bool IsEmpty () const
 Returns true if the interval is empty.
 
const GfMultiIntervalGetTimeMultiInterval () const
 Returns the multi interval that represents intervals on the frame timeline.
 
bool IsDefaultTimeSet () const
 Returns true if the interval contains the default time.
 
bool Contains (const EfTime &time) const
 Returns true if this time interval contains time, with special treatment for the default time and for left- and right-side time values.
 
bool Contains (const EfTimeInterval &rhs) const
 Returns true if this time interval fully contains the time interval rhs.
 
bool IsFullInterval () const
 Returns true if the time interval is the full interval.
 
bool operator== (const EfTimeInterval &rhs) const
 
bool operator!= (const EfTimeInterval &rhs) const
 
void operator|= (const EfTimeInterval &rhs)
 Unions this time interval and the EfTimeInterval rhs.
 
void operator|= (const GfInterval &interval)
 Unions this time interval and the GfInterval interval.
 
void operator|= (const EfTime &time)
 Unions this time interval and the EfTime time.
 
void operator&= (const EfTimeInterval &rhs)
 Computes the intersection of this and the EfTimeInterval rhs.
 
bool operator< (const EfTimeInterval &rhs) const
 Less-than operator.
 
EfTimeIntervalExtend (double leftFrames, double rightFrames)
 Extends the interval by the specified number of frames in each direction.
 
EF_API std::string GetAsString () const
 Get time interval as string, for debugging.
 

Static Public Member Functions

static EfTimeInterval GetFullInterval ()
 Returns the full time interval: (-inf, inf) with the default time.
 

Detailed Description

A class that represents an interval in EfTime.

This class holds a GfMultiInterval that represents intervals on the frame timeline and a bool that represents a single point, not on the timeline, for the "default" time.

Definition at line 35 of file timeInterval.h.

Constructor & Destructor Documentation

◆ EfTimeInterval() [1/4]

EfTimeInterval ( const GfMultiInterval timeMultiInterval = GfMultiInterval(),
bool  defaultTime = false 
)
inlineexplicit

Definition at line 39 of file timeInterval.h.

◆ EfTimeInterval() [2/4]

EfTimeInterval ( const GfInterval timeInterval,
bool  defaultTime = false 
)
inlineexplicit

Definition at line 46 of file timeInterval.h.

◆ EfTimeInterval() [3/4]

EfTimeInterval ( const std::vector< double > &  times,
bool  defaultTime = false 
)
inlineexplicit

For convenience, constructs a multiInterval from the discrete times.

Definition at line 55 of file timeInterval.h.

◆ EfTimeInterval() [4/4]

EfTimeInterval ( const std::initializer_list< double > &  times,
bool  defaultTime = false 
)
inlineexplicit

For convenience, constructs a multiInterval from the discrete times.

Definition at line 66 of file timeInterval.h.

Member Function Documentation

◆ Clear()

void Clear ( )
inline

Clears the time interval to an empty interval.

Definition at line 77 of file timeInterval.h.

◆ Contains() [1/2]

bool Contains ( const EfTime time) const
inline

Returns true if this time interval contains time, with special treatment for the default time and for left- and right-side time values.

The default time is treated as a separate time outside of the frame timeline.

See EfTime::IsContainedIn() for details on how side is handled.

Definition at line 110 of file timeInterval.h.

◆ Contains() [2/2]

bool Contains ( const EfTimeInterval rhs) const
inline

Returns true if this time interval fully contains the time interval rhs.

The default time is treated as a separate time outside of the frame timeline.

Definition at line 122 of file timeInterval.h.

◆ Extend()

EfTimeInterval & Extend ( double  leftFrames,
double  rightFrames 
)
inline

Extends the interval by the specified number of frames in each direction.

E.g., extends (-100, 100) to (-110, 105) when leftFrames = 10 and rightFrames = 5; or the multi interval (-100, 100), (200, 300) becomes (-110, 105), (190, 305).

Definition at line 202 of file timeInterval.h.

◆ GetAsString()

EF_API std::string GetAsString ( ) const

Get time interval as string, for debugging.

◆ GetFullInterval()

static EfTimeInterval GetFullInterval ( )
inlinestatic

Returns the full time interval: (-inf, inf) with the default time.

Definition at line 141 of file timeInterval.h.

◆ GetTimeMultiInterval()

const GfMultiInterval & GetTimeMultiInterval ( ) const
inline

Returns the multi interval that represents intervals on the frame timeline.

Definition at line 91 of file timeInterval.h.

◆ IsDefaultTimeSet()

bool IsDefaultTimeSet ( ) const
inline

Returns true if the interval contains the default time.

Definition at line 97 of file timeInterval.h.

◆ IsEmpty()

bool IsEmpty ( ) const
inline

Returns true if the interval is empty.

Definition at line 84 of file timeInterval.h.

◆ IsFullInterval()

bool IsFullInterval ( ) const
inline

Returns true if the time interval is the full interval.

I.e., this returns true if the time interval contains the full frame timeline and the default time.

Definition at line 134 of file timeInterval.h.

◆ operator!=()

bool operator!= ( const EfTimeInterval rhs) const
inline

Definition at line 150 of file timeInterval.h.

◆ operator&=()

void operator&= ( const EfTimeInterval rhs)
inline

Computes the intersection of this and the EfTimeInterval rhs.

Definition at line 180 of file timeInterval.h.

◆ operator<()

bool operator< ( const EfTimeInterval rhs) const
inline

Less-than operator.

Definition at line 186 of file timeInterval.h.

◆ operator==()

bool operator== ( const EfTimeInterval rhs) const
inline

Definition at line 145 of file timeInterval.h.

◆ operator|=() [1/3]

void operator|= ( const EfTime time)
inline

Unions this time interval and the EfTime time.

Definition at line 169 of file timeInterval.h.

◆ operator|=() [2/3]

void operator|= ( const EfTimeInterval rhs)
inline

Unions this time interval and the EfTimeInterval rhs.

Definition at line 156 of file timeInterval.h.

◆ operator|=() [3/3]

void operator|= ( const GfInterval interval)
inline

Unions this time interval and the GfInterval interval.

Definition at line 163 of file timeInterval.h.


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