| 322 | } |
| 323 | |
| 324 | void iterateOverSingleColum(IPatch& patch, std::size_t colToTest) |
| 325 | { |
| 326 | std::vector<Vector3> expectedValues; |
| 327 | |
| 328 | // Fill the vector with the expected values |
| 329 | for (auto row = 0; row < patch.getHeight(); ++row) |
| 330 | { |
| 331 | expectedValues.push_back(patch.ctrlAt(row, colToTest).vertex); |
| 332 | } |
| 333 | |
| 334 | patch::SinglePatchColumnIterator it(patch, colToTest); |
| 335 | auto expected = expectedValues.begin(); |
| 336 | |
| 337 | while (it.isValid()) |
| 338 | { |
| 339 | EXPECT_EQ((it++)->vertex, *(expected++)); |
| 340 | } |
| 341 | |
| 342 | EXPECT_EQ(expected, expectedValues.end()); // assume no underflow |
| 343 | } |
| 344 | |
| 345 | void iterateOverSingleColumReversely(IPatch& patch, std::size_t colToTest) |
| 346 | { |