WIP crafter.math

This commit is contained in:
Jorijn van der Graaf 2025-05-04 05:15:31 +02:00
commit 84099f07ed
11 changed files with 139 additions and 310 deletions

View file

@ -1,26 +1,18 @@
module;
#include <cstdint>
#define GLM_FORCE_RADIANS
#define GLM_FORCE_DEPTH_ZERO_TO_ONE
#define GLM_ENABLE_EXPERIMENTAL
#include <glm/glm.hpp>
#include <glm/gtc/matrix_transform.hpp>
#include <glm/gtc/matrix_inverse.hpp>
#include <glm/gtc/type_ptr.hpp>
#include "VulkanBuffer.h"
#include "camera.hpp"
export module Crafter.Graphics:Camera;
import :VulkanBuffer;
import Crafter.Component;
import Crafter.Math;
namespace Crafter {
export class Camera : public Component {
public:
glm::mat4 projection;
glm::mat4 view;
glm::mat4 projectionView;
Camera();
Matrix<float, 4, 4, 1> projection;
Matrix<float, 4, 4, 1> view;
Matrix<float, 4, 4, 1> projectionView;
Camera(float fov, float aspectRatio, float near, float far);
};
}