| 386 | } |
| 387 | |
| 388 | void iterateOverSingleRow(IPatch& patch, std::size_t rowToTest) |
| 389 | { |
| 390 | std::vector<Vector3> expectedValues; |
| 391 | |
| 392 | // Fill the vector with the expected values |
| 393 | for (auto col = 0; col < patch.getWidth(); ++col) |
| 394 | { |
| 395 | expectedValues.push_back(patch.ctrlAt(rowToTest, col).vertex); |
| 396 | } |
| 397 | |
| 398 | patch::SinglePatchRowIterator it(patch, rowToTest); |
| 399 | auto expected = expectedValues.begin(); |
| 400 | |
| 401 | while (it.isValid()) |
| 402 | { |
| 403 | EXPECT_EQ((it++)->vertex, *(expected++)); |
| 404 | } |
| 405 | |
| 406 | EXPECT_EQ(expected, expectedValues.end()); // assume no underflow |
| 407 | } |
| 408 | |
| 409 | void iterateOverSingleRowReversely(IPatch& patch, std::size_t rowToTest) |
| 410 | { |