Share via


ProgressiveMesh.NumberFaces Property (Microsoft.DirectX.Direct3D)

Retrieves the currently set number of faces, or sets the current level of detail (LOD) to as close to the specified number of faces as possible.

Definition

Visual Basic Public Property NumberFaces( _
    ByVal faces As Integer _
) As Integer
C# public int this[
    int faces
] { set; }
C++ public:
property int NumberFaces [int] {
        void set(int faces, int value);
}
JScript In JScript, you can use indexed properties, but you cannot define your own.

Parameters

faces System.Int32
Target number of faces. This value specifies the desired change in the LOD.

Property Value

System.Int32

This property is write-only. 

Remarks

If the current number of faces is greater than the maximum allowed, it is capped at the maximum number of faces returned by ProgressiveMesh.MaxFaces. If the current number of faces is less than the minimum required, it is capped at the minimum number of faces returned by ProgressiveMesh.MinFaces.

After this method is called, the number of faces might be slightly off, because edge collapse can sometimes introduce or remove a few faces. For example, setting the number of faces to an intermediate value such as 5, when 4 and 6 are possible, always produces a result of 4.

Exceptions

InvalidCallException

The method call is invalid. For example, a method's parameter might contain an invalid value.