Microsoft DirectX 8.1 (Visual Basic)

D3DXPlaneDotCoord

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

D3DXPlaneDotCoord( _ 
    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*1. The D3DXPlaneDotCoord function is useful for determining the plane's relationship with a coordinate in 3-D space.

See Also

D3DXPlaneDot, D3DXPlaneDotNormal