| 709 | } |
| 710 | |
| 711 | PolygonInfo AutoPolygon::generateTriangles(const Rect& rect, float epsilon, float threshold) |
| 712 | { |
| 713 | Rect realRect = getRealRect(rect); |
| 714 | auto p = trace(realRect, threshold); |
| 715 | p = reduce(p, realRect, epsilon); |
| 716 | p = expand(p, realRect, epsilon); |
| 717 | auto tri = triangulate(p); |
| 718 | calculateUV(realRect, tri.verts, tri.vertCount); |
| 719 | PolygonInfo ret; |
| 720 | ret.triangles = tri; |
| 721 | ret.setFilename(_filename); |
| 722 | ret.setRect(realRect); |
| 723 | return ret; |
| 724 | } |
| 725 | |
| 726 | PolygonInfo AutoPolygon::generatePolygon(std::string_view filename, const Rect& rect, float epsilon, float threshold) |
| 727 | { |
no test coverage detected