Microsoft DirectX 8.1 (Visual Basic)

D3DXPlaneDotNormal

Computes the dot-product of a plane and a 3-D vector. The w parameter of the vector is assumed to be 0.

D3DXPlaneDotNormal( _ 
    P1 As D3DPLANE, _ 
    V As D3DVECTOR) As Single 

Parameters

P1
A source D3DPLANE type.
V
A source D3DVECTOR type.

Return Values

The dot-product of the plane and 3-D vector.

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

Given a plane (a, b, c, d) and a 3-D vector (x, y, z) the return value of this function is a*x + b*y + c*z + d*0. The D3DXPlaneDotNormal function is useful for figuring out the angle between the normal of the plane, and another normal.

See Also

D3DXPlaneDot, D3DXPlaneDotCoord