-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCamera.h
More file actions
33 lines (24 loc) · 766 Bytes
/
Camera.h
File metadata and controls
33 lines (24 loc) · 766 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
#ifndef OPENGLRAND_CAMERA_H
#define OPENGLRAND_CAMERA_H
#include "glad/glad.h"
#include <GLFW/glfw3.h>
#include <glm/glm.hpp>
#include <glm/gtc/matrix_transform.hpp>
#include <glm/gtc/type_ptr.hpp>
#include <glm/gtx/rotate_vector.hpp>
#include <glm/gtx/vector_angle.hpp>
#include "Shader.h"
class Camera {
public:
glm::vec3 cameraPos;
glm::vec3 Orientation = glm::vec3(0.0f, 0.0f, -1.0f);
glm::vec3 Up = glm::vec3(0.0f, 1.0f, 0.0f);
int width;
int height;
float speed = 0.1f;
float sensitivity = 100.0f;
Camera(int height, int width, glm::vec3 position);
void Matrix(float FOVdeg, float nearPlane, float farPlane, Shader& shader, const char* uniform);
void Inputs(GLFWwindow* window);
};
#endif //OPENGLRAND_CAMERA_H