GesPointerEvent.cs 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. using System;
  2. using UnityEngine;
  3. using UnityEngine.EventSystems;
  4. namespace Rokid.UXR.Interaction
  5. {
  6. /// <summary>
  7. /// Gesture ray enters,grip or pinch gesture type triggers
  8. /// </summary>
  9. public interface IGesPointerEnter
  10. {
  11. void OnGesPointerEnter();
  12. }
  13. /// <summary>
  14. /// Gesture ray exits,grip or pinch gesture type triggers
  15. /// </summary>
  16. public interface IGesPointerExit
  17. {
  18. void OnGesPointerExit();
  19. }
  20. /// <summary>
  21. /// Gesture Ray drag starts,grip or pinch gesture type triggers
  22. /// </summary>
  23. public interface IGesBeginDrag
  24. {
  25. void OnGesBeginDrag(PointerEventData eventData);
  26. }
  27. /// <summary>
  28. /// Gesture ray drag ends,grip or pinch gesture type triggers
  29. /// </summary>
  30. public interface IGesEndDrag
  31. {
  32. void OnGesEndDrag();
  33. }
  34. /// <summary>
  35. /// Gesture ray drag,grip or pinch gesture type triggers
  36. /// </summary>
  37. public interface IGesDrag
  38. {
  39. [Obsolete("Use IGesDragToTarget instead")]
  40. void OnGesDrag(Vector3 delta);
  41. }
  42. /// <summary>
  43. /// Gesture ray drag,grip or pinch gesture type triggers
  44. /// </summary>
  45. public interface IGesDragToTarget
  46. {
  47. void OnGesDragToTarget(Vector3 targetPos);
  48. }
  49. /// <summary>
  50. /// The gesture ray is hovering and the grip or pinch type is triggered
  51. /// </summary>
  52. public interface IGesPointerHover
  53. {
  54. void OnGesPointerHover(RaycastResult result);
  55. }
  56. /// <summary>
  57. /// Gesture ray click,grip or pinch gesture type trigger
  58. /// </summary>
  59. public interface IGesPointerClick
  60. {
  61. void OnGesPointerClick();
  62. }
  63. }