MCPcopy Create free account
hub / github.com/codereader/DarkRadiant / iterateOverSingleRow

Function iterateOverSingleRow

test/PatchIterators.cpp:388–407  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

386}
387
388void 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
409void iterateOverSingleRowReversely(IPatch& patch, std::size_t rowToTest)
410{

Callers 1

TEST_FFunction · 0.85

Calls 5

getWidthMethod · 0.45
push_backMethod · 0.45
beginMethod · 0.45
isValidMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected