mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-10 05:21:49 +00:00
Add files via upload
This commit is contained in:
commit
e1cdcf01e9
49 changed files with 2866 additions and 0 deletions
32
src/window/Camera.h
Normal file
32
src/window/Camera.h
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
/*
|
||||
* Camera.h
|
||||
*
|
||||
* Created on: Feb 11, 2020
|
||||
* Author: MihailRis
|
||||
*/
|
||||
|
||||
#ifndef WINDOW_CAMERA_H_
|
||||
#define WINDOW_CAMERA_H_
|
||||
|
||||
#include <glm/glm.hpp>
|
||||
using namespace glm;
|
||||
|
||||
class Camera {
|
||||
void updateVectors();
|
||||
public:
|
||||
vec3 front;
|
||||
vec3 up;
|
||||
vec3 right;
|
||||
|
||||
vec3 position;
|
||||
float fov;
|
||||
mat4 rotation;
|
||||
Camera(vec3 position, float fov);
|
||||
|
||||
void rotate(float x, float y, float z);
|
||||
|
||||
mat4 getProjection();
|
||||
mat4 getView();
|
||||
};
|
||||
|
||||
#endif /* WINDOW_CAMERA_H_ */
|
||||
Loading…
Add table
Add a link
Reference in a new issue