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

Function appendSphere

pj_scene2D/core/src/scene_entities_2d_decoder.cpp:97–107  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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;
99 if (radius <= 0.0) {
100 return;
101 }
102 CircleAnnotation out;
103 out.center = projectPosition(sphere.pose);
104 out.radius = radius;
105 out.color = sphere.color;
106 annotation.circles.push_back(out);
107}
108
109void appendCubeFootprint(const sdk::CubePrimitive& cube, ImageAnnotation& annotation) {
110 const double half_x = std::abs(cube.size.x) * 0.5;

Callers 1

appendEntityFunction · 0.85

Calls 1

projectPositionFunction · 0.85

Tested by

no test coverage detected