Options
All
  • Public
  • Public/Protected
  • All
Menu

Class with the needed methods to render a polytope.

Hierarchy

  • Render

Index

Properties

Static EQ

An "Event queue", which stores the vertices in lexicographic order. Used to determine the next point the sweepline should stop at.

Static Event

An event on the Event queue.

Static vertexDLL

vertexDLL: LinkedListNode<Point>[]

A doubly-linked-list that represents how the intersections of the polygon's edges are connected.

Methods

Static Private SLSort

  • The sweepline is sorted by the height of the edges' intersections with the sweepline. If these are equal, the lines are sorted by slope. If these are also equal, the lines are consistently ordered by their [[SweeplineEdge.id | IDs]].

    Parameters

    Returns number

Static Private divide

  • renderTo helper function. "Cuts" two edges at the intersection point, adds the new directed edges according to the simplification algorithm.

    Parameters

    Returns void

Static Private order

  • Orders two points lexicographically based on the coordinates on indices 0 and 1. Uses the IDs of the vertices to order them consistently if their coordinates are identical.

    Parameters

    Returns number

    A positive, zero or negative number depending on whether a > b, a = b or a < b.

Static to

  • Renders a polytope into a scene. Implements the Bentley-Ottmann algorithm as well as a simplification algorithm to triangulate general polygons.

    todo

    Guarantee that all edge cases work properly (zero length edges, collinear edges, concurrent edges, etc.)

    Parameters

    • P: PolytopeB

      The polytope to render.

    • scene: Scene

      The scene into which the polytope is rendered.

    Returns void

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