Zhonghui

每个不曾起舞的日子,都是对生命的辜负

User Tools

Site Tools


程序:计算机图形学:摄像机

Table of Contents

摄像机


FOV

横纵转换

public static double FovH2V(double H, double AR)
{
    return Mathf.Rad2Deg * 2 * System.Math.Atan(System.Math.Tan(Mathf.Deg2Rad * H * 0.5) / AR);
}
 
public static double FovV2H(double V, double AR)
{
    return Mathf.Rad2Deg * 2 * System.Math.Atan(System.Math.Tan(Mathf.Deg2Rad * V * 0.5) * AR);
}
 
double aspectRatio = 1920.0 / 1080.0;
 
// VerticalFov by Default
double hFov = FovV2H(m_MainCamera.fieldOfView, aspectRatio);
/var/www/DokuWikiStick/dokuwiki/data/pages/程序/计算机图形学/摄像机.txt · Last modified: 2023/04/27 02:04 by zh