/// <summary>Initializes a new instance of the <see cref="dfTouchEventArgs" /> class.</summary> /// <param name="Source">The <see cref="dfControl"/> that originally received this event notification</param> /// <param name="touch">A <see cref="Touch" /> record encapsulating the data describing the touch event. </param> /// <param name="ray">The <see cref="Ray"/> from the screen mouse location through the <paramref name="Source"/> control</param> public dfTouchEventArgs(dfControl Source, dfTouchInfo touch, Ray ray) : base(Source, dfMouseButtons.Left, touch.tapCount, ray, touch.position, 0f) { this.Touch = touch; this.Touches = new List <dfTouchInfo>() { touch }; var deltaTime = Time.deltaTime; if (touch.deltaTime > float.Epsilon && deltaTime > float.Epsilon) { this.MoveDelta = touch.deltaPosition * (deltaTime / touch.deltaTime); } else { this.MoveDelta = touch.deltaPosition; } }
public TouchRaycast( dfControl control, dfTouchInfo touch, Ray ray ) { this.control = control; this.touch = touch; this.ray = ray; this.position = touch.position; }
/// <summary>Initializes a new instance of the <see cref="dfTouchEventArgs" /> class.</summary> /// <param name="Source">The <see cref="dfControl"/> that originally received this event notification</param> /// <param name="touch">A <see cref="Touch" /> record encapsulating the data describing the touch event. </param> /// <param name="ray">The <see cref="Ray"/> from the screen mouse location through the <paramref name="Source"/> control</param> public dfTouchEventArgs( dfControl Source, dfTouchInfo touch, Ray ray ) : base(Source, dfMouseButtons.Left, touch.tapCount, ray, touch.position, 0f) { this.Touch = touch; this.Touches = new List<dfTouchInfo>() { touch }; var deltaTime = Time.deltaTime; if( touch.deltaTime > float.Epsilon && deltaTime > float.Epsilon ) { this.MoveDelta = touch.deltaPosition * ( deltaTime / touch.deltaTime ); } else { this.MoveDelta = touch.deltaPosition; } }