| 40 | PerpendicularDistanceSelectorBase::EdgeCache::EdgeCache() : absDistance(0), aDomainDistance(0), bDomainDistance(0), aPerpendicularDistance(0), bPerpendicularDistance(0) { } |
| 41 | |
| 42 | bool PerpendicularDistanceSelectorBase::getPerpendicularDistance(double &distance, const Vector2 &ep, const Vector2 &edgeDir) { |
| 43 | double ts = dotProduct(ep, edgeDir); |
| 44 | if (ts > 0) { |
| 45 | double perpendicularDistance = crossProduct(ep, edgeDir); |
| 46 | if (fabs(perpendicularDistance) < fabs(distance)) { |
| 47 | distance = perpendicularDistance; |
| 48 | return true; |
| 49 | } |
| 50 | } |
| 51 | return false; |
| 52 | } |
| 53 | |
| 54 | PerpendicularDistanceSelectorBase::PerpendicularDistanceSelectorBase() : minNegativePerpendicularDistance(-fabs(minTrueDistance.distance)), minPositivePerpendicularDistance(fabs(minTrueDistance.distance)), nearEdge(NULL), nearEdgeParam(0) { } |
| 55 |
nothing calls this directly
no test coverage detected