RenderWare V2.1

Previous Page Index Next Page

RwCamera *

RwCreateCamera(RwInt32 maxwidth, RwInt32 maxheight,
RwRaster *raster);

Description

Creates a new camera.

Arguments

maxwidth Maximum width of the camera viewport (in device space units).

maxheight Maximum height of the camera viewport (in device space units).

raster Optional user raster defining an area of memory to be used for the cameras image buffer.

Return Value

A pointer to the new camera if successful, and NULL otherwise.

Comments

By default:

· The camera is positioned at the origin, looking down the negative Z axis (into the screen).

· The "Look Up" vector is the positive Y axis of the world space.

· The projection model is rwPERSPECTIVE.

· The viewport has a position of (0, 0) and a size of 0 by 0.

· The view window is centered about the origin of the camera space and has a size of CREAL(1.0) by CREAL(1.0).

· The view offset is (CREAL(0.0), CREAL(0.0)).

· The near (front) clipping plane is approximately CREAL(0.05) world space units from the camera.

· The far (back) clipping plane distance, in world space units from the camera, is a large value which depends on the numeric type of the library.

· The camera background color is black, i.e., [CREAL(0.0), CREAL(0.0), CREAL(0.0)].

· The backdrop raster is NULL.

· The backdrop offset is (0, 0).

· The backdrop viewport rectangle has a position of (0, 0) and a size of 0 by 0.

See Also

RwDestroyCamera()

RwDuplicateCamera()

RwResetCamera()

RwCreateUserRaster()

RwSetUserRasterParameters()