31 void activatePerspective(
float aspect = 1.0f,
float fovy = 90.0f,
float zNear = 0.1f,
float zFar = 100.0f);
40 void activateOrthographic(
float aspect = 1.0f,
float yWidth = 2.0f,
float zNear = 0.1f,
float zFar = 100.0f);
41 void setPos(QVector3D &pos)
override;
42 void setPos(
float x,
float y,
float z)
override;
83 void rotate(
float deg_x,
float deg_y);
92 void move(
float up,
float right);
119 QMatrix4x4 viewMat, projectionMat, vpMat, invProjMat;
120 QVector3D viewTarget;
121 float pointSizeCoeff;
123 void updateViewMat();
125 void getAngles(
float &hor,
float &vert,
float *viewVecLength = 0);
QVector3D getViewTarget()
Returns the location of the camera's view target.
Definition: camera.cpp:132
float z
The z coordinate of the entity's location.
Definition: entity.h:13
void rotate(float deg_x, float deg_y)
Rotates the camera.
Definition: camera.cpp:35
QMatrix4x4 & getVMat()
Returns a link to the view matrix.
Definition: camera.cpp:69
void setTarget(QVector3D &target)
Changes the view target location.
Definition: camera.cpp:60
float & getPointSizeCoeff()
Returns a pointer to the pointSizeCoeff.
Definition: camera.cpp:51
void move(float up, float right)
Moves the camera.
Definition: camera.cpp:96
void setPos(QVector3D &pos) override
Changes the entity's location.
Definition: camera.cpp:30
This class provides camera functionality.
Definition: camera.h:13
float y
The y coordinate of the entity's location.
Definition: entity.h:12
An element with a location in 3-dimensional space.
Definition: entity.h:9
Camera()
Creates a new camera.
Definition: camera.cpp:6
void activateOrthographic(float aspect=1.0f, float yWidth=2.0f, float zNear=0.1f, float zFar=100.0f)
Switches the camera into orthographic mode. NOT SUPPORTED!
Definition: camera.cpp:22
float x
The x coordinate of the entity's location.
Definition: entity.h:11
QVector3D getViewDependentMoveVector(float up, float right)
Transforms a vector from view space to world space.
Definition: camera.cpp:118
QMatrix4x4 & getInvProjMat()
Returns a link to the inverse projection matrix.
Definition: camera.cpp:73
void activatePerspective(float aspect=1.0f, float fovy=90.0f, float zNear=0.1f, float zFar=100.0f)
Switches the camera into perspective mode.
Definition: camera.cpp:13
QMatrix4x4 & getVpMat()
Returns a link to the view projection matrix.
Definition: camera.cpp:65