Mesh.WeldVertices(WeldEpsilonsFlags,WeldEpsilons,GraphicsStream,GraphicsStream,Int32,GraphicsStream) Method (Microsoft.DirectX.Direct3D)
Welds together replicated vertices that have equal attributes.
Definition
Visual Basic Public Sub WeldVertices( _
ByVal flags As WeldEpsilonsFlags, _
ByVal epsilons As WeldEpsilons, _
ByVal adjacencyIn As GraphicsStream, _
ByVal adjacencyOut As GraphicsStream, _
ByRef faceRemap As Integer, _
ByRef vertexRemap As GraphicsStream _
)C# public void WeldVertices(
WeldEpsilonsFlags flags,
WeldEpsilons epsilons,
GraphicsStream adjacencyIn,
out GraphicsStream adjacencyOut,
out int faceRemap,
out GraphicsStream vertexRemap
);C++ public:
void WeldVertices(
WeldEpsilonsFlags flags,
WeldEpsilons epsilons,
GraphicsStream^ adjacencyIn,
[Out] GraphicsStream^ adjacencyOut,
[Out] int% faceRemap,
[Out] GraphicsStream^% vertexRemap
);JScript public function WeldVertices(
flags : WeldEpsilonsFlags,
epsilons : WeldEpsilons,
adjacencyIn : GraphicsStream,
adjacencyOut : GraphicsStream,
faceRemap : int,
vertexRemap : GraphicsStream
);
Parameters
flags Microsoft.DirectX.Direct3D.WeldEpsilonsFlags
One or more flags from WeldEpsilonsFlags.epsilons Microsoft.DirectX.Direct3D.WeldEpsilons
A WeldEpsilons structure that specifies the epsilon values to use for this method.adjacencyIn Microsoft.DirectX.GraphicsStream
A GraphicsStream containing three Int32 values per face that specify the three neighbors for each face in the source mesh. If the edge has no adjacent faces, the value is 0. If this parameter is omitted, BaseMesh.GenerateAdjacency is called to create logical adjacency information.adjacencyOut Microsoft.DirectX.GraphicsStream
[in, out] A GraphicsStream that contains the face adjacency array of the optimized mesh. The face adjacency is stored as an array of arrays. The innermost array is three indices of adjacent triangles, and the outer array is one set of face adjacencies per triangle in the mesh.faceRemap System.Int32[]
Array that contains the new index for each face.vertexRemap Microsoft.DirectX.GraphicsStream
A GraphicsStream object that contains the new index for each vertex.
Remarks
This method compares logically-welded vertices and combines those with similar components, such as normals or texture coordinates within param_WeldEpsilons_epsilons. It uses the provided adjacency information to determine which points are replicated, and performs an epsilon comparison to merge vertices. Those vertices with equal positions must already have been calculated and represented by point-representative data.
Exceptions
The method call is invalid. For example, a method's parameter might contain an invalid value.
Microsoft Direct3D could not allocate sufficient memory to complete the call.