MCPcopy Create free account
hub / github.com/comaps/comaps / operator()

Method operator()

generator/feature_helpers.cpp:18–38  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

16}
17
18void CalculateMidPoints::operator()(FeatureBuilder const & ft, uint64_t pos)
19{
20 // Reset state.
21 m_midLoc = m2::PointD::Zero();
22 m_locCount = 0;
23
24 ft.ForEachPoint(*this);
25 CHECK_GREATER(m_locCount, 0, ());
26 m_midLoc = m_midLoc / m_locCount;
27
28 uint64_t const pointAsInt64 = PointToInt64Obsolete(m_midLoc, m_coordBits);
29 int const minScale = m_minDrawableScaleFn(ft);
30
31 /// May be invisible if it's small area object with [0-9] scales.
32 /// @todo Probably, we need to keep that objects if 9 scale (as we do in 17 scale).
33 if (minScale != -1)
34 {
35 uint64_t const order = (static_cast<uint64_t>(minScale) << 59) | (pointAsInt64 >> 5);
36 m_vec.emplace_back(order, pos);
37 }
38}
39
40bool CalculateMidPoints::operator()(m2::PointD const & p)
41{

Callers

nothing calls this directly

Calls 4

ZeroFunction · 0.85
PointToInt64ObsoleteFunction · 0.85
ForEachPointMethod · 0.45
emplace_backMethod · 0.45

Tested by

no test coverage detected