(points, edges, edgeBounds, vertBounds)
| 8945 | |
| 8946 | // Find all pairs of crossing vertices in a pslg (given edge/vert bounds) |
| 8947 | function getTJunctions (points, edges, edgeBounds, vertBounds) { |
| 8948 | var result = [] |
| 8949 | boxIntersect(edgeBounds, vertBounds, function (i, v) { |
| 8950 | var e = edges[i] |
| 8951 | if (e[0] === v || e[1] === v) { |
| 8952 | return |
| 8953 | } |
| 8954 | var p = points[v] |
| 8955 | var a = points[e[0]] |
| 8956 | var b = points[e[1]] |
| 8957 | if (segseg(a, b, p, p)) { |
| 8958 | result.push([i, v]) |
| 8959 | } |
| 8960 | }) |
| 8961 | return result |
| 8962 | } |
| 8963 | |
| 8964 | // Cut edges along crossings/tjunctions |
| 8965 | function cutEdges (floatPoints, edges, crossings, junctions, useColor) { |
no test coverage detected
searching dependent graphs…