Platform SDK: DirectX

Direct3DDevice7.GetClipPlane

The Direct3DDevice7.GetClipPlane method retrieves the coefficients of a user-defined clipping plane for the device.

object.GetClipPlane( _ 
  Index As Long, _ 
  a As Single, _ 
  b As Single, _ 
  c As Single, _ 
  d As Single)

Parameters

Index
Index of the clipping plane for which the plane equation coefficients are retrieved.
a, b, c, and d
Values that represent the coefficients of the clipping plane, in the form of the general plane equation. See remarks.

Error Codes

If the method fails, an error is raised and Err.Number may be set to DDERR_INVALIDPARAMS. This error indicates that the value in Index exceeds the maximum clipping plane index supported by the device.

Remarks

The coefficients that this method reports take the form of the general plane equation. The values in a, b, c, and d would fit into the general plane equation so that Ax + By + Cz + D = 0. A point with homogeneous coordinates (x, y, z, w) is visible in the half space of the plane if Ax + By + Cz + Dw >= 0. Points that exist on or behind the clipping plane are clipped from the scene.

The plane equation used by this method exists in world space and is set by a previous call to the Direct3DDevice7.SetClipPlane method.

See Also

Direct3DDevice7.SetClipPlane, D3DRENDERSTATE_CLIPPLANEENABLE, User-defined Clip Planes