-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathlookatcamera.h
34 lines (26 loc) · 908 Bytes
/
lookatcamera.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
#ifndef TAK_LOOKATCAMERA_H__
#define TAK_LOOKATCAMERA_H__
#include "camera.h"
#include "vector3.h"
class LookAtCamera : public Camera
{
public:
LookAtCamera(const Vector3f& lookAtPosition, float distance, float initialRotationX = -45.f, float initialRotationY = 0);
virtual ~LookAtCamera();
virtual void Update(float elapsedTime);
virtual void MouseMoveEvent(int x, int y);
virtual void MousePressEvent(const MOUSE_BUTTON &button, int x, int y);
virtual void MouseReleaseEvent(const MOUSE_BUTTON &button, int x, int y);
float GetRotationX() const;
float GetRotationY() const;
private:
Vector3f m_lookAt;
float m_distance;
float m_rotationX;
float m_rotationY;
bool m_rotate;
bool m_zoom;
int m_lastMousePosX;
int m_lastMousePosY;
};
#endif // TAK_LOOKATCAMERA_H__