Flutter Engine
The Flutter Engine
Public Member Functions | List of all members
myers::SweepLine Class Reference

Public Member Functions

 SweepLine ()
 
void handleEvent (Event e)
 
std::vector< CrossingfinishAndReleaseCrossings ()
 

Detailed Description

Definition at line 442 of file Myers.cpp.

Constructor & Destructor Documentation

◆ SweepLine()

myers::SweepLine::SweepLine ( )
inline

Definition at line 447 of file Myers.cpp.

447 {
448 fStatus.push_back(kLeftStatusSentinel);
449 fStatus.push_back(kRightStatusSentinel);
450 }

Member Function Documentation

◆ finishAndReleaseCrossings()

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

Definition at line 463 of file Myers.cpp.

463 {
464 // Only the sentinels should be left.
465 SkASSERT(this->statusEmpty());
466 return fCrossings.finishAndReleaseCrossings();
467 }
#define SkASSERT(cond)
Definition: SkAssert.h:116
std::vector< Crossing > finishAndReleaseCrossings()
Definition: Myers.cpp:434

◆ handleEvent()

void myers::SweepLine::handleEvent ( Event  e)
inline

Definition at line 452 of file Myers.cpp.

452 {
453 auto& [y, beginnings, horizontals, endings] = e;
454
455 // Things could be out of order from last event.
456 this->sortAndRecord(y);
457
458 this->handleBeginnings(y, beginnings);
459 this->handleHorizontals(y, horizontals);
460 this->handleEndings(endings);
461 }
double y

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