Class ClusterViewportFilter
- Namespace
- LansMap.Core.Interaction
Pure viewport hit-test for cluster bubbles: keeps only the clusters whose ground-plane projection lands on screen (with a margin).
public static class ClusterViewportFilter
- Inheritance
-
objectClusterViewportFilter
Methods
RetainVisible(List<MarkerCluster>, MapViewTransform, double)
Compacts clusters in place to the ones visible
on view, projected at ground altitude 0 with
marginPx of slack around the screen edge.
Returns the retained count.
public static int RetainVisible(List<MarkerCluster> clusters, MapViewTransform view, double marginPx)
Parameters
clustersList<MarkerCluster>viewMapViewTransformmarginPxdouble
Returns
Remarks
Tests the real projection, so rotation and pitch need no separate
case and a cluster behind the camera (failed projection) is
dropped. marginPx must cover the bubble
radius, or a bubble straddling the screen edge would pop out.