Torque3D Documentation / _generateds / SceneCameraState

SceneCameraState

Engine/source/scene/sceneCameraState.h

An object that combines all the state that is relevant to looking into the scene from a particular point of view.

More...

Protected Attributes

The viewing frustum.

Actual head position (will be - eye pos)

The projection matrix.

World-space vector representing the view direction.

The screen-space viewport rectangle.

The inverse of the frustum's transform stored here for caching.

Protected Functions

Internal constructor.

Public Functions

SceneCameraState(const RectI & viewport, const Frustum & frustum, const MatrixF & worldView, const MatrixF & projection)

Freeze the given viewing state.

Return the camera frustum.

Returns the world->view transform for the head (used to calculate various display metrics)

Return the projection transform.

Return the world-space view vector.

Return the screen-space viewport rectangle.

Return the view position. This is a shortcut for getFrustum().getPosition().

Return the view->world transform. This is a shortcut for getFrustum().getTransform().

Return the world->view transform.

Public Static Functions

Capture the view state from the current GFX state.

Detailed Description

An object that combines all the state that is relevant to looking into the scene from a particular point of view.

Protected Attributes

Frustum mFrustum 

The viewing frustum.

MatrixF mHeadWorldViewMatrix 

Actual head position (will be - eye pos)

MatrixF mProjectionMatrix 

The projection matrix.

Point3F mViewDirection 

World-space vector representing the view direction.

RectI mViewport 

The screen-space viewport rectangle.

MatrixF mWorldViewMatrix 

The inverse of the frustum's transform stored here for caching.

Protected Functions

SceneCameraState()

Internal constructor.

Public Functions

SceneCameraState(const RectI & viewport, const Frustum & frustum, const MatrixF & worldView, const MatrixF & projection)

Freeze the given viewing state.

Parameters:

viewport

Screen-space viewport rectangle.

frustum

Camera frustum.

worldView

World->view matrix.

projection

Projection matrix.

getFrustum()

Return the camera frustum.

getHeadWorldViewMatrix()

Returns the world->view transform for the head (used to calculate various display metrics)

getProjectionMatrix()

Return the projection transform.

getViewDirection()

Return the world-space view vector.

getViewport()

Return the screen-space viewport rectangle.

getViewPosition()

Return the view position. This is a shortcut for getFrustum().getPosition().

getViewWorldMatrix()

Return the view->world transform. This is a shortcut for getFrustum().getTransform().

getWorldViewMatrix()

Return the world->view transform.

Public Static Functions

fromGFX()

Capture the view state from the current GFX state.

fromGFXWithViewport(const RectI & viewport)