SW 중심대학 OSS GIT 서버 박건태, 이승준, 고기완, 이준호 새로운 배포
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

50 lines
1.7 KiB

4 years ago
  1. using System;
  2. using UnityEngine.XR.ARSubsystems;
  3. namespace UnityEngine.XR.ARFoundation
  4. {
  5. /// <summary>
  6. /// Represents a tracked image in the physical environment.
  7. /// </summary>
  8. [DisallowMultipleComponent]
  9. [DefaultExecutionOrder(ARUpdateOrder.k_TrackedImage)]
  10. [HelpURL("https://docs.unity3d.com/Packages/com.unity.xr.arfoundation@3.0/api/UnityEngine.XR.ARFoundation.ARTrackedImage.html")]
  11. public class ARTrackedImage : ARTrackable<XRTrackedImage, ARTrackedImage>
  12. {
  13. /// <summary>
  14. /// The 2D extents of the image. This is half the <see cref="size"/>.
  15. /// </summary>
  16. public Vector2 extents
  17. {
  18. get { return sessionRelativeData.size * 0.5f; }
  19. }
  20. /// <summary>
  21. /// The 2D size of the image. This is the dimensions of the image.
  22. /// </summary>
  23. /// <value></value>
  24. public Vector2 size
  25. {
  26. get { return sessionRelativeData.size; }
  27. }
  28. /// <summary>
  29. /// Get a native pointer associated with this tracked image.
  30. /// </summary>
  31. /// <remarks>
  32. /// The data pointed to by this member is implementation defined.
  33. /// The lifetime of the pointed to object is also
  34. /// implementation defined, but should be valid at least until the next
  35. /// <see cref="ARSession"/> update.
  36. /// </remarks>
  37. public IntPtr nativePtr
  38. {
  39. get { return sessionRelativeData.nativePtr; }
  40. }
  41. /// <summary>
  42. /// The reference image which was used to detect this image in the environment.
  43. /// </summary>
  44. public XRReferenceImage referenceImage { get; internal set; }
  45. }
  46. }