22 lines
No EOL
519 B
C++
22 lines
No EOL
519 B
C++
module;
|
|
|
|
#include <cstdint>
|
|
#include "VulkanBuffer.h"
|
|
#include <vulkan/vulkan.h>
|
|
#include <iostream>
|
|
#include <format>
|
|
|
|
module Crafter.Graphics;
|
|
import Crafter.Math;
|
|
import Crafter.Event;
|
|
using namespace Crafter;
|
|
|
|
Camera::Camera(float fov, float aspectRatio, float near, float far) {
|
|
projection = MatrixRowMajor<float, 4, 4, 1>::Perspective(fov, aspectRatio, near, far);
|
|
view = MatrixRowMajor<float, 4, 4, 1>::Identity();
|
|
}
|
|
|
|
void Camera::Update() {
|
|
projectionView = projection*view;
|
|
onUpdate.Invoke();
|
|
} |