44 lines
638 B
C
44 lines
638 B
C
|
#pragma once
|
||
|
#include <gl\glew.h>
|
||
|
#include <gl\glfw3.h>
|
||
|
#include <glm\glm.hpp>
|
||
|
|
||
|
class Camera
|
||
|
{
|
||
|
public:
|
||
|
Camera(int width, int height);
|
||
|
~Camera();
|
||
|
|
||
|
private:
|
||
|
float fFOV;
|
||
|
float fMinView;
|
||
|
float fMaxView;
|
||
|
|
||
|
int iWidth;
|
||
|
int iHeight;
|
||
|
|
||
|
double dTranslationX;
|
||
|
double dTranslationY;
|
||
|
double dTranslationZ;
|
||
|
|
||
|
|
||
|
glm::mat4 m4x4Projection;
|
||
|
glm::mat4 m4x4View;
|
||
|
|
||
|
private:
|
||
|
void updateMatrices();
|
||
|
|
||
|
public:
|
||
|
glm::mat4 getMatrix();
|
||
|
|
||
|
void setFOV(float fov);
|
||
|
void setMinView(float distance);
|
||
|
void setMaxView(float distance);
|
||
|
void setSize(int width, int height);
|
||
|
|
||
|
void add2x(double value);
|
||
|
void add2y(double value);
|
||
|
void add2z(double value);
|
||
|
|
||
|
|
||
|
};
|