DirectX SDK |
The Direct3DDevice7.SetClipPlane method sets the coefficients of a user-defined clipping plane for the device.
object.SetClipPlane( _ Index As Long, _ a As Single, _ b As Single, _ c As Single, _ d As Single)
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.
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.
This method does not enable the clipping plane equation being set. To enable a clipping plane, use the D3DRENDERSTATE_CLIPPLANEENABLE render state.
Direct3DDevice7.GetClipPlane, D3DRENDERSTATE_CLIPPLANEENABLE, User-defined Clip Planes