This commit is contained in:
Jorijn van der Graaf 2025-06-14 01:45:33 +02:00
commit 53df70b4f1
70 changed files with 108 additions and 11285 deletions

View file

@ -28,22 +28,19 @@ import Crafter.Math;
import Crafter.Event;
namespace Crafter {
/**
* @brief 3D camera with projection and view matrices
* @example examples/VulkanCube/main.cpp
*/
export class Camera {
public:
MatrixRowMajor<float, 4, 4, 1> projection;
MatrixRowMajor<float, 4, 4, 1> view;
MatrixRowMajor<float, 4, 4, 1> projectionView;
Event<void> onUpdate;
/**
* @brief Constructs a camera.
* @param fov Field of view in radians.
* @param aspectRatio Aspect ratio of the camera (width / height).
* @param near Near clipping plane.
* @param far Far clipping plane.
* @example examples/VulkanCube/main.cpp
*/
Camera(float fov, float aspectRatio, float near, float far);