Table of Contents

Class ClusterViewportFilter

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
object
ClusterViewportFilter

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

clusters List<MarkerCluster>
view MapViewTransform
marginPx double

Returns

int

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.