ShouldEdgesSnap() private static method

private static ShouldEdgesSnap ( SnapEdge a, SnapEdge b ) : bool
a SnapEdge
b SnapEdge
return bool
コード例 #1
0
ファイル: SnapEdge.cs プロジェクト: zlhtech/unity-decompiled
 internal static void Snap(SnapEdge edge, List <SnapEdge> otherEdges, ref float maxDist, ref float snapVal, List <KeyValuePair <SnapEdge, SnapEdge> > activeEdges)
 {
     using (List <SnapEdge> .Enumerator enumerator = otherEdges.GetEnumerator())
     {
         while (enumerator.MoveNext())
         {
             SnapEdge current = enumerator.Current;
             if (SnapEdge.ShouldEdgesSnap(edge, current))
             {
                 float num = Mathf.Abs(current.pos - edge.pos);
                 if ((double)num < (double)maxDist)
                 {
                     maxDist = num;
                     snapVal = current.pos - edge.pos;
                     activeEdges.Clear();
                     activeEdges.Add(new KeyValuePair <SnapEdge, SnapEdge>(edge, current));
                 }
                 else if ((double)num == (double)maxDist)
                 {
                     activeEdges.Add(new KeyValuePair <SnapEdge, SnapEdge>(edge, current));
                 }
             }
         }
     }
 }
コード例 #2
0
ファイル: SnapEdge.cs プロジェクト: qipa/UnityDecompiled-2
 private static bool EdgeInside(SnapEdge edge, List <SnapEdge> frustum)
 {
     foreach (SnapEdge current in frustum)
     {
         if (!SnapEdge.ShouldEdgesSnap(edge, current))
         {
             return(false);
         }
     }
     return(true);
 }
コード例 #3
0
ファイル: SnapEdge.cs プロジェクト: zlhtech/unity-decompiled
 private static bool EdgeInside(SnapEdge edge, List <SnapEdge> frustum)
 {
     using (List <SnapEdge> .Enumerator enumerator = frustum.GetEnumerator())
     {
         while (enumerator.MoveNext())
         {
             SnapEdge current = enumerator.Current;
             if (!SnapEdge.ShouldEdgesSnap(edge, current))
             {
                 return(false);
             }
         }
     }
     return(true);
 }
コード例 #4
0
ファイル: SnapEdge.cs プロジェクト: qipa/UnityDecompiled-2
 internal static void Snap(SnapEdge edge, List <SnapEdge> otherEdges, ref float maxDist, ref float snapVal, List <KeyValuePair <SnapEdge, SnapEdge> > activeEdges)
 {
     foreach (SnapEdge current in otherEdges)
     {
         if (SnapEdge.ShouldEdgesSnap(edge, current))
         {
             float num = Mathf.Abs(current.pos - edge.pos);
             if (num < maxDist)
             {
                 maxDist = num;
                 snapVal = current.pos - edge.pos;
                 activeEdges.Clear();
                 activeEdges.Add(new KeyValuePair <SnapEdge, SnapEdge>(edge, current));
             }
             else if (num == maxDist)
             {
                 activeEdges.Add(new KeyValuePair <SnapEdge, SnapEdge>(edge, current));
             }
         }
     }
 }