本文整理汇总了C#中System.Edge.GetVertecs方法的典型用法代码示例。如果您正苦于以下问题:C# Edge.GetVertecs方法的具体用法?C# Edge.GetVertecs怎么用?C# Edge.GetVertecs使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Edge
的用法示例。
在下文中一共展示了Edge.GetVertecs方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: EqualIgnoreDir
public static bool EqualIgnoreDir(Edge e0, Edge e1)
{
VoxelPos v0, v1, v2, v3;
v0 = new VoxelPos();
v1 = new VoxelPos();
v2 = new VoxelPos();
v3 = new VoxelPos();
e0.GetVertecs(ref v0, ref v1);
e1.GetVertecs(ref v2, ref v3);
return (v0 == v2 && v1 == v3) || (v0 == v3 && v1 == v2);
}
示例2: __FindAllEdges2Ring__
void __FindAllEdges2Ring__(Edge e, List<Edge> AllEdges, Dictionary<int, int> Degrees, List<VoxelPos> Ring)
{
VoxelPos v1, v2;
v1 = new VoxelPos();
v2 = new VoxelPos();
e.GetVertecs(ref v1, ref v2);
int rc = Ring.Count;
if (rc == 0) Ring.Add(v1);
if (Ring[0] == v2)
return;
int ldx = e.X1 - e.X0;
int ldy = e.Y1 - e.Y0;
int ldx0, ldy0;
rc = Ring.Count;
if (rc > 1)
{
ldx0 = Ring[rc - 1].X - Ring[rc - 2].X;
ldy0 = Ring[rc - 1].Y - Ring[rc - 2].Y;
if (ldx0 * ldy + ldx * ldy0 == 0)
{
Ring.RemoveAt(rc - 1);
}
}
Ring.Add(v2);
int ec = AllEdges.Count;
VoxelPos sv = new VoxelPos();
ldx = v2.X - v1.X;
ldy = v2.Y - v1.Y;
int dd = Degrees[v2.X * VoxelCount + v2.Y];
for (int i = 0; i < ec; ++i)
{
Edge _e = AllEdges[i];
sv.X = _e.X0;
sv.Y = _e.Y0;
if (sv == v2)
{
if (dd == 4 && (((_e.X1 - _e.X0 == 0) && (_e.Y1 - _e.Y0) * ldx < 0) || ((_e.Y1 - _e.Y0 == 0) && (_e.X1 - _e.X0) * ldy > 0)))
continue;
AllEdges.RemoveAt(i);
__FindAllEdges2Ring__(_e, AllEdges, Degrees, Ring);
break;
}
}
}