MCPcopy Create free account
hub / github.com/comaps/comaps / Union

Method Union

generator/cells_merger.cpp:206–221  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

204}
205
206m2::RectD CellsMerger::Union(m2::PointI const & startXy)
207{
208 auto const direction = FindDirection(startXy);
209 if (!direction)
210 {
211 auto const united = Get(startXy).GetCell();
212 Remove(startXy, startXy);
213 return united;
214 }
215 auto nextXy = FindBigSquare(startXy, *direction);
216 auto cell1 = Get(startXy).GetCell();
217 auto const & cell2 = Get(nextXy).GetCell();
218 cell1.Add(cell2);
219 Remove(startXy, nextXy);
220 return cell1;
221}
222
223std::vector<m2::RectD> MakeNet(double step, double minX, double minY, double maxX, double maxY)
224{

Callers 1

Calls 3

GetFunction · 0.85
GetCellMethod · 0.45
AddMethod · 0.45

Tested by

no test coverage detected