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

Function GetRectCase

libs/geometry/clipping.cpp:183–196  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

181};
182
183RectCase GetRectCase(m2::RectD const & rect, std::vector<m2::PointD> const & path)
184{
185 m2::RectD pathRect;
186 for (auto const & p : path)
187 pathRect.Add(p);
188
189 if (rect.IsRectInside(pathRect))
190 return RectCase::Inside;
191
192 if (rect.IsIntersect(pathRect))
193 return RectCase::Intersect;
194
195 return RectCase::Outside;
196}
197
198std::vector<m2::SharedSpline> ClipSplineByRect(m2::RectD const & rect, m2::SharedSpline const & spline)
199{

Callers 3

ClipSplineByRectFunction · 0.85
ClipPathByRectFunction · 0.85

Calls 3

AddMethod · 0.45
IsRectInsideMethod · 0.45
IsIntersectMethod · 0.45

Tested by

no test coverage detected