public override void handleGrip(GripEvent e, HandType hand) { if (hand != this.hand) { return; } if (e == GripEvent.Grip) { this.isGripped = true; this.gripPoint = lastPoint; } else { this.isGripped = false; } }
public void processInteractionInfo(UserInfo[] infos, long timestamp) { foreach (var info in infos) { foreach (var hand in info.HandPointers) { if (hand.HandEventType == InteractionHandEventType.None || hand.HandType == InteractionHandType.None) { continue; } GripEvent e = hand.HandEventType == InteractionHandEventType.Grip ? GripEvent.Grip : GripEvent.Ungrip; HandType t = hand.HandType == InteractionHandType.Left ? HandType.Left : HandType.Right; foreach (Gesture g in gestures) { g.handleGrip(e, t); } } } }
public override void handleGrip(GripEvent e, HandType hand) { }
public abstract void handleGrip(GripEvent e, HandType hand);