Added default fov to camera

This commit is contained in:
WSAL Evan
2025-11-07 09:18:23 -05:00
parent b11f354b29
commit 258cb41343
2 changed files with 6 additions and 6 deletions
+2 -2
View File
@@ -8,8 +8,8 @@ namespace WillowVox
class Camera
{
public:
Camera(glm::vec3 position = glm::vec3(0.0f, 0.0f, 0.0f), glm::vec3 direction = glm::vec3(0, -90.0f, 0));
Camera(float posX, float posY, float posZ, float roll, float pitch, float yaw);
Camera(glm::vec3 position = glm::vec3(0.0f, 0.0f, 0.0f), glm::vec3 direction = glm::vec3(0, -90.0f, 0), float fov = 70.0f);
Camera(float posX, float posY, float posZ, float roll, float pitch, float yaw, float fov = 70.0f);
glm::vec3 Front();
glm::vec3 Right();
+4 -4
View File
@@ -2,15 +2,15 @@
namespace WillowVox
{
Camera::Camera(glm::vec3 position, glm::vec3 direction)
: m_window(Window::GetInstance()), m_position(position), m_direction(direction)
Camera::Camera(glm::vec3 position, glm::vec3 direction, float fov)
: m_window(Window::GetInstance()), m_position(position), m_direction(direction), m_fov(fov)
{
}
// constructor with scalar values
Camera::Camera(float posX, float posY, float posZ, float roll, float pitch, float yaw)
: m_window(Window::GetInstance())
Camera::Camera(float posX, float posY, float posZ, float roll, float pitch, float yaw, float fov)
: m_window(Window::GetInstance()), m_fov(fov)
{
m_position = glm::vec3(posX, posY, posZ);
m_direction = glm::vec3(pitch, yaw, roll);