summaryrefslogtreecommitdiff
path: root/src/gui/Camera.h
blob: 8ea35d08c4bb67c7bd3ae482cd1dfb217dfa3171 (plain) (blame)
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
/*
 * Camera.h
 *
 *  Created on: Mar 31, 2011
 *      Author: jakob
 */

#ifndef CAMERA_H_
#define CAMERA_H_
#include <cmath>
#include <QtOpenGL>
#include "Vector3D.h"

namespace vhc {

class Camera {

private:
	Vector3D position; //from position
	Vector3D direction; //to position + direction
	Vector3D up;

	double heading; //left/right
	double pitch; //up/down

public:

	Camera();
	virtual ~Camera() {};

	void setView();

	void addHeading(double h);

	void addPitch(double h);


	void move(const Vector3D& moveVector);

	Vector3D getPosition() const;
	double getHeading() const;
	double getPitch() const;

};

}
#endif /* CAMERA_H_ */