本文整理汇总了C#中MeshBuilder.MergeVertex方法的典型用法代码示例。如果您正苦于以下问题:C# MeshBuilder.MergeVertex方法的具体用法?C# MeshBuilder.MergeVertex怎么用?C# MeshBuilder.MergeVertex使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MeshBuilder
的用法示例。
在下文中一共展示了MeshBuilder.MergeVertex方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: AddCutTri
// The cut goes always between 1-2 and 1-3. The resulting triangle goes left and the quad goes right.
static public void AddCutTri(MeshBuilder leftSide, MeshBuilder rightSide, int i1, int i2, int i3, Vector2 origin, Vector2 direction)
{
int l1 = leftSide.MergeVertex(i1);
int r2 = rightSide.MergeVertex(i2);
int r3 = rightSide.MergeVertex(i3);
int l12, r12;
MergeCutVertex(leftSide, rightSide, i1, i2, origin, direction, out l12, out r12);
int l13, r13;
MergeCutVertex(leftSide, rightSide, i1, i3, origin, direction, out l13, out r13);
leftSide.tri.Add(l1);
leftSide.tri.Add(l12);
leftSide.tri.Add(l13);
rightSide.tri.Add(r12);
rightSide.tri.Add(r2);
rightSide.tri.Add(r3);
rightSide.tri.Add(r12);
rightSide.tri.Add(r3);
rightSide.tri.Add(r13);
}