Microsoft DirectX 8.1 (Visual Basic) |
Sets the current level of detail (LOD) to as close to the specified number of vertices as possible.
object.SetNumVertices( _ Vertices As Long)
If the method fails, an error is raised and Err.Number can be set to D3DERR_INVALIDCALL.
For information on trapping errors, see the Microsoft® Visual Basic® Error Handling topic.
If the number of vertices is greater than the maximum number of vertices, it is capped at the maximum number of vertices returned by D3DXPMesh.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 D3DXPMesh.GetMinVertices.
The number of vertices after this call might be off by one because some edge collapse might 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 is always the result.