Pangolin
Header-only C++20 plane computational geometry library
Loading...
Searching...
No Matches
intersections.hpp File Reference

Segment intersection and crossing algorithms. More...

#include "algorithm/graph.hpp"
#include <array>
#include <cassert>
#include <functional>
#include <map>
#include <queue>
#include <set>
#include <type_traits>
#include <unordered_set>
#include <utility>

Go to the source code of this file.

Namespaces

namespace  pgl

Functions

template<class Rational = pgl::Rational<pgl::BigInt>, class Container>
auto pgl::findIntersections (const Container &segments)
 Finds all intersecting segment pairs with Bentley-Ottmann.
template<class Rational = pgl::Rational<pgl::BigInt>, class Container>
auto pgl::findCrossings (const Container &segments)
 Finds all proper crossing segment pairs with Bentley-Ottmann.
template<class Rational = pgl::Rational<pgl::BigInt>, class Container>
bool pgl::detectIntersections (const Container &segments)
 Detects whether any two segments intersect.
template<class Rational = pgl::Rational<pgl::BigInt>, class Container>
bool pgl::detectCrossings (const Container &segments)
 Detects whether any two segments properly cross.
template<class Rational = pgl::Rational<pgl::BigInt>, class Container>
auto pgl::bruteForceCrossings (const Container &segments)
 Finds all crossing segment pairs by brute force.
template<class Rational = pgl::Rational<pgl::BigInt>, class Container>
auto pgl::bruteForceIntersections (const Container &segments)
 Finds all intersecting segment pairs by brute force.

Detailed Description

Segment intersection and crossing algorithms.

This header contains the Bentley-Ottmann sweep-line machinery together with the public helpers that expose it through the Pangolin API.