void SystemState::drawSegment(const Geometry2d::Segment& line, const QColor& qc, const QString& layer) { DebugPath* dbg = logFrame->add_debug_paths(); dbg->set_layer(findDebugLayer(layer)); *dbg->add_points() = line.pt[0]; *dbg->add_points() = line.pt[1]; dbg->set_color(color(qc)); }
void SystemState::drawPolygon(const Geometry2d::Point* pts, int n, const QColor& qc, const QString& layer) { DebugPath* dbg = logFrame->add_debug_polygons(); dbg->set_layer(findDebugLayer(layer)); for (int i = 0; i < n; ++i) { *dbg->add_points() = pts[i]; } dbg->set_color(color(qc)); }
void SystemState::drawPolygon(const std::vector<Geometry2d::Point>& pts, const QColor &qc, const QString &layer) { DebugPath *dbg = logFrame->add_debug_polygons(); dbg->set_layer(findDebugLayer(layer)); for (size_t i = 0; i < pts.size(); ++i) { *dbg->add_points() = pts[i]; } dbg->set_color(color(qc)); }