ClipStatusFlags Enumeration (Microsoft.DirectX.Direct3D)

Defines the current clip status.

Definition

Visual Basic Public Enum ClipStatusFlags
C# public enum ClipStatusFlags
C++ public enum class ClipStatusFlags
JScript public enum ClipStatusFlags

Members

Member Value Description
Back 32 All vertices are clipped by the back plane of the viewing frustum.
Front 16 All vertices are clipped by the front plane of the viewing frustum.
Plane5 2048 All vertices are clipped by the application-defined clipping plane.
Plane4 1024 All vertices are clipped by the application-defined clipping plane.
Plane3 512 All vertices are clipped by the application-defined clipping plane.
Plane2 256 All vertices are clipped by the application-defined clipping plane.
Plane1 128 All vertices are clipped by the application-defined clipping plane.
Plane0 64 All vertices are clipped by the application-defined clipping plane.
All 4095 Combination of all clip flags.
Bottom 8 All vertices are clipped by the bottom plane of the viewing frustum.
Top 4 All vertices are clipped by the top plane of the viewing frustum.
Right 2 All vertices are clipped by the right plane of the viewing frustum.
Left 1 All vertices are clipped by the left plane of the viewing frustum.

Remarks

When clipping is enabled during vertex processing (by Device.ProcessVertices, Device.DrawPrimitives, or other drawing functions), Microsoft Direct3D computes a clip code for every vertex. The clip code is a combination of ClipStatusFlags. When a vertex is outside a particular clipping plane, the corresponding bit is set in the clip code. Direct3D maintains the clip status using ClipStatus, which has ClipIntersection and ClipUnion properties. ClipUnion is a bitwise OR of all vertex clip codes, and ClipIntersection is a bitwise AND of all vertex clip codes. Initial values are 0 for ClipUnion and 0xFFFFFFFF for ClipIntersection. When the RenderStateManager.Clipping property is set to false, ClipUnion and ClipIntersection are set to 0. Direct3D updates the clip status during drawing calls. To compute clip status for a particular object, set ClipUnion and ClipIntersection to their initial values and continue drawing.

Clip status is not updated by Device.DrawRectanglePatch and Device.DrawTrianglePatch because there is no software emulation for these methods.

Enumeration Information

Namespace Microsoft.DirectX.Direct3D
Assembly Microsoft.DirectX.Direct3D (microsoft.directx.direct3d.dll)
Strong Name Microsoft.DirectX.Direct3D,  Version=1.0.900.0,  Culture=neutral,  PublicKeyToken=d3231b57b74a1492