Here I want to continue writing something related to the Mesh. After all, we may need to have many other requirements for it. In practical use of 3D games, low polygon models are generally used. In this way, we can have a better speed to run the game. In fact, DX provides us with such a function that allows us to control the complexity of the read Mesh.
Public void WeldVertices (
Microsoft. DirectX. Direct3D. WeldEpsilonsFlags flags, // flag
Microsoft. DirectX. Direct3D. WeldEpsilons epsilons,
Microsoft. DirectX. Direct3D. GraphicsStream adjacencyIn,
Microsoft. DirectX. Direct3D. GraphicsStream adjacencyOut,
Out int [] faceRemap,
Microsoft. DirectX. Direct3D. GraphicsStream vertexRemap)
This method can simplify the model. The first two parameters are used to determine how to simplify the model,
The first sign includes the following:
Member
Value
Description
DoNotSplit
8
Instructs the weld to allow vertices to be modified only, not removed. this flag is valid only if WeldPartialMatches is set. it is useful to modify vertices so that they are equal, but not to allow vertices to be removed.
It takes effect only when WeldPartialMatches parameter is specified.
DoNotRemoveVertices
4
Instructs the weld to allow vertices to be modified only, not removed. this flag is valid only if WeldPartialMatches is set. it is useful to modify vertices to be equal, but not to allow vertices to be removed.
The specified WeldPartialMatches parameter takes effect only when it is specified. The specified point cannot be removed and can only be modified.
WeldPartialMatches
2
If a given vertex component is within epsilon, instructs the weld to modify partially matched vertices so that both components are equal. If all components are equal, one of the vertices is removed.