Platform SDK: DirectX

DirectX7.ProjectionMatrix

The DirectX7.ProjectionMatrix method sets the near and far clipping planes and the field of view angle.

object.ProjectionMatrix(mDest As D3DMATRIX, _
    nearPlane As Single, _
    farPlane As Single, _
    fov As Single)

Parameters

object
Object expression that resolves to a DirectX7 object.
mDest
Newly created projection matrix.
nearPlane
The distance to the near clipping plane. Units are application specific.
farPlane
The distance to the far clipping plane. Units are application specific.
fov
The field of view angle, in radians.

Error Codes

If the method fails, an error is raised and Err.Number is set.

Remarks

The fov can be determined by drawing a line from the middle of the projector to the middle of the front clipping plane and a line from the middle of the projector to the top of the front clipping plane and doubling the resulting angle.