Class: QuadEdge

jsts.triangulate.quadedge.QuadEdge

new QuadEdge()

Quadedges must be made using makeEdge, to ensure proper construction.
Source:

Methods

(static) connect(a, b) → {jsts.triangulate.quadedge.QuadEdge}

Creates a new QuadEdge connecting the destination of a to the origin of b, in such a way that all three have the same left face after the connection is complete. Additionally, the data pointers of the new edge are set.
Parameters:
Name Type Description
a jsts.triangulate.quadedge.QuadEdge the first edge to connect.
b jsts.triangulate.quadedge.QuadEdge the second edge to connect.
Source:
Returns:
the connected edge.
Type
jsts.triangulate.quadedge.QuadEdge

(static) makeEdge(o, d)

Creates a new QuadEdge quartet from Vertex o to Vertex d.
Parameters:
Name Type Description
o jsts.triangulate.quadedge.Vertex the origin Vertex.
d jsts.triangulate.quadedge.Vertex the destination Vertex.
Source:
Returns:
the new QuadEdge quartet.

(static) splice(a, b)

Splices two edges together or apart. Splice affects the two edge rings around the origins of a and b, and, independently, the two edge rings around the left faces of a and b. In each case, (i) if the two rings are distinct, Splice will combine them into one, or (ii) if the two are the same ring, Splice will break it into two separate pieces. Thus, Splice can be used both to attach the two edges together, and to break them apart.
Parameters:
Name Type Description
a jsts.triangulate.quadedge.QuadEdge an edge to splice.
b jsts.triangulate.quadedge.QuadEdge an edge to splice.
Source:

(static) swap(e)

Turns an edge counterclockwise inside its enclosing quadrilateral.
Parameters:
Name Type Description
e jsts.triangulate.quadedge.QuadEdge the quadedge to turn.
Source:

delete_jsts()

Marks this quadedge as being deleted. This does not free the memory used by this quadedge quartet, but indicates that this edge no longer participates in a subdivision.
Source:

dest() → {jsts.triangulate.quadedge.Vertex}

Gets the vertex for the edge's destination
Source:
Returns:
the destination vertex.
Type
jsts.triangulate.quadedge.Vertex

dNext() → {jsts.triangulate.quadedge.QuadEdge}

Gets the next CCW edge around (into) the destination of this edge.
Source:
Returns:
the next destination edge.
Type
jsts.triangulate.quadedge.QuadEdge

dPrev() → {jsts.triangulate.quadedge.QuadEdge}

Gets the next CW edge around (into) the destination of this edge.
Source:
Returns:
the previous destination edge.
Type
jsts.triangulate.quadedge.QuadEdge

equalsNonOriented(qe) → {boolean}

Tests if this quadedge and another have the same line segment geometry, regardless of orientation.
Parameters:
Name Type Description
qe jsts.triangulate.quadedge.QuadEdge a quadege.
Source:
Returns:
true if the quadedges are based on the same line segment regardless of orientation.
Type
boolean

equalsOriented(qe) → {boolean}

Tests if this quadedge and another have the same line segment geometry with the same orientation.
Parameters:
Name Type Description
qe jsts.triangulate.quadedge.QuadEdge a quadege.
Source:
Returns:
true if the quadedges are based on the same line segment.
Type
boolean

getData() → {Object}

Gets the external data value for this edge.
Source:
Returns:
the data object.
Type
Object

getLength() → {number}

Gets the length of the geometry of this quadedge.
Source:
Returns:
the length of the quadedge.
Type
number

getPrimary()

Gets the primary edge of this quadedge and its sym. The primary edge is the one for which the origin and destination coordinates are ordered according to the standard Coordinate ordering
Source:
Returns:
the primary quadedge.

invRot() → {jsts.triangulate.quadedge.QuadEdge}

Gets the dual of this edge, directed from its left to its right.
Source:
Returns:
the inverse rotated edge.
Type
jsts.triangulate.quadedge.QuadEdge

isLive() → {boolean}

Tests whether this edge has been deleted.
Source:
Returns:
true if this edge has not been deleted.
Type
boolean

lNext() → {jsts.triangulate.quadedge.QuadEdge}

Gets the CCW edge around the left face following this edge.
Source:
Returns:
the next left face edge.
Type
jsts.triangulate.quadedge.QuadEdge

lPrev() → {jsts.triangulate.quadedge.QuadEdge}

Gets the CCW edge around the left face before this edge.
Source:
Returns:
the previous left face edge.
Type
jsts.triangulate.quadedge.QuadEdge

oNext() → {jsts.triangulate.quadedge.QuadEdge}

Gets the next CCW edge around the origin of this edge.
Source:
Returns:
the next linked edge.
Type
jsts.triangulate.quadedge.QuadEdge

oPrev() → {jsts.triangulate.quadedge.QuadEdge}

Gets the next CW edge around (from) the origin of this edge.
Source:
Returns:
the previous edge.
Type
jsts.triangulate.quadedge.QuadEdge

orig() → {jsts.triangulate.quadedge.Vertex}

Gets the vertex for the edge's origin
Source:
Returns:
the origin vertex.
Type
jsts.triangulate.quadedge.Vertex

rNext() → {jsts.triangulate.quadedge.QuadEdge}

Gets the edge around the right face ccw following this edge.
Source:
Returns:
the next right face edge.
Type
jsts.triangulate.quadedge.QuadEdge

rPrev() → {jsts.triangulate.quadedge.QuadEdge}

Gets the edge around the right face ccw before this edge.
Source:
Returns:
the previous right face edge.
Type
jsts.triangulate.quadedge.QuadEdge

setData(data)

Sets the external data value for this edge.
Parameters:
Name Type Description
data Object an object containing external data.
Source:

setDest(d)

Sets the vertex for this edge's destination
Parameters:
Name Type Description
d jsts.triangulate.quadedge.Vertex the destination vertex.
Source:

setNext(next)

Sets the connected edge
Parameters:
Name Type Description
next jsts.triangulate.quadedge.QuadEdge next-edge.
Source:

setOrig(o)

Sets the vertex for this edge's origin
Parameters:
Name Type Description
o jsts.triangulate.quadedge.Vertex the origin vertex.
Source:

sym() → {jsts.triangulate.quadedge.QuadEdge}

Gets the edge from the destination to the origin of this edge.
Source:
Returns:
the sym of the edge.
Type
jsts.triangulate.quadedge.QuadEdge

toLineSegment() → {jsts.geom.LineSegment}

Creates a LineSegment representing the geometry of this edge.
Source:
Returns:
a LineSegment.
Type
jsts.geom.LineSegment

toString() → {String}

Converts this edge to a WKT two-point LINESTRING indicating the geometry of this edge.
Source:
Returns:
a String representing this edge's geometry.
Type
String