Pangolin
Header-only C++20 plane computational geometry library
Loading...
Searching...
No Matches
pgl::SweepContact Struct Reference

Both boundariesCross and boundariesMeet, from one sweep. More...

#include <redbluesweep.hpp>

Public Attributes

bool crossed
bool met

Detailed Description

Both boundariesCross and boundariesMeet, from one sweep.

A caller that needs both bits — such as Polygon::interiorsIntersect, which returns early on a crossing and takes a different shortcut when the boundaries miss entirely — would otherwise pay for two sweeps, one per wrapper. Bundling them costs one. Destructure the result with a structured binding (const auto [crossed, met] = boundaryContactBits(...)) so the call site need not name this type either, for the same reason it must not name BoundaryContact.

Member Data Documentation

◆ crossed

bool pgl::SweepContact::crossed

◆ met

bool pgl::SweepContact::met