| 80 | } |
| 81 | |
| 82 | void appendLine(const sdk::LinePrimitive& line, ImageAnnotation& annotation) { |
| 83 | auto points = projectedLinePoints(line); |
| 84 | if (points.empty()) { |
| 85 | return; |
| 86 | } |
| 87 | |
| 88 | PointsAnnotation out; |
| 89 | out.topology = topologyFor(line.type); |
| 90 | out.points = std::move(points); |
| 91 | out.thickness = positiveOrDefault(line.thickness, 2.0); |
| 92 | out.color = line.color; |
| 93 | out.colors = projectedLineColors(line); |
| 94 | annotation.points.push_back(std::move(out)); |
| 95 | } |
| 96 | |
| 97 | void appendSphere(const sdk::SpherePrimitive& sphere, ImageAnnotation& annotation) { |
| 98 | const double radius = std::max(std::abs(sphere.size.x), std::abs(sphere.size.y)) * 0.5; |
no test coverage detected