Files
Blitz/include/client/render/Camera.h
2024-03-12 11:31:04 +01:00

41 lines
670 B
C++

#pragma once
#include "blitz/game/Player.h"
#include "blitz/maths/Vector.h"
#include <cstdint>
namespace blitz {
namespace render {
class Camera {
private:
game::Player* m_Player;
Mat4f m_PerspectiveMatrix;
Vec2i m_LastWindowSize;
public:
Camera() : m_Player(nullptr) {}
~Camera() {}
void Update(float delta);
static float GetPlayerEyeHeight();
void SetAttachedPlayer(game::Player* a_Player) {
m_Player = a_Player;
}
const game::Player* GetAttachedPlayer() const {
return m_Player;
}
Mat4f GetViewMatrix() const;
const Mat4f& GetPerspectiveMatrix() const {
return m_PerspectiveMatrix;
}
};
} // namespace render
} // namespace blitz