Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Public Member Functions | List of all members
myers::CrossingAccumulator Class Reference

Public Member Functions

void recordCrossing (const Segment &s0, const Segment &s1)
 
std::vector< CrossingfinishAndReleaseCrossings ()
 

Detailed Description

Definition at line 418 of file Myers.cpp.

Member Function Documentation

◆ finishAndReleaseCrossings()

std::vector< Crossing > myers::CrossingAccumulator::finishAndReleaseCrossings ( )
inline

Definition at line 434 of file Myers.cpp.

434 {
435 return std::move(fCrossings);
436 }

◆ recordCrossing()

void myers::CrossingAccumulator::recordCrossing ( const Segment s0,
const Segment s1 
)
inline

Definition at line 420 of file Myers.cpp.

420 {
421 // Endpoints with no possible interior overlap.
422 if (s0.upper() == s1.lower() || s0.lower() == s1.upper()) {
423 return;
424 }
425
426 // Segments don't overlap if they are not collinear.
427 if ((s0.upper() == s1.upper() || s0.lower() == s1.lower()) && compare_slopes(s0, s1) != 0) {
428 return;
429 }
430
431 fCrossings.emplace_back(s0, s1);
432 }
int64_t compare_slopes(const Segment &s0, const Segment &s1)
Definition Myers.cpp:67

The documentation for this class was generated from the following file: