camera notify

This commit is contained in:
2025-07-16 12:54:50 +02:00
parent aaf76a3ff0
commit 1bee6aed9c
8 changed files with 69 additions and 24 deletions

View File

@@ -1,11 +1,20 @@
#pragma once
#include <td/Maths.h>
#include <td/misc/ObjectNotifier.h>
namespace td {
namespace render {
class Camera {
class ICameraListener {
public:
virtual void OnPerspectiveChange() {}
virtual void OnViewChange() {}
};
using CameraNotifier = utils::ObjectNotifier<ICameraListener>;
class Camera : public CameraNotifier {
private:
Mat4f m_ViewMatrix;
Mat4f m_ProjectionMatrix;