| 756 | } |
| 757 | |
| 758 | m2::PointD ApplyAreaFeature::CalculateNormal(m2::PointD const & p1, m2::PointD const & p2, m2::PointD const & p3) const |
| 759 | { |
| 760 | m2::PointD const tangent = (p2 - p1).Normalize(); |
| 761 | m2::PointD normal = m2::PointD(-tangent.y, tangent.x); |
| 762 | m2::PointD const v = ((p1 + p2) * 0.5 - p3).Normalize(); |
| 763 | if (m2::DotProduct(normal, v) < 0.0) |
| 764 | normal = -normal; |
| 765 | |
| 766 | return normal; |
| 767 | } |
| 768 | |
| 769 | void ApplyAreaFeature::BuildEdges(int vertexIndex1, int vertexIndex2, int vertexIndex3, bool twoSide) |
| 770 | { |
nothing calls this directly
no test coverage detected