HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
EfTimeInterval Class Reference

#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)
 
 EfTimeInterval (const std::initializer_list< double > &times, bool defaultTime=false)
 
void Clear ()
 
bool IsEmpty () const
 
const GfMultiIntervalGetTimeMultiInterval () const
 
bool IsDefaultTimeSet () const
 
bool Contains (const EfTime &time) const
 
bool Contains (const EfTimeInterval &rhs) const
 
bool IsFullInterval () const
 
bool operator== (const EfTimeInterval &rhs) const
 
bool operator!= (const EfTimeInterval &rhs) const
 
void operator|= (const EfTimeInterval &rhs)
 
void operator|= (const GfInterval &interval)
 
void operator|= (const EfTime &time)
 
void operator&= (const EfTimeInterval &rhs)
 
bool operator< (const EfTimeInterval &rhs) const
 Less-than operator. More...
 
EfTimeIntervalExtend (double leftFrames, double rightFrames)
 
EF_API std::string GetAsString () const
 Get time interval as string, for debugging. More...
 

Static Public Member Functions

static EfTimeInterval GetFullInterval ()
 

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::EfTimeInterval ( const GfMultiInterval timeMultiInterval = GfMultiInterval(),
bool  defaultTime = false 
)
inlineexplicit

Definition at line 39 of file timeInterval.h.

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

Definition at line 46 of file timeInterval.h.

EfTimeInterval::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::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

void EfTimeInterval::Clear ( )
inline

Clears the time interval to an empty interval.

Definition at line 77 of file timeInterval.h.

bool EfTimeInterval::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.

bool EfTimeInterval::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.

EfTimeInterval& 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.

EF_API std::string EfTimeInterval::GetAsString ( ) const

Get time interval as string, for debugging.

static EfTimeInterval EfTimeInterval::GetFullInterval ( )
inlinestatic

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

Definition at line 141 of file timeInterval.h.

const GfMultiInterval& EfTimeInterval::GetTimeMultiInterval ( ) const
inline

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

Definition at line 91 of file timeInterval.h.

bool EfTimeInterval::IsDefaultTimeSet ( ) const
inline

Returns true if the interval contains the default time.

Definition at line 97 of file timeInterval.h.

bool EfTimeInterval::IsEmpty ( ) const
inline

Returns true if the interval is empty.

Definition at line 84 of file timeInterval.h.

bool EfTimeInterval::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.

bool EfTimeInterval::operator!= ( const EfTimeInterval rhs) const
inline

Definition at line 150 of file timeInterval.h.

void EfTimeInterval::operator&= ( const EfTimeInterval rhs)
inline

Computes the intersection of this and the EfTimeInterval rhs.

Definition at line 180 of file timeInterval.h.

bool EfTimeInterval::operator< ( const EfTimeInterval rhs) const
inline

Less-than operator.

Definition at line 186 of file timeInterval.h.

bool EfTimeInterval::operator== ( const EfTimeInterval rhs) const
inline

Definition at line 145 of file timeInterval.h.

void EfTimeInterval::operator|= ( const EfTimeInterval rhs)
inline

Unions this time interval and the EfTimeInterval rhs.

Definition at line 156 of file timeInterval.h.

void EfTimeInterval::operator|= ( const GfInterval interval)
inline

Unions this time interval and the GfInterval interval.

Definition at line 163 of file timeInterval.h.

void EfTimeInterval::operator|= ( const EfTime time)
inline

Unions this time interval and the EfTime time.

Definition at line 169 of file timeInterval.h.


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