MCPcopy Create free account
hub / github.com/Serial-Studio/Serial-Studio / emitJoinIndices

Function emitJoinIndices

app/src/UI/Widgets/PlotCurve.cpp:204–217  ·  view source on GitHub ↗

* @brief Emits the 18 indices (three quad bands, two triangles each) joining two consecutive * four-vertex cross-sections along a run. */

Source from the content-addressed store, hash-verified

202 * four-vertex cross-sections along a run.
203 */
204static void emitJoinIndices(quint32* indices, int& idx, const int a, const int b)
205{
206 Q_ASSERT(indices != nullptr);
207 Q_ASSERT(a >= 0 && b >= 0);
208
209 for (int k = 0; k < 3; ++k) {
210 indices[idx++] = static_cast<quint32>(a + k);
211 indices[idx++] = static_cast<quint32>(b + k);
212 indices[idx++] = static_cast<quint32>(a + k + 1);
213 indices[idx++] = static_cast<quint32>(b + k);
214 indices[idx++] = static_cast<quint32>(b + k + 1);
215 indices[idx++] = static_cast<quint32>(a + k + 1);
216 }
217}
218
219/**
220 * @brief Constructs the curve item and enables scene-graph content.

Callers 1

emitRunMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected