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

Function iterateOverSingleColum

test/PatchIterators.cpp:324–343  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

322}
323
324void 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
345void iterateOverSingleColumReversely(IPatch& patch, std::size_t colToTest)
346{

Callers 1

TEST_FFunction · 0.85

Calls 5

getHeightMethod · 0.45
push_backMethod · 0.45
beginMethod · 0.45
isValidMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected