Esempio n. 1
0
        /// <summary>
        /// This methods is used to set default values by the default constructor of our classes. 
        /// This is called too when an entity is deserializing. 
        /// </summary>
        protected override void DefaultValues()
        {
            base.DefaultValues();

            this.currentTouches = new List<TouchLocation>();
            this.minScale = 0.1f;
            this.maxScale = 5f;
            this.gestureSample = new GestureSample { DeltaScale = 1 };
            this.enabledGestures = SupportedGesture.None;
            this.ProjectCamera = true;
        }
Esempio n. 2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="TouchGestures"/> class.
 /// By default, scale is within [0.1, 5], the delta scale is set to 1 and there is no
 /// supported gesture.
 /// </summary>
 /// <param name="projectCamera">Indicates if the touches will be processed using Cameras</param>
 public TouchGestures(bool projectCamera = true)
     : base("TouchGestures" + instances++)
 {
     this.currentTouches = new List <TouchLocation>();
     this.minScale       = 0.1f;
     this.maxScale       = 5f;
     this.gestureSample  = new GestureSample {
         DeltaScale = 1
     };
     this.enabledGestures = SupportedGesture.None;
     this.projectCamera   = projectCamera;
 }
Esempio n. 3
0
        void rightHandGestureRecognizer_OnGestureDetected(SupportedGesture gesture)
        {
            switch (gesture)
            {
            case SupportedGesture.SwipeToLeft:
                Gesture.Content = "GestureDetected:SwipeToLeft";
                break;

            case SupportedGesture.SwipeToRight:
                Gesture.Content = "GestureDetected:SwipeToRight";
                break;
            }
        }
Esempio n. 4
0
 /// <summary>
 /// Determines whether a type of gesture is supported.
 /// </summary>
 /// <param name="type">The type.</param>
 /// <returns>
 ///   <c>true</c> if the type of gesture is supported; otherwise, <c>false</c>.
 /// </returns>
 private bool IsGestureSupported(SupportedGesture type)
 {
     return((this.enabledGestures & type) == type);
 }
Esempio n. 5
0
 /// <summary>
 /// Determines whether a type of gesture is supported.
 /// </summary>
 /// <param name="type">The type.</param>
 /// <returns>
 ///   <c>true</c> if the type of gesture is supported; otherwise, <c>false</c>.
 /// </returns>
 private bool IsGestureSupported(SupportedGesture type)
 {
     return (this.enabledGestures & type) == type;
 }
Esempio n. 6
0
 /// <summary>
 /// Initializes a new instance of the <see cref="TouchGestures"/> class.
 /// By default, scale is within [0.1, 5], the delta scale is set to 1 and there is no 
 /// supported gesture.
 /// </summary>
 /// <param name="projectCamera">Indicates if the touches will be processed using Cameras</param>
 public TouchGestures(bool projectCamera = true)
     : base("TouchGestures" + instances++)
 {
     this.currentTouches = new List<TouchLocation>();
     this.minScale = 0.1f;
     this.maxScale = 5f;
     this.gestureSample = new GestureSample { DeltaScale = 1 };
     this.enabledGestures = SupportedGesture.None;
     this.projectCamera = projectCamera;
 }
Esempio n. 7
0
        /// <summary>
        /// This methods is used to set default values by the default constructor of our classes. 
        /// This is called too when an entity is deserializing. 
        /// </summary>
        protected override void DefaultValues()
        {
            base.DefaultValues();

            this.currentTouches = new List<TouchLocation>();
            this.minScale = 0.1f;
            this.maxScale = 5f;
            this.gestureSample = new GestureSample { DeltaScale = 1 };
            this.enabledGestures = SupportedGesture.None;
            this.ProjectCamera = true;
        }
 void rightHandGestureRecognizer_OnGestureDetected(SupportedGesture gesture)
 {
     switch (gesture)
     {
         case SupportedGesture.SwipeToLeft:
             Gesture.Content = "GestureDetected:SwipeToLeft";
             break;
         case SupportedGesture.SwipeToRight:
             Gesture.Content = "GestureDetected:SwipeToRight";
             break;
     }
 }