NormalPointerEvent.cs 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. using UnityEngine;
  2. using UnityEngine.EventSystems;
  3. namespace Rokid.UXR.Interaction
  4. {
  5. /// <summary>
  6. /// Triggered when the ray enters
  7. /// </summary>
  8. public interface IRayPointerEnter
  9. {
  10. void OnRayPointerEnter();
  11. }
  12. /// <summary>
  13. /// Triggered when the ray exits
  14. /// </summary>
  15. public interface IRayPointerExit
  16. {
  17. void OnRayPointerExit();
  18. }
  19. /// <summary>
  20. /// Triggered when mouse ray starts
  21. /// </summary>
  22. public interface IRayBeginDrag
  23. {
  24. void OnRayBeginDrag(PointerEventData eventData);
  25. }
  26. /// <summary>
  27. /// Triggered when the ray drag ends
  28. /// </summary>
  29. public interface IRayEndDrag
  30. {
  31. void OnRayEndDrag();
  32. }
  33. /// <summary>
  34. /// Triggered when ray dragging
  35. /// </summary>
  36. public interface IRayDrag
  37. {
  38. void OnRayDrag(Vector3 delta);
  39. }
  40. /// <summary>
  41. /// Triggered when ray hovering
  42. /// </summary>
  43. public interface IRayPointerHover
  44. {
  45. void OnRayPointerHover();
  46. }
  47. /// <summary>
  48. /// Triggered when ray click
  49. /// </summary>
  50. public interface IRayPointerClick
  51. {
  52. void OnRayPointerClick();
  53. }
  54. public interface IBezierCurveDrag
  55. {
  56. /// <summary>
  57. /// Whether UI dragging with Pinch gesture is supported
  58. /// </summary>
  59. /// <returns></returns>
  60. bool IsEnablePinchBezierCurve();
  61. /// <summary>
  62. /// Whether to support dragging objects using Grip gestures
  63. /// </summary>
  64. /// <returns></returns>
  65. bool IsEnableGripBezierCurve();
  66. /// <summary>
  67. /// Whether it is currently in drag state
  68. /// </summary>
  69. /// <returns></returns>
  70. bool IsInBezierCurveDragging();
  71. /// <summary>
  72. /// Returns the world coordinates of the drag point
  73. /// </summary>
  74. /// <returns></returns>
  75. Vector3 GetBezierCurveEndPoint();
  76. /// <summary>
  77. /// Returns the world coordinates of the drag point
  78. /// </summary>
  79. /// <returns></returns>
  80. Vector3 GetBezierCurveEndNormal();
  81. }
  82. }