Options
All
  • Public
  • Public/Protected
  • All
Menu

Quad-edge implementation after Guibas & Stolfi. Based on C++ versions by Paul Heckbert, Dani Lischinski et al:

References:

Type parameters

  • T

Hierarchy

  • Edge

Index

Constructors

constructor

Properties

id

id: number

onext

onext: Edge<T>

Next CCW edge from this edge's origin.

origin

origin: T

parent

parent: QuadEdge<T>

Accessors

dest

  • get dest(): T
  • Returns this edge's dest vertex. I.e. this.sym.origin

    Returns T

dnext

  • get dnext(): Edge<T>

dprev

  • get dprev(): Edge<T>

invrot

  • get invrot(): Edge<T>
  • Dual of this edge, left -> right. I.e same as this.rot.sym

    Returns Edge<T>

lnext

  • get lnext(): Edge<T>
  • Next CCW edge around the left face (dual vertex) from this edge's dest.

    Returns Edge<T>

lprev

  • get lprev(): Edge<T>
  • Next CCW edge around the left face (dual vertex) to this edge's origin.

    Returns Edge<T>

oprev

  • get oprev(): Edge<T>

rnext

  • get rnext(): Edge<T>
  • Next CCW edge around the right face (dual vertex) to this edge's dest.

    Returns Edge<T>

rot

rprev

  • get rprev(): Edge<T>
  • Next CCW edge around the right face (dual vertex) to this edge's origin.

    Returns Edge<T>

sym

  • Symmetric partner edge of this edge, from dest -> src. I.e. this === this.sym.sym

    Returns Edge<T>

Methods

connect

remove

  • remove(): void

setEnds

  • setEnds(o: T, d: T): void
  • Sets the origin & dest vertices of this edge (in other words, the origins of this edge and this.sym).

    Parameters

    • o: T

      -

    • d: T

      -

    Returns void

splice

  • Modifies the edge rings around the origins of this edge and e, as well as, independently, the edge rings of both edges' left dual vertex. In each case, if the rings are separate, this operator will join them and if both rings are the same ring, they will be split / separated. Therefore, splice` is it's own reverse operator and the only operator needed to edit quad edge topologies.

    Parameters

    Returns Edge<T>

swap

  • swap(): void

Static create

  • create<T>(src?: T, dest?: T): Edge<T>
  • Main edge / quadedge factory function. Use this in preference of direct invocation of the Edge constructor.

    Creates new QuadEdge with 4 child edges and returns the first child/primary edge. If src and dest are not nullish, the given args will be associated with that new edge as end points.

    Type parameters

    • T

    Parameters

    • Optional src: T

      -

    • Optional dest: T

      -

    Returns Edge<T>

Generated using TypeDoc