|
Nebula
|
#include <camerasettings.h>
Public Member Functions | |
| CameraSettings () | |
| default constructor | |
| void | SetupPerspectiveFov (float fov, float aspect, float zNear, float zFar) |
| setup a perspective view volume | |
| void | SetupOrthogonal (float w, float h, float zNear, float zFar) |
| setup an orthogonal projection transform | |
| const Math::mat4 & | GetProjTransform () const |
| get projection matrix | |
| const Math::mat4 & | GetInvProjTransform () const |
| get the inverse projection matrix | |
| const Math::vec2 & | GetFocalLength () const |
| get focal length (computed from fov and aspect ratio) | |
| bool | IsPerspective () const |
| return true if this is a perspective projection | |
| bool | IsOrthogonal () const |
| return true if this is an orthogonal transform | |
| float | GetZNear () const |
| get near plane distance | |
| float | GetZFar () const |
| get far plane distance | |
| float | GetFov () const |
| get field-of-view (only if perspective) | |
| float | GetAspect () const |
| get aspect ration (only if perspective) | |
| float | GetNearWidth () const |
| get width of near plane | |
| float | GetNearHeight () const |
| get height of near plane | |
| float | GetFarWidth () const |
| get width of far plane | |
| float | GetFarHeight () const |
| get height of far plane | |
Private Attributes | |
| Math::mat4 | projMatrix |
| Math::mat4 | invProjMatrix |
| bool | isPersp |
| float | zNear |
| float | zFar |
| float | fov |
| float | aspect |
| float | nearWidth |
| float | nearHeight |
| float | farWidth |
| float | farHeight |
| Math::vec2 | focalLength |
| Graphics::CameraSettings::CameraSettings | ( | ) |
default constructor
|
inline |
get aspect ration (only if perspective)
|
inline |
get height of far plane
|
inline |
get width of far plane
|
inline |
get focal length (computed from fov and aspect ratio)
|
inline |
get field-of-view (only if perspective)
|
inline |
get the inverse projection matrix
|
inline |
get height of near plane
|
inline |
get width of near plane
|
inline |
get projection matrix
|
inline |
get far plane distance
|
inline |
get near plane distance
|
inline |
return true if this is an orthogonal transform
|
inline |
return true if this is a perspective projection
| void Graphics::CameraSettings::SetupOrthogonal | ( | float | w, |
| float | h, | ||
| float | zNear_, | ||
| float | zFar_ ) |
setup an orthogonal projection transform
Setup camera as orthogonal projection.
This method can be called before or after setting up the object. When the object is alive, an update message will be sent to the render-thread.
| void Graphics::CameraSettings::SetupPerspectiveFov | ( | float | fov_, |
| float | aspect_, | ||
| float | zNear_, | ||
| float | zFar_ ) |
setup a perspective view volume
Setup camera as perspective projection.
This method can be called before or after setting up the object. When the object is alive, an update message will be sent to the render-thread.
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |