コード例 #1
0
ファイル: OA_Algorithm.cs プロジェクト: SamarSamir9/dcel
 /// <summary>
 /// Compared HalfEdges should have Origin = origin and Destination > origin.
 /// </summary>
 private Func <DCEL_HalfEdge, DCEL_HalfEdge, int> AngleComparisonUpperList_HalfEdge(VecRat2 origin)
 {
     return(delegate(DCEL_HalfEdge a, DCEL_HalfEdge b)
     {
         return GeomAid.TurnTest(origin, b.Destination.Position, a.Destination.Position);
     });
 }
コード例 #2
0
ファイル: OA_Algorithm.cs プロジェクト: SamarSamir9/dcel
 private Comparison <OA_Segment> AngleComparisonUpperList(VecRat2 origin)
 {
     return(delegate(OA_Segment a, OA_Segment b)
     {
         return GeomAid.TurnTest(origin, b.Lower.Position, a.Lower.Position);
     });
 }
コード例 #3
0
ファイル: OA_Algorithm.cs プロジェクト: SamarSamir9/dcel
 private static CycleType GetCycleType(DCEL_HalfEdge cycle)
 {
     if (GeomAid.TurnTest(cycle.Prev.Origin.Position, cycle.Origin.Position, cycle.Destination.Position) > 0)
     {
         return(CycleType.Interior);
     }
     else
     {
         return(CycleType.Exterior);
     }
 }