Crafter.Graphics/Crafter.Graphics-Camera.cpp

15 lines
424 B
C++
Raw Normal View History

2025-04-26 23:05:11 +02:00
module;
#include <cstdint>
#include "VulkanBuffer.h"
#include <vulkan/vulkan.h>
module Crafter.Graphics;
2025-05-04 05:15:31 +02:00
import Crafter.Math;
2025-04-26 23:05:11 +02:00
using namespace Crafter;
2025-05-04 05:15:31 +02:00
Camera::Camera(float fov, float aspectRatio, float near, float far) {
projection = Matrix<float, 4, 4, 1>::Projection(fov, aspectRatio, near, far);
view = Matrix<float, 4, 4, 1>::Idenity();
2025-04-27 22:16:56 +02:00
projectionView = camera.matrices.perspective*camera.matrices.view;
2025-04-26 23:05:11 +02:00
}