vktutorial/hk_camera.hpp

24 lines
578 B
C++
Raw Normal View History

2025-12-15 20:37:01 +08:00
#pragma once
// libs
#define GLM_FORCE_RADIANS
#define GLM_FORCE_DEPTH_ZERO_TO_ONE
#include <glm/glm.hpp>
namespace hk
{
class Camera
{
public:
Camera() = default;
~Camera() = default;
void setOrthographicProjection(float left, float right, float top, float bottom, float near, float far);
void setPerspectiveProjection(float fovY, float aspect, float near, float far);
const glm::mat4& getProjection() const { return m_projectionMatrix; }
private:
glm::mat4 m_projectionMatrix{1.0f};
};
} // namespace hk