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