updated makefile for supporting different target architectures
use "ARCH=arch_name make" restructured project folder, implementations and headers together under sources/
This commit is contained in:
42
sources/GL_STUFF/SCENE/Camera.hpp
Executable file
42
sources/GL_STUFF/SCENE/Camera.hpp
Executable file
@@ -0,0 +1,42 @@
|
||||
#pragma once
|
||||
#include <glm/gtc/type_ptr.hpp>
|
||||
class Camera {
|
||||
|
||||
public:
|
||||
glm::vec3 cameraPos;
|
||||
glm::vec3 cameraFront;
|
||||
glm::vec3 cameraUp;
|
||||
|
||||
Camera();
|
||||
Camera( glm::vec3 position, glm::vec3 front, glm::vec3 up);
|
||||
glm::mat4 getViewMat();
|
||||
glm::vec3 getPosition();
|
||||
//exp
|
||||
void alignTo( glm::vec3 direction);
|
||||
void setPosition( glm::vec3 pos);
|
||||
};
|
||||
|
||||
class CameraController {
|
||||
|
||||
private:
|
||||
Camera *camera;
|
||||
float cameraSpeed = 0.5f;
|
||||
bool mouseUnlocked = true;
|
||||
float lastX;
|
||||
float lastY;
|
||||
float PHI = 0.0;
|
||||
float THETA = 270.0;
|
||||
unsigned int windowLeft;
|
||||
unsigned int windowTop;
|
||||
unsigned int windowWidth;
|
||||
unsigned int windowHeight;
|
||||
|
||||
public:
|
||||
CameraController(Camera *cam);
|
||||
Camera* getCamera();
|
||||
void setWindowData(int left, int width, int top, int height);
|
||||
void mouseMotion(int cursorX, int cursorY);
|
||||
void keyPress(unsigned char key);
|
||||
void panX( float deltaX);
|
||||
void panY( float deltaY);
|
||||
};
|
||||
Reference in New Issue
Block a user