Blowbox 2017
A 3D Game Engine by Riko Ophorst using DirectX 12
perspective_camera.h
1 #pragma once
2 
3 #include "renderer/cameras/camera.h"
4 
5 namespace blowbox
6 {
13  class PerspectiveCamera : public Camera
14  {
15  public:
18 
23  void SetFovRadians(float fov_in_radians);
24 
29  void SetFovDegrees(float fov_in_degrees);
30 
32  float GetFOVRadians() const;
34  float GetFOVDegrees() const;
35 
36  protected:
38  void UpdateProjectionMatrix() override;
39 
40  protected:
42  };
43 }
A camera with perspective projection, useful for 3D stuff.
Definition: perspective_camera.h:13
A camera through which the scene is rendered.
Definition: camera.h:13
void SetFovDegrees(float fov_in_degrees)
Sets the field of view for the camera in degrees.
Definition: perspective_camera.cc:29
float fov_in_radians_
The field of view of the camera in radians.
Definition: perspective_camera.h:41
void SetFovRadians(float fov_in_radians)
Sets the field of view for the camera in radians.
Definition: perspective_camera.cc:22
void UpdateProjectionMatrix() override
(Re)-calculates the projection matrix of the camera.
Definition: perspective_camera.cc:48
The main Blowbox namespace.
Definition: image.cc:8
float GetFOVDegrees() const
Definition: perspective_camera.cc:42
float GetFOVRadians() const
Definition: perspective_camera.cc:36