void DATFileUpdaterTest::AddSubGridData(DATData& data, float increment) { for(int n = 0; n < 4; n++) { FRegion region; float ptVal = 0.0; for(int i = 0; i < 4; i++) { FPoint point; point.x = ptVal; ptVal += increment; point.y = ptVal; region.pts.push_back(point); } u_int32_t status = DATData::GridError | DATData::GridManualAdjust; if (n % 2 == 0) status = DATData::GridOK | DATData::GridManualAdjust; data.AddSubgrid(status, region); } }
void TestFileGenerator::AddGridAndSubgrids(DATData& data, float increment, int32_t subgridCnt) { // Write the grid FRegion ggRegion; float ptVal = 0.0; for(int i = 0; i < 4; i++) { FPoint point; point.x = ptVal; ptVal += increment; point.y = ptVal; ggRegion.pts.push_back(point); } u_int32_t ggStatus = DATData::GridOK | DATData::GridManualAdjust; data.SetGlobalGrid(ggStatus, ggRegion); for(int n = 0; n < subgridCnt; n++) { FRegion sgRegion; float ptVal = 0.0 + (float)n; for(int i = 0; i < 4; i++) { FPoint point; point.x = ptVal; ptVal += increment; point.y = ptVal; sgRegion.pts.push_back(point); } u_int32_t sgStatus = DATData::GridError | DATData::GridManualAdjust; if (n % 2 == 0) sgStatus = DATData::GridOK | DATData::GridManualAdjust; data.AddSubgrid(sgStatus, sgRegion); } }