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.
This commit is contained in:
itsmattkc
2019-11-02 01:39:37 +11:00
parent c14125e640
commit 16ac2fc0e1
35 changed files with 397 additions and 347 deletions
+38
View File
@@ -21,6 +21,11 @@ const rational &TimeRange::out() const
return out_;
}
const rational &TimeRange::length() const
{
return length_;
}
void TimeRange::set_in(const rational &in)
{
in_ = in;
@@ -40,6 +45,36 @@ void TimeRange::set_range(const rational &in, const rational &out)
normalize();
}
bool TimeRange::operator<(const TimeRange &r) const
{
return length() < r.length();
}
bool TimeRange::operator<=(const TimeRange &r) const
{
return length() <= r.length();
}
bool TimeRange::operator>(const TimeRange &r) const
{
return length() > r.length();
}
bool TimeRange::operator>=(const TimeRange &r) const
{
return length() >= r.length();
}
bool TimeRange::operator==(const TimeRange &r) const
{
return length() == r.length();
}
bool TimeRange::operator!=(const TimeRange &r) const
{
return length() != r.length();
}
void TimeRange::normalize()
{
// If `out` is earlier than `in`, swap them
@@ -48,4 +83,7 @@ void TimeRange::normalize()
in_ = out_;
out_ = temp;
}
// Calculate length
length_ = out_ - in_;
}