summaryrefslogtreecommitdiff
path: root/tools/playground/camera.h
blob: 8a0315dbbd8f1b5dd5614a0a81247a376e4d0b1b (plain)
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
class Camera
{
public:
	rw::Camera *m_rwcam;
	rw::V3d m_position;
	rw::V3d m_target;
	rw::V3d m_up;
	rw::V3d m_localup;

	float m_fov, m_aspectRatio;
	float m_near, m_far;


	void setTarget(rw::V3d target);
	float getHeading(void);

	void turn(float yaw, float pitch);
	void orbit(float yaw, float pitch);
	void dolly(float dist);
	void zoom(float dist);
	void pan(float x, float y);

	void update(void);
	float distanceTo(rw::V3d v);
	Camera(void);
};