5 #define M_PI 3.14159265358979323846 22 void buildViewMatrix(
void);
24 void buildProjectionMatrix(
void);
28 void rotateAzimuth(
float t);
30 void rotatePolar(
float t);
32 void moveLeft(
float t);
34 void moveRight(
float t);
36 void moveForwards(
float t);
38 void moveBackwards(
float t);
42 void moveDown(
float t);
44 void rotateUp(
float t);
46 void rotateDown(
float t);
48 void rotateLeft(
float t);
50 void rotateRight(
float t);
52 void setOrthogonalBorders(
float left,
float right,
float top,
float bottom);
54 glm::vec3 getUp() {
return mUp; };
56 glm::vec3 getRight() {
57 glm::vec4 a = glm::inverse(mViewMatrix)[0];
61 glm::vec3 getTarget() {
return mTarget; };
63 glm::vec3 getPosition() {
return mPos; };
65 bool isOrthogonal() {
return mOrthogonal; };
67 float getFieldOfView() {
return mFieldOfView; };
69 void setOrthogonal(
bool orthogonal) { mOrthogonal = orthogonal; };
71 void setUp(glm::vec3 &up) { mUp = up; };
73 void setTarget(glm::vec3 &target) { mTarget = target; };
75 void setFieldOfView(
float fieldOfView) { mFieldOfView = fieldOfView; };
77 void setNearPlane(
float nearPlane) { mNear = nearPlane; };
79 void setFarPlane(
float farPlane) { mFar = farPlane; buildProjectionMatrix(); };
81 float getNearPlane() {
return mNear; };
83 float getFarPlane() {
return mFar; };
85 void setAspect(
float aspect) { mAspect = aspect; buildProjectionMatrix();};
87 const glm::mat4 & getViewMatrix() {
return mViewMatrix; };
89 const glm::mat4 & getProjectionMatrix() {
return mProjectionMatrix; };
93 glm::mat4 mViewMatrix;
94 glm::mat4 mProjectionMatrix;
Camera class.
Definition: camera.h:12