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

Method Select

libs/drape/overlay_tree.cpp:472–486  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

470}
471
472void OverlayTree::Select(m2::PointD const & glbPoint, TOverlayContainer & result) const
473{
474 ScreenBase const & screen = GetModelView();
475 m2::PointD const pxPoint = screen.GtoP(glbPoint);
476
477 double constexpr kSearchRectHalfSize = 10.0;
478 m2::RectD rect(pxPoint, pxPoint);
479 rect.Inflate(kSearchRectHalfSize, kSearchRectHalfSize);
480
481 /// @todo Why we can't call Select(rect) here?
482 /// Why we don't check handle->IsVisible(), like in Select(rect)?
483 for (auto const & handle : m_handlesCache)
484 if (!handle->HasLinearFeatureShape() && rect.IsPointInside(handle->GetPivot(screen, false)))
485 result.push_back(handle);
486}
487
488void OverlayTree::Select(m2::RectD const & rect, TOverlayContainer & result) const
489{

Callers 2

GetVisiblePOIMethod · 0.45
ProcessSelectionMethod · 0.45

Calls 12

ASSERTFunction · 0.85
isPerspectiveMethod · 0.80
GtoPMethod · 0.45
InflateMethod · 0.45
HasLinearFeatureShapeMethod · 0.45
IsPointInsideMethod · 0.45
GetPivotMethod · 0.45
push_backMethod · 0.45
IsValidMethod · 0.45
IsVisibleMethod · 0.45
GetPixelShapeMethod · 0.45
IsIntersectMethod · 0.45

Tested by

no test coverage detected