-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCamera.h
49 lines (39 loc) · 1.56 KB
/
Camera.h
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#ifndef _Camera_H_
#define _Camera_H_
// Includes
#include <memory>
#include "GLInclude.h"
////////////////////////////////////////////////////////////////////////////////
/// @brief Camera for scene
////////////////////////////////////////////////////////////////////////////////
class Camera {
private:
float theta{0.f}; //< Theta for rotation
float phi{0.f}; //< Phi for rotation
float radius{10.f}; //< Radius of rotation
public:
////////////////////////////////////////////////////////////////////////////
/// @brief Constructor for camera class
Camera();
////////////////////////////////////////////////////////////////////////////
/// @brief Draws camera at location and rotation
void Draw();
////////////////////////////////////////////////////////////////////////////
/// @brief Setup for camera
/// @param ifs Input stream to read camera data
void setup(std::ifstream& ifs);
////////////////////////////////////////////////////////////////////////////
/// @brief Check for special key pressed
/// @param _key ID of key pressed
/// @param _x X cord of mouse
/// @param _y Y cord of mouse
bool specialKeyPressed(GLint _key, GLint _x, GLint _y);
////////////////////////////////////////////////////////////////////////////
/// @brief Check for regular key pressed
/// @param _key ID of key pressed
/// @param _x X cord of mouse
/// @param _y Y cord of mouse
bool keyPressed (GLubyte _key, GLint _x, GLint _y);
glm::mat4 getViewMatrix() const; //< View matrix for shaders
};
#endif