| 970 | } |
| 971 | |
| 972 | void buildPathFromShape(const std::vector<Vec2f>& shape, ClipperLib::Path& outPath) |
| 973 | { |
| 974 | const f64 precision = c_toFixed; |
| 975 | const s32 vtxCount = (s32)shape.size(); |
| 976 | const Vec2f* vtx = shape.data(); |
| 977 | |
| 978 | outPath.resize(shape.size()); |
| 979 | ClipperLib::IntPoint* outVtx = outPath.data(); |
| 980 | for (s32 v = 0; v < vtxCount; v++, vtx++, outVtx++) |
| 981 | { |
| 982 | outVtx->X = ClipperLib::cInt((f64)vtx->x * precision); |
| 983 | outVtx->Y = ClipperLib::cInt((f64)vtx->z * precision); |
| 984 | } |
| 985 | } |
| 986 | |
| 987 | void buildContoursFromPaths(const ClipperLib::Paths& paths, s32 outsideClipCount, std::vector<Contour>* contourList) |
| 988 | { |
no test coverage detected