| 1014 | } |
| 1015 | |
| 1016 | void buildShapeFromPath(const ClipperLib::Path& path, std::vector<Vec2f>& outShape) |
| 1017 | { |
| 1018 | const f64 precision = c_fromFixed; |
| 1019 | const s32 vtxCount = (s32)path.size(); |
| 1020 | const ClipperLib::IntPoint* vtx = path.data(); |
| 1021 | |
| 1022 | outShape.resize(vtxCount); |
| 1023 | Vec2f* outVtx = outShape.data(); |
| 1024 | |
| 1025 | for (s32 v = 0; v < vtxCount; v++, vtx++, outVtx++) |
| 1026 | { |
| 1027 | outVtx->x = f32((f64)vtx->X * precision); |
| 1028 | outVtx->z = f32((f64)vtx->Y * precision); |
| 1029 | } |
| 1030 | } |
| 1031 | |
| 1032 | void buildContoursFromPolygon(const BPolygon* poly, std::vector<Contour>* contours) |
| 1033 | { |
no test coverage detected