* @brief Emits the 18 indices (three quad bands, two triangles each) joining two consecutive * four-vertex cross-sections along a run. */
| 202 | * four-vertex cross-sections along a run. |
| 203 | */ |
| 204 | static 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. |