OVRProfile.cs 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. /************************************************************************************
  2. Copyright : Copyright (c) Facebook Technologies, LLC and its affiliates. All rights reserved.
  3. Licensed under the Oculus Utilities SDK License Version 1.31 (the "License"); you may not use
  4. the Utilities SDK except in compliance with the License, which is provided at the time of installation
  5. or download, or which otherwise accompanies this software in either electronic or hard copy form.
  6. You may obtain a copy of the License at
  7. https://developer.oculus.com/licenses/utilities-1.31
  8. Unless required by applicable law or agreed to in writing, the Utilities SDK distributed
  9. under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
  10. ANY KIND, either express or implied. See the License for the specific language governing
  11. permissions and limitations under the License.
  12. ************************************************************************************/
  13. using UnityEngine;
  14. using System.Collections;
  15. using System.Threading;
  16. using VR = UnityEngine.VR;
  17. /// <summary>
  18. /// (Deprecated) Contains information about the user's preferences and body dimensions.
  19. /// </summary>
  20. public class OVRProfile : Object
  21. {
  22. [System.Obsolete]
  23. public enum State
  24. {
  25. NOT_TRIGGERED,
  26. LOADING,
  27. READY,
  28. ERROR
  29. };
  30. [System.Obsolete]
  31. public string id { get { return "000abc123def"; } }
  32. [System.Obsolete]
  33. public string userName { get { return "Oculus User"; } }
  34. [System.Obsolete]
  35. public string locale { get { return "en_US"; } }
  36. public float ipd { get { return Vector3.Distance (OVRPlugin.GetNodePose (OVRPlugin.Node.EyeLeft, OVRPlugin.Step.Render).ToOVRPose ().position, OVRPlugin.GetNodePose (OVRPlugin.Node.EyeRight, OVRPlugin.Step.Render).ToOVRPose ().position); } }
  37. public float eyeHeight { get { return OVRPlugin.eyeHeight; } }
  38. public float eyeDepth { get { return OVRPlugin.eyeDepth; } }
  39. public float neckHeight { get { return eyeHeight - 0.075f; } }
  40. [System.Obsolete]
  41. public State state { get { return State.READY; } }
  42. }