Construct a PolygonVertex by providing {x, y} coordinates and vertex options.
The x-coordinate of the vertex
The y-coordinate of the vertex
Optional
options: PolygonVertexOptions = {}Options which modify vertex context or behavior
Internal
_angleThe angle of the ray from the origin to this vertex.
Internal
_d2The squared distance from a polygon origin to this vertex.
Internal
_distanceThe distance from a polygon origin to this vertex.
Internal
_indexThe integer index of this vertex in an ordered sweep.
Internal
_intersectionThe line intersection coordinates of the two edges that create this vertex.
Internal
_visitedRecord whether this PolygonVertex has been visited in the sweep
The subset of edges which continue counter-clockwise from this vertex.
The set of vertices collinear to this vertex
The subset of edges which continue clockwise from this vertex.
The set of edges which connect to this vertex. This set is initially empty and populated later after vertices are de-duplicated.
Does this vertex have non-limited edges or 2+ limited edges counterclockwise?
Does this vertex have non-limited edges or 2+ limited edges clockwise?
Is this vertex an endpoint of one or more edges?
Does this vertex result from an internal collision?
Does this vertex have a single counterclockwise limiting edge?
Does this vertex have a single clockwise limiting edge?
The maximum restriction imposed by this vertex.
Associate an edge with this vertex.
The edge being attached
The orientation of the edge with respect to the origin
The restriction type of polygon being created
Is this vertex the same point as some other vertex?
Some other vertex
Are they the same point?
Static
fromConstruct a PolygonVertex instance from some other Point structure.
The point
Optional
options: PolygonVertexOptionsAdditional options that apply to this vertex
The constructed vertex
Static
getDetermine the sort key to use for this vertex, arranging points from north-west to south-east.
The x-coordinate
The y-coordinate
The key used to identify the vertex
A specialized point data structure used to represent vertices in the context of the ClockwiseSweepPolygon. This class is not designed or intended for use outside of that context.