initial commit-moved from vulkan_guide
This commit is contained in:
31
src/scene/camera.h
Normal file
31
src/scene/camera.h
Normal file
@@ -0,0 +1,31 @@
|
||||
#pragma once
|
||||
|
||||
#include <core/vk_types.h>
|
||||
#include <SDL_events.h>
|
||||
|
||||
#include "glm/vec3.hpp"
|
||||
|
||||
class Camera {
|
||||
public:
|
||||
glm::vec3 velocity;
|
||||
glm::vec3 position;
|
||||
// vertical rotation
|
||||
float pitch { 0.f };
|
||||
// horizontal rotation
|
||||
float yaw { 0.f };
|
||||
|
||||
// Movement/look tuning
|
||||
float moveSpeed { 0.03f };
|
||||
float lookSensitivity { 0.0020f };
|
||||
bool rmbDown { false };
|
||||
|
||||
// Field of view in degrees for projection
|
||||
float fovDegrees { 70.f };
|
||||
|
||||
glm::mat4 getViewMatrix();
|
||||
glm::mat4 getRotationMatrix();
|
||||
|
||||
void processSDLEvent(SDL_Event& e);
|
||||
|
||||
void update();
|
||||
};
|
||||
Reference in New Issue
Block a user