?/TD>
Microsoft DirectX 9.0

ID3DXPMesh::SetNumVertices Method


Sets the current level of detail to as close to the specified number of vertices as possible.

Syntax

HRESULT SetNumVertices(      

    DWORD Vertices );

Parameters

Vertices
[in] Target number of vertices. This value specifies the desired change in the level of detail (LOD).

Return Value

If the method succeeds, the return value is D3D_OK.

If the method fails, the return value can be D3DERR_INVALIDCALL.



Remarks

If the number of vertices is greater than the maximum number of vertices, it is capped at the maximum number of vertices returned by ID3DXPMesh::GetMaxVertices. If the number of vertices is less than the minimum number of vertices, it is capped at the minimum number of vertices returned by ID3DXPMesh::GetMinVertices.

The number of vertices after this call may be off by one because some edge collapse may introduce or remove one face or two. For example, if you try setting the number of faces to an intermediate value such as 5, when 4 and 6 are possible, 4 will always be the result.



© 2002 Microsoft Corporation. All rights reserved.