Skip to content

Commit

Permalink
Start (hopefully) final rewrite of corner connection logic
Browse files Browse the repository at this point in the history
  • Loading branch information
tzann committed Aug 20, 2024
1 parent 6b37b70 commit dc2606d
Show file tree
Hide file tree
Showing 3 changed files with 329 additions and 81 deletions.
21 changes: 21 additions & 0 deletions desktop_version/src/solver/Geometry.h
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,13 @@ namespace Geometry {
}
return true;
}
bool exactly_equals(const IntInterval& other) const {
if (is_bottom()) {
return other.is_bottom();
}

return min == other.min && max == other.max;
}

bool contains(int val) const;
bool contains(const IntInterval& other) const;
Expand Down Expand Up @@ -580,6 +587,13 @@ namespace Geometry {

return x.intersects(other.x) && y.intersects(other.y);
}
bool exactly_equals(const Region& other) const {
if (is_bottom()) {
return other.is_bottom();
}

return x.exactly_equals(other.x) && y.exactly_equals(other.y);
}

bool contains(const Region& other) const;
bool contains(const IntVector& val) const;
Expand Down Expand Up @@ -740,6 +754,13 @@ namespace Geometry {
}
return true;
}
bool exactly_equals(const FloatInterval& other) const {
if (is_bottom()) {
return other.is_bottom();
}

return min == other.min && max == other.max;
}

FloatInterval& join(const FloatInterval& other);
FloatInterval& intersect(const FloatInterval& other);
Expand Down
Loading

0 comments on commit dc2606d

Please sign in to comment.