rpc 非线性方法

This commit is contained in:
nuknal
2024-08-30 17:01:33 +08:00
parent 78e95f331d
commit 19522db7c8
7 changed files with 158 additions and 79 deletions

View File

@@ -42,6 +42,10 @@ func CameraDirectionVec(u, v float64) []float64 {
directionVec[1] = (v - PANPixels/2) * PANCellSize / 1000.0 / 1000.0 // y方向, mm
directionVec[2] = -FocalLength / 1000.0 // z方向, mm
// deltaFOV := (FOV * math.Pi / 180) / PANPixels
// directionVec[1] = math.Tan((v - PANPixels/2) * deltaFOV)
// directionVec[2] = -1
// 归一化
// fmt.Printf("Direction Vector: (%.6f, %.6f, %.6f) \n", directionVec[0], directionVec[1], directionVec[2])
// directionVec = normalizeVec(directionVec)