OVRProfile.cs 948 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. using System;
  2. using UnityEngine;
  3. public class OVRProfile : UnityEngine.Object
  4. {
  5. [Obsolete]
  6. public string id
  7. {
  8. get
  9. {
  10. return "000abc123def";
  11. }
  12. }
  13. [Obsolete]
  14. public string userName
  15. {
  16. get
  17. {
  18. return "Oculus User";
  19. }
  20. }
  21. [Obsolete]
  22. public string locale
  23. {
  24. get
  25. {
  26. return "en_US";
  27. }
  28. }
  29. public float ipd
  30. {
  31. get
  32. {
  33. return Vector3.Distance(OVRPlugin.GetNodePose(OVRPlugin.Node.EyeLeft, false).ToOVRPose().position, OVRPlugin.GetNodePose(OVRPlugin.Node.EyeRight, false).ToOVRPose().position);
  34. }
  35. }
  36. public float eyeHeight
  37. {
  38. get
  39. {
  40. return OVRPlugin.eyeHeight;
  41. }
  42. }
  43. public float eyeDepth
  44. {
  45. get
  46. {
  47. return OVRPlugin.eyeDepth;
  48. }
  49. }
  50. public float neckHeight
  51. {
  52. get
  53. {
  54. return this.eyeHeight - 0.075f;
  55. }
  56. }
  57. [Obsolete]
  58. public OVRProfile.State state
  59. {
  60. get
  61. {
  62. return OVRProfile.State.READY;
  63. }
  64. }
  65. [Obsolete]
  66. public enum State
  67. {
  68. NOT_TRIGGERED,
  69. LOADING,
  70. READY,
  71. ERROR
  72. }
  73. }