| 1219 | } |
| 1220 | |
| 1221 | std::vector<RunBoxRecord> build_run_box_records(const std::vector<LineRun>& runs) { |
| 1222 | std::vector<RunBoxRecord> records; |
| 1223 | records.reserve(runs.size()); |
| 1224 | for (size_t i = 0; i < runs.size(); ++i) { |
| 1225 | auto corners = rectangle_corners(runs[i].start, runs[i].end, runs[i].avg_width); |
| 1226 | records.push_back({ |
| 1227 | i, |
| 1228 | runs[i].start, |
| 1229 | runs[i].end, |
| 1230 | unit(runs[i].end - runs[i].start), |
| 1231 | runs[i].avg_width, |
| 1232 | runs[i].length, |
| 1233 | corners, |
| 1234 | aabb_from_points(corners) |
| 1235 | }); |
| 1236 | } |
| 1237 | return records; |
| 1238 | } |
| 1239 | |
| 1240 | template <typename T> |
| 1241 | std::pair<double, double> projected_interval_on_axis(const T& box, const DDir& axis_u) { |
no test coverage detected