The Nebula Device 3: Shared::CameraSettings Class Reference

The Nebula Device 3

Shared::CameraSettings Class Reference

#include <camerasettings.h>


Detailed Description

Wraps camera settings into an object.

(C) 2009 Radon Labs GmbH

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
void UpdateViewMatrix (const Math::matrix44 &m)
 update view matrix
const Math::matrix44GetProjTransform () const
 get projection matrix
const Math::matrix44GetInvProjTransform () const
 get the inverse projection matrix
const Math::matrix44GetViewTransform () const
 get view transform (inverse transform)
const Math::matrix44GetViewProjTransform () const
 get view projection matrix (non-const!)
const Math::frustumGetViewFrustum () const
 get view frustum
const Math::float2GetFocalLength () 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

Member Function Documentation

void Shared::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.

void Shared::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.