Microsoft DirectX 8.1 (Visual Basic)

D3DXMatrixShadow

Builds a matrix that projects geometry into a plane, as if casting a shadow from a light. See Remarks.

D3DXMatrixShadow( _ 
    MOut As D3DMATRIX, _ 
    VLight As D3DVECTOR4, _ 
    Plane As D3DPLANE)

Parameters

MOut
D3DMATRIX type that is the result of the operation, a matrix that projects geometry into a plane. See Remarks.
VLight
D3DVECTOR4 type describing the light's position.
Plane
The source D3DPLANE type.

Error Codes

If the function fails, an error is raised and Err.Number can be set to one of the following values.

D3DERR_INVALIDCALL
D3DERR_OUTOFVIDEOMEMORY

For information on trapping errors, see the Microsoft® Visual Basic® Error Handling topic.

Remarks

The D3DXMatrixShadow function builds a matrix that projects geometry into a plane. If Vlight.w is 0, then the ray from the origin to Vlight represents a directional light. If it is 1, then Vlight represents a point light.