(p: Vec2, i: CameraIntrinsics)
| 827 | |
| 828 | // Mirrors distortFOV(). |
| 829 | function _glslFOV(p: Vec2, i: CameraIntrinsics): Vec2 { |
| 830 | const r = Math.hypot(p.x, p.y); |
| 831 | if (r < 0.00001 || Math.abs(i.omega) < 0.00001) return { x: p.x, y: p.y }; |
| 832 | const rd = Math.atan(r * 2.0 * Math.tan(i.omega / 2.0)) / i.omega; |
| 833 | const factor = rd / r - 1.0; |
| 834 | return { x: p.x + p.x * factor, y: p.y + p.y * factor }; |
| 835 | } |
| 836 | |
| 837 | // Mirrors distortThinPrismFisheye() — covers all fisheye-class sub-models. |
| 838 | function _glslThinPrismFisheye(p: Vec2, i: CameraIntrinsics): Vec2 { |
no outgoing calls
no test coverage detected