/// <summary> /// Calculates the aspect ratio. /// </summary> /// <returns>The aspect ratio.</returns> public float CalculateAspectRatio() { int resH = 0; int resV = 0; float fovH = 0; float fovV = 0; OVRDevice.GetImageInfo(ref resH, ref resV, ref fovH, ref fovV); return((float)resH / (float)resV); }
/// <summary> /// Call this in CameraController to set up the ideal FOV as /// defined by the SDK /// </summary> /// <returns>The ideal FOV.</returns> public float GetIdealVFOV() { int resH = 0; int resV = 0; float fovH = 0; float fovV = 0; OVRDevice.GetImageInfo(ref resH, ref resV, ref fovH, ref fovV); return(fovV); }
/// <summary> /// Gets the ideal resolution. /// </summary> /// <returns>The ideal resolution.</returns> public void GetIdealResolution(ref int w, ref int h) { float fovH = 0; float fovV = 0; OVRDevice.GetImageInfo(ref w, ref h, ref fovH, ref fovV); }