protected virtual FingerGestures.IFingerList GetTouches(T gesture) { if (SupportFingerClustering && ClusterManager) { FingerClusterManager.Cluster cluster = ClusterManager.FindClusterById(gesture.ClusterId); return((cluster != null) ? cluster.Fingers : EmptyFingerList); } return(FingerGestures.Touches); }
void UpdateUsingClusters() { // force cluster manager to update now (ensures we have most up to date finger state) ClusterManager.Update(); foreach (FingerClusterManager.Cluster cluster in ClusterManager.Clusters) { ProcessCluster(cluster); } foreach (T g in gestures) { FingerClusterManager.Cluster cluster = ClusterManager.FindClusterById(g.ClusterId); FingerGestures.IFingerList touches = (cluster != null) ? cluster.Fingers : EmptyFingerList; UpdateGesture(g, touches); } }
// use the finger clusters as touch list sources (used for handling simultaneous multi-finger gestures) void UpdateUsingClusters() { // force cluster manager to update now (ensures we have most up to date finger state) ClusterManager.Update(); for (int i = 0; i < ClusterManager.Clusters.Count; ++i) { ProcessCluster(ClusterManager.Clusters[i]); } for (int i = 0; i < gestures.Count; ++i) { T g = gestures[i]; FingerClusterManager.Cluster cluster = ClusterManager.FindClusterById(g.ClusterId); FingerGestures.IFingerList touches = (cluster != null) ? cluster.Fingers : EmptyFingerList; UpdateGesture(g, touches); } }