managed old tutorial implementation with classes.
Bugs: nothing is displayed
This commit is contained in:
44
MshViewer/Header/Camera.h
Normal file
44
MshViewer/Header/Camera.h
Normal file
@@ -0,0 +1,44 @@
|
||||
#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);
|
||||
|
||||
|
||||
};
|
||||
Reference in New Issue
Block a user