MCPcopy Create free account
hub / github.com/OpenOrienteering/mapper / countRegularNodes

Method countRegularNodes

src/core/virtual_path.cpp:321–335  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

319}
320
321VirtualPath::size_type VirtualPath::countRegularNodes() const
322{
323 size_type num_regular_points = 0;
324 for (auto i = first_index; i <= last_index; ++i)
325 {
326 ++num_regular_points;
327 if (coords.flags[i].isCurveStart())
328 i += 2;
329 }
330
331 if (num_regular_points && isClosed())
332 --num_regular_points;
333
334 return num_regular_points;
335}
336
337bool VirtualPath::isClosed() const
338{

Callers 3

clickPressMethod · 0.80
simplifyMethod · 0.80
deleteCoordinateMethod · 0.80

Calls 1

isCurveStartMethod · 0.80

Tested by

no test coverage detected