![]() |
Pangolin
Header-only C++20 plane computational geometry library
|
Exact equality of the point sets represented by arbitrary shapes. More...
#include "implementation/predicates.hpp"#include <algorithm>#include <compare>#include <concepts>#include <cstddef>#include <optional>#include <ranges>#include <type_traits>#include <utility>#include <variant>#include <vector>Go to the source code of this file.
Namespaces | |
| namespace | pgl |
Exact equality of the point sets represented by arbitrary shapes.
A.samePointSet(B) asks whether A and B cover the same points, so it agrees with A.contains(B) && B.contains(A) — but it is almost never worth computing that way. Every pair of shape kinds gets its own definition here, each written around three observations:
The one shared step is the empty set, in pgl::detail::samePointSetAny: an operand covering no point equals exactly the operands covering no point, whatever the two kinds are. Every definition below may assume both operands are non-empty.