MCPcopy Create free account
hub / github.com/WolfireGames/overgrowth / GetPerspectiveMatrix

Method GetPerspectiveMatrix

Source/Graphics/camera.cpp:351–360  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

349}
350
351mat4 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
363void Camera::SetFOV(const float degrees) {

Callers

nothing calls this directly

Calls 3

GetAspectRatioFunction · 0.85
VertFOVFromHorzFunction · 0.85

Tested by

no test coverage detected