-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathFlyingCamera.h
37 lines (30 loc) · 1.04 KB
/
FlyingCamera.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
#pragma once
#include "Camera.h"
///////////////////////////////////////////////////////////////////////////
// CLASE FLYINGCAMERA //
class FlyingCamera : public Camera {
private:
int mouseX; //Posición X del mouse
int mouseY; //Posición Y del mouse
char state; //Estado de la cámara (a - libre / f - fija / m - móvil)
public:
//Constructores
FlyingCamera();
FlyingCamera(int id, const Vector3D& pos, const Vector3D& orientation);
FlyingCamera(int id, float& x, float& y, float& z);
//Getters
inline float getMouseX() const;
inline float getMouseY() const;
char getState() const;
//Setters
inline void setMouseY(const int& mouseY);
inline void setMouseX(const int& mouseX);
void setState(const char c);
//Métodos de movimiento
void processMouseMovement(const int& x, const int& y);
void processMouseClick(const int& button, const int& state, const int& x, const int& y);
void processKeyPressed(unsigned char key, int px, int py);
//Otros métodos
void render();
void update(const float& time, const Vector3D& direction) override;
};