MCPcopy Create free account
hub / github.com/MyGUI/mygui / addEdge

Method addEdge

MyGUIEngine/src/msdfgen/core/edge-selectors.cpp:19–29  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

17}
18
19void 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
31void TrueDistanceSelector::merge(const TrueDistanceSelector &other) {
32 if (other.minDistance < minDistance)

Callers

nothing calls this directly

Calls 9

dotProductFunction · 0.85
signedDistanceMethod · 0.80
directionMethod · 0.80
isEdgeRelevantMethod · 0.80
addEdgeTrueDistanceMethod · 0.80
lengthMethod · 0.45
pointMethod · 0.45
normalizeMethod · 0.45

Tested by

no test coverage detected