Files
oak-editor/app/common/timerange.h
T
itsmattkc 16ac2fc0e1 sweeping node graph changes for new rendering pipeline
The new rendering pipeline strives to simplify the nodes themselves as much
as possible and move much of the logic to an external rendering engine. This
change removes all of the responsibilities that no longer belong to the
nodes themselves and will soon be folded into the renderer.
2019-11-02 01:39:37 +11:00

35 lines
766 B
C++

#ifndef TIMERANGE_H
#define TIMERANGE_H
#include "rational.h"
class TimeRange {
public:
TimeRange();
TimeRange(const rational& in, const rational& out);
const rational& in() const;
const rational& out() const;
const rational& length() const;
void set_in(const rational& in);
void set_out(const rational& out);
void set_range(const rational& in, const rational& out);
bool operator<(const TimeRange &r) const;
bool operator<=(const TimeRange &r) const;
bool operator>(const TimeRange &r) const;
bool operator>=(const TimeRange &r) const;
bool operator==(const TimeRange &r) const;
bool operator!=(const TimeRange &r) const;
private:
void normalize();
rational in_;
rational out_;
rational length_;
};
#endif // TIMERANGE_H