/// <summary> /// Initializes a new instance of the <see cref="TouchpadGesture"/> class. /// </summary> public TouchpadGesture() { this.posAndForceUnity = null; this.posAndForce = new MagicLeapNativeBindings.MLVec3f(); this.Type = GestureType.None; this.Direction = GestureDirection.None; this.Speed = 0f; this.Distance = 0f; this.FingerGap = 0f; this.Radius = 0f; this.Angle = 0f; }
/// <summary> /// Update with the specified Unity XR Input MagicLeapTouchpadGestureEvent. /// </summary> /// <param name="touchpadGesture">The Unity XR Input MagicLeapTouchpadGestureEvent.</param> public void Update(UnityEngine.XR.MagicLeap.MagicLeapTouchpadGestureEvent touchpadGesture) { this.posAndForceUnity = null; this.posAndForce = MLConvert.FromUnity(touchpadGesture.positionAndForce, false, false); this.Type = (GestureType)touchpadGesture.type; this.Direction = (GestureDirection)touchpadGesture.direction; this.Speed = touchpadGesture.speed; this.Distance = touchpadGesture.distance; this.FingerGap = touchpadGesture.fingerGap; this.Radius = touchpadGesture.radius; this.Angle = touchpadGesture.angle; }