Class MarkerPicker
public static class MarkerPicker
- Inheritance
-
objectMarkerPicker
Methods
TryPick(MarkerStore, MapViewTransform, ScreenPoint, double, MarkerSpatialIndex, List<int>, out int)
Same contract as the store-scanning overload, but candidates come
from index instead of a linear walk: only
markers whose ground cell can touch the pick-radius square are
visited at all, so cost follows what is near the cursor rather
than store size. index must already hold every
live marker in store at the position/altitude
MarkerInstanceData currently carries for it - this
method only reads the index, it never builds or repairs one, so a
caller that adds/removes/moves markers is responsible for keeping
it in sync (see MarkerSpatialIndex).
candidateScratch is caller-owned and reused
across calls (Query clears it), so this overload allocates
nothing. index null falls back to the
full-scan overload above, so a caller need not branch.
public static bool TryPick(MarkerStore store, MapViewTransform view, ScreenPoint screen, double radiusPx, MarkerSpatialIndex index, List<int> candidateScratch, out int markerId)
Parameters
storeMarkerStoreviewMapViewTransformscreenScreenPointradiusPxdoubleindexMarkerSpatialIndexcandidateScratchList<int>markerIdint
Returns
TryPick(MarkerStore, MapViewTransform, ScreenPoint, double, MarkerSpatialIndex, List<int>, out int, out double)
public static bool TryPick(MarkerStore store, MapViewTransform view, ScreenPoint screen, double radiusPx, MarkerSpatialIndex index, List<int> candidateScratch, out int markerId, out double distanceSq)
Parameters
storeMarkerStoreviewMapViewTransformscreenScreenPointradiusPxdoubleindexMarkerSpatialIndexcandidateScratchList<int>markerIdintdistanceSqdouble
Returns
TryPick(MarkerStore, MapViewTransform, ScreenPoint, double, MarkerSpatialIndex, List<int>, out int, out double, bool)
public static bool TryPick(MarkerStore store, MapViewTransform view, ScreenPoint screen, double radiusPx, MarkerSpatialIndex index, List<int> candidateScratch, out int markerId, out double distanceSq, bool applyZoomRange)
Parameters
storeMarkerStoreviewMapViewTransformscreenScreenPointradiusPxdoubleindexMarkerSpatialIndexcandidateScratchList<int>markerIdintdistanceSqdoubleapplyZoomRangebool
Returns
TryPick(MarkerStore, MapViewTransform, ScreenPoint, double, out int)
public static bool TryPick(MarkerStore store, MapViewTransform view, ScreenPoint screen, double radiusPx, out int markerId)
Parameters
storeMarkerStoreviewMapViewTransformscreenScreenPointradiusPxdoublemarkerIdint
Returns
TryPick(MarkerStore, MapViewTransform, ScreenPoint, double, out int, out double)
public static bool TryPick(MarkerStore store, MapViewTransform view, ScreenPoint screen, double radiusPx, out int markerId, out double distanceSq)
Parameters
storeMarkerStoreviewMapViewTransformscreenScreenPointradiusPxdoublemarkerIdintdistanceSqdouble
Returns
TryPick(MarkerStore, MapViewTransform, ScreenPoint, double, out int, out double, bool)
public static bool TryPick(MarkerStore store, MapViewTransform view, ScreenPoint screen, double radiusPx, out int markerId, out double distanceSq, bool applyZoomRange)
Parameters
storeMarkerStoreviewMapViewTransformscreenScreenPointradiusPxdoublemarkerIdintdistanceSqdoubleapplyZoomRangebool