RenderWare V2.1

Previous Page Index Next Page

RwCamera *

RwSetCameraViewOffset(RwCamera *camera, RwReal x, RwReal y);

Description

Sets the camera’s view offset, thereby shearing the view volume.

Arguments

camera Pointer to the camera.

x View offset displacement in the direction of the camera’s "Look Right" vector (in world space units).

y View offset displacement in the direction of the camera’s "Look Up" vector (in world space units).

Return Value

The argument camera if successful, and NULL otherwise.

Comments

The X and Y offsets are measured in world space units in a plane passing through the camera position and parallel to the view window, in the directions of the camera’s "Look Right" and "Look Up" vectors respectively. For a perspective view, this moves the apex of the view pyramid whilst its edges remain fixed to the corners of the view window. For a parallel view, this shears the view parallelepiped whilst its edges remain fixed to the corners of the view window.

Successive calls to RwSetCameraViewOffset() specify the offset as absolute values from the initial unsheared camera position; successive offsets are not accumulated as relative displacements.

See Also

RwGetCameraViewOffset()

RwResetCamera()