INxrGazeResponder.cs 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. // Copyright 2016 Nibiru. All rights reserved.
  2. //
  3. // Licensed under the Apache License, Version 2.0 (the "License");
  4. // you may not use this file except in compliance with the License.
  5. // You may obtain a copy of the License at
  6. //
  7. // http://www.apache.org/licenses/LICENSE-2.0
  8. //
  9. // Unless required by applicable law or agreed to in writing, software
  10. // distributed under the License is distributed on an "AS IS" BASIS,
  11. // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. // See the License for the specific language governing permissions and
  13. // limitations under the License.
  14. /// This script provides an interface for gaze based responders used with
  15. /// the NxrGaze script.
  16. using UnityEngine;
  17. namespace Nxr.Internal
  18. {
  19. public interface INxrGazeResponder
  20. {
  21. /// Called when the user is looking on a GameObject with this script,
  22. /// as long as it is set to an appropriate layer (see NxrGaze).
  23. void OnGazeEnter();
  24. /// Called when the user stops looking on the GameObject, after OnGazeEnter
  25. /// was already called.
  26. void OnGazeExit();
  27. /// Called when the trigger is used, between OnGazeEnter and OnGazeExit.
  28. void OnGazeTrigger();
  29. /// <summary>
  30. ///
  31. ///
  32. /// </summary>
  33. /// <param name="position"></param>
  34. void OnUpdateIntersectionPosition(Vector3 position);
  35. }
  36. }