#ifndef GLTEST_CAMERA_H
#define GLTEST_CAMERA_H

#include <glm/gtc/matrix_transform.hpp>
#include <glm/gtc/type_ptr.hpp>

class Camera {
private:
	float _viewDistance;
	glm::vec3 _eye, _at, _up;
    glm::mat4 _view;
    glm::mat4 _projection;

private:
    Camera();
    Camera(const Camera&) = delete;
    void operator=(const Camera&) = delete;
	void updateView();

public:
    static Camera* instance();
	void init();
	void turnLeft(float angle);
	void turnRight(float angle);
	void turnUp(float angle);
	void turnDown(float angle);
	void rotateCW(float angle);
	void rotateCCW(float angle);
	void moveToCenter(float distance);
	void moveFromCenter(float distance);
	void mouseMoveAroundCenter(float dx, float dy);

	void moveForward(float distance);
	void moveBackward(float distance);
};


#endif //GLTEST_CAMERA_H
