Ejemplo n.º 1
0
    /// <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);
    }
Ejemplo n.º 2
0
    /// <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);
    }
Ejemplo n.º 3
0
    /// <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);
    }