Class for orbital cameras.
More...
#include <camera.h>
|
| | Camera (QObject *parent, float minDist, float maxDist, float initDist=.0f, float initYaw=.0f, float initPitch=.0f) |
| | Constructs a new camera. More...
|
| |
| void | getViewMatrix (QMatrix4x4 &viewMatrix) |
| | Constructs the view matrix and returns it in viewMatrix. More...
|
| |
| void | getProjectionMatrix (QMatrix4x4 &projMatrix) |
| | Constructs the projection matrix and returns it in projMatrix. More...
|
| |
Class for orbital cameras.
◆ Camera()
| Camera::Camera |
( |
QObject * |
parent, |
|
|
float |
minDist, |
|
|
float |
maxDist, |
|
|
float |
initDist = .0f, |
|
|
float |
initYaw = .0f, |
|
|
float |
initPitch = .0f |
|
) |
| |
Constructs a new camera.
- Parameters
-
| parent | the parent object. |
| minDist | the minimum distance from the target. |
| maxDist | the maximum distance from the target. |
| initDist | the initial distance. |
| initYaw | the initial yaw angle. |
| initPitch | the initial pitch angle |
◆ getProjectionMatrix()
| void Camera::getProjectionMatrix |
( |
QMatrix4x4 & |
projMatrix | ) |
|
Constructs the projection matrix and returns it in projMatrix.
- Parameters
-
| projMatrix | returns the projection matrix. |
◆ getViewMatrix()
| void Camera::getViewMatrix |
( |
QMatrix4x4 & |
viewMatrix | ) |
|
Constructs the view matrix and returns it in viewMatrix.
- Parameters
-
| viewMatrix | returns the view matrix. |
◆ move
| void Camera::move |
( |
const QVector2D & |
offset | ) |
|
|
slot |
Offets the camera.
- Parameters
-
◆ rotateX
| void Camera::rotateX |
( |
float |
angle | ) |
|
|
slot |
Yaws the camera.
- Parameters
-
◆ rotateY
| void Camera::rotateY |
( |
float |
angle | ) |
|
|
slot |
Pitches the camera.
- Parameters
-
◆ setAspectRatio
| void Camera::setAspectRatio |
( |
float |
aspectRatio | ) |
|
|
slot |
Sets the aspect ratio for the perspective transform.
- Parameters
-
| aspectRatio | the aspect ratio. |
◆ setNearFarPlane
| void Camera::setNearFarPlane |
( |
float |
near, |
|
|
float |
far |
|
) |
| |
|
slot |
Sets the z values for the near and far plane respectively.
- Parameters
-
| near | the near plane. |
| far | the far plane. |
◆ zoom
| void Camera::zoom |
( |
float |
distance | ) |
|
|
slot |
Changes the distance of the camera.
- Parameters
-
| distance | the distance value |
The documentation for this class was generated from the following files: