public class QuadEdge extends Object
Each edge object is part of a quartet of 4 edges,
linked via their rot references.
Any edge in the group may be accessed using a series of rot() operations.
Quadedges in a subdivision are linked together via their next references.
The linkage between the quadedge quartets determines the topology
of the subdivision.
The edge class does not contain separate information for vertice or faces; a vertex is implicitly defined as a ring of edges (created using the next field).
| Modifier and Type | Method and Description |
|---|---|
static QuadEdge |
connect(QuadEdge a,
QuadEdge b)
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.
|
void |
delete()
Marks this quadedge as being deleted.
|
Vertex |
dest()
Gets the vertex for the edge's destination
|
QuadEdge |
dNext()
Gets the next CCW edge around (into) the destination of this edge.
|
QuadEdge |
dPrev()
Gets the next CW edge around (into) the destination of this edge.
|
boolean |
equalsNonOriented(QuadEdge qe)
Tests if this quadedge and another have the same line segment geometry,
regardless of orientation.
|
boolean |
equalsOriented(QuadEdge qe)
Tests if this quadedge and another have the same line segment geometry
with the same orientation.
|
Object |
getData()
Gets the external data value for this edge.
|
double |
getLength()
Gets the length of the geometry of this quadedge.
|
QuadEdge |
getPrimary()
Gets the primary edge of this quadedge and its sym.
|
QuadEdge |
invRot()
Gets the dual of this edge, directed from its left to its right.
|
boolean |
isLive()
Tests whether this edge has been deleted.
|
QuadEdge |
lNext()
Gets the CCW edge around the left face following this edge.
|
QuadEdge |
lPrev()
Gets the CCW edge around the left face before this edge.
|
static QuadEdge |
makeEdge(Vertex o,
Vertex d)
|
QuadEdge |
oNext()
Gets the next CCW edge around the origin of this edge.
|
QuadEdge |
oPrev()
Gets the next CW edge around (from) the origin of this edge.
|
Vertex |
orig()
Gets the vertex for the edge's origin
|
QuadEdge |
rNext()
Gets the edge around the right face ccw following this edge.
|
QuadEdge |
rot()
Gets the dual of this edge, directed from its right to its left.
|
QuadEdge |
rPrev()
Gets the edge around the right face ccw before this edge.
|
void |
setData(Object data)
Sets the external data value for this edge.
|
void |
setNext(QuadEdge next)
Sets the connected edge
|
static void |
splice(QuadEdge a,
QuadEdge b)
Splices two edges together or apart.
|
static void |
swap(QuadEdge e)
Turns an edge counterclockwise inside its enclosing quadrilateral.
|
QuadEdge |
sym()
Gets the edge from the destination to the origin of this edge.
|
LineSegment |
toLineSegment()
Creates a
LineSegmentDouble representing the
geometry of this edge. |
String |
toString()
Converts this edge to a WKT two-point LINESTRING indicating
the geometry of this edge.
|
public static QuadEdge connect(QuadEdge a, QuadEdge b)
public static QuadEdge makeEdge(Vertex o, Vertex d)
o - the origin Vertexd - the destination Vertexpublic static void splice(QuadEdge a, QuadEdge b)
a - an edge to spliceb - an edge to splicepublic static void swap(QuadEdge e)
e - the quadedge to turnpublic void delete()
public final Vertex dest()
public final QuadEdge dNext()
public final QuadEdge dPrev()
public boolean equalsNonOriented(QuadEdge qe)
qe - a quadegepublic boolean equalsOriented(QuadEdge qe)
qe - a quadegepublic Object getData()
public double getLength()
public QuadEdge getPrimary()
Coordinates orderingpublic final QuadEdge invRot()
public boolean isLive()
public final QuadEdge lNext()
public final QuadEdge lPrev()
public final QuadEdge oNext()
public final QuadEdge oPrev()
public final Vertex orig()
public final QuadEdge rNext()
public final QuadEdge rot()
public final QuadEdge rPrev()
public void setData(Object data)
data - an object containing external datapublic void setNext(QuadEdge next)
next - edgepublic final QuadEdge sym()
public LineSegment toLineSegment()
LineSegmentDouble representing the
geometry of this edge.Copyright © 2015 Revolution Systems Inc.. All rights reserved.