bool Time::operator<(const Time & other) const { if(type() != other.type()) { // a robust way would not do that, but ok in normal cases return floatTime() < other.floatTime(); } else { switch (type()) { case ExactFrame: case JustBeforeFrame: case JustAfterFrame: return frame() < other.frame(); case FloatTime: return floatTime() < other.floatTime(); default: return false; } } }
void KeyEdge::draw3DSmall() { if(temporalStar().size() == 0) return; int lineWidth = 3; glColor4d(0,0,0,1); glLineWidth(lineWidth); glPushMatrix(); glTranslated(0, 0, floatTime()); geometry()->draw(); glPopMatrix(); glLineWidth(1); }
bool Time::operator==(const Time & other) const { if(type() != other.type()) return false; else { switch (type()) { case ExactFrame: case JustBeforeFrame: case JustAfterFrame: return frame() == other.frame(); case FloatTime: return floatTime() == other.floatTime(); default: return true; } } }
void Time::save(QTextStream & out) { switch (type()) { case ExactFrame: out << "ExactFrame " << frame(); return; case JustBeforeFrame: out << "JustBeforeFrame " << frame(); return; case JustAfterFrame: out << "JustAfterFrame " << frame(); return; case FloatTime: out << "FloatTime " << floatTime(); return; default: return; } }