MCPcopy Create free account
hub / github.com/PlotJuggler/PlotJuggler / appendLine

Function appendLine

pj_scene2D/core/src/scene_entities_2d_decoder.cpp:82–95  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

80}
81
82void 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
97void 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;

Callers 1

appendEntityFunction · 0.85

Calls 5

projectedLinePointsFunction · 0.85
topologyForFunction · 0.85
positiveOrDefaultFunction · 0.85
projectedLineColorsFunction · 0.85
emptyMethod · 0.45

Tested by

no test coverage detected