| 17 | } |
| 18 | |
| 19 | void TrueDistanceSelector::addEdge(EdgeCache &cache, const EdgeSegment *prevEdge, const EdgeSegment *edge, const EdgeSegment *nextEdge) { |
| 20 | double delta = DISTANCE_DELTA_FACTOR*(p-cache.point).length(); |
| 21 | if (cache.absDistance-delta <= fabs(minDistance.distance)) { |
| 22 | double dummy; |
| 23 | SignedDistance distance = edge->signedDistance(p, dummy); |
| 24 | if (distance < minDistance) |
| 25 | minDistance = distance; |
| 26 | cache.point = p; |
| 27 | cache.absDistance = fabs(distance.distance); |
| 28 | } |
| 29 | } |
| 30 | |
| 31 | void TrueDistanceSelector::merge(const TrueDistanceSelector &other) { |
| 32 | if (other.minDistance < minDistance) |
nothing calls this directly
no test coverage detected