Options
All
  • Public
  • Public/Protected
  • All
Menu

Helper class for Render.to, used in the sweepline for Bentley-Ottmann. This format is useful because an edge on the sweepline can only be cut to the right. That way, we don't need to modify the SL objects after the division process: only the nodes' connections change.

Hierarchy

  • SweeplineEdge

Index

Constructors

constructor

Properties

Private ID

ID: number

A unique, immutable ID associated to the sweepline edge.

leftVertex

leftVertex: LinkedListNode<Point>

The leftmost vertex of the sweepline edge.

rightVertexIndex

rightVertexIndex: 0 | 1

The index of the leftVertex's node corresponding to the rightmost vertex of the sweepline edge. Equals 0 when this node is node0, and equals 1 when this node is node1.

slope

slope: number

The slope of the sweepline edge. Doesn't change even when the edge is cut down to zero length.

Static redirectTable

redirectTable: number[] = []

An edge's ID must be immutable, even if the vertices themselves change, so that sorting can occur consistently. At the same time, it needs to be uniquely identified from the vertices, so searches can be made. To be able to do both things simultaneously, we use a "redirect table". If the leftmost vertex of an edge changes, we "redirect" the new calculated ID to the old one.

The redirect table is filled out as necesary by the updateRedirectTable method.

Methods

directedEdge

getId

  • getId(): number

rightVertex

toString

  • toString(): string

updateRedirectTable

  • updateRedirectTable(): void

Generated using TypeDoc, the 1/31/2021 at 6:18:55 AM