#include #include "aetentry.h" AETEntry::AETEntry(const Edge& e) { ymax = e.upper.y; assert(e.lower.y != e.upper.y); rSlope = (float)(e.lower.x - e.upper.x)/(float)(e.lower.y - e.upper.y); xcurr = e.lower.x + 0.5*rSlope; return; } bool AETEntry::Equal(const AETEntry& e) const { return xcurr == e.xcurr; } bool AETEntry::LessThan(const AETEntry& e) const { return xcurr < e.xcurr; } bool operator==(const AETEntry& e1, const AETEntry& e2) { return e1.Equal(e2); } bool operator!=(const AETEntry& e1, const AETEntry& e2) { return !e1.Equal(e2); } bool operator<(const AETEntry& e1, const AETEntry& e2) { return e1.LessThan(e2); } bool operator>(const AETEntry& e1, const AETEntry& e2) { return e2.LessThan(e1); } bool operator<=(const AETEntry& e1, const AETEntry& e2) { return !e2.LessThan(e1); } bool operator>=(const AETEntry& e1, const AETEntry& e2) { return !e1.LessThan(e2); }