new PriorityQHeap()
A priority queue of vertices, ordered by libtess.geom.vertLeq, implemented
with a binary heap. Used only within libtess.PriorityQ for prioritizing
vertices created by intersections (see libtess.sweep.checkForIntersect_).
- Source:
Methods
extractMin() → {libtess.GluVertex}
Removes the minimum vertex from the heap and returns it. If the heap is
empty, null will be returned.
- Source:
Returns:
- Type
- libtess.GluVertex
init()
Initializing ordering of the heap. Must be called before any method other
than insert is called to ensure correctness when removing or querying.
- Source:
insert(vert) → {libtess.PQHandle}
Insert a new vertex into the heap.
Parameters:
Name | Type | Description |
---|---|---|
vert |
libtess.GluVertex | The vertex to insert. |
- Source:
Returns:
A handle that can be used to remove the vertex.
- Type
- libtess.PQHandle
isEmpty() → {boolean}
- Source:
Returns:
Whether the heap is empty.
- Type
- boolean
minimum() → {libtess.GluVertex}
Returns the minimum vertex in the heap. If the heap is empty, null will be
returned.
- Source:
Returns:
- Type
- libtess.GluVertex
remove(removeHandle)
Remove vertex with handle removeHandle from heap.
Parameters:
Name | Type | Description |
---|---|---|
removeHandle |
libtess.PQHandle |
- Source: