| 349 | } |
| 350 | |
| 351 | mat4 Camera::GetPerspectiveMatrix() const { |
| 352 | float aspect_ratio = GetAspectRatio(); |
| 353 | mat4 matrix; |
| 354 | if (flexible_fov) { |
| 355 | matrix.SetPerspectiveInfinite(VertFOVFromHorz(target_horz_fov, aspect_ratio), aspect_ratio, near_plane, far_plane); |
| 356 | } else { |
| 357 | matrix.SetPerspectiveInfinite(target_horz_fov, aspect_ratio, near_plane, far_plane); |
| 358 | } |
| 359 | return matrix; |
| 360 | } |
| 361 | |
| 362 | // Set the camera field of view |
| 363 | void Camera::SetFOV(const float degrees) { |
nothing calls this directly
no test coverage detected