* @brief Updates 3D trajectory plot series for all 3D plot widgets. */
| 2121 | * @brief Updates 3D trajectory plot series for all 3D plot widgets. |
| 2122 | */ |
| 2123 | void UI::Dashboard::updatePlot3DSeries(int sourceId) |
| 2124 | { |
| 2125 | #ifdef BUILD_COMMERCIAL |
| 2126 | Q_ASSERT(static_cast<int>(m_plot3DPushes.size()) == m_plot3DRings.size()); |
| 2127 | Q_ASSERT(m_points > 0); |
| 2128 | |
| 2129 | const auto maxPoints = static_cast<std::size_t>(points()); |
| 2130 | for (const auto& p : m_plot3DPushes) { |
| 2131 | if (sourceId >= 0 && p.sourceId != sourceId) |
| 2132 | continue; |
| 2133 | |
| 2134 | if (p.ring->capacity() != maxPoints) [[unlikely]] |
| 2135 | p.ring->resize(maxPoints); |
| 2136 | |
| 2137 | p.ring->push( |
| 2138 | QVector3D(static_cast<float>(*p.x), static_cast<float>(*p.y), static_cast<float>(*p.z))); |
| 2139 | } |
| 2140 | #else |
| 2141 | (void)sourceId; |
| 2142 | #endif |
| 2143 | } |
| 2144 | |
| 2145 | /** |
| 2146 | * @brief Updates linear plot data series for all active plot widgets. |