当前位置: 首页>>代码示例>>C#>>正文


C# Sweep.DTSweepConstraint类代码示例

本文整理汇总了C#中Poly2Tri.Triangulation.Delaunay.Sweep.DTSweepConstraint的典型用法代码示例。如果您正苦于以下问题:C# DTSweepConstraint类的具体用法?C# DTSweepConstraint怎么用?C# DTSweepConstraint使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


DTSweepConstraint类属于Poly2Tri.Triangulation.Delaunay.Sweep命名空间,在下文中一共展示了DTSweepConstraint类的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: AddEdge

 public void AddEdge(DTSweepConstraint e)
 {
     if (Edges == null)
     {
         Edges = new List<DTSweepConstraint>();
     }
     Edges.Add(e);
 }
开发者ID:guozanhua,项目名称:KinectRagdoll,代码行数:8,代码来源:TriangulationPoint.cs

示例2: FillLeftAboveEdgeEvent

 private static void FillLeftAboveEdgeEvent(DTSweepContext tcx, DTSweepConstraint edge, AdvancingFrontNode node)
 {
     while (node.Prev.Point.X > edge.P.X)
     {
         // Check if next node is below the edge
         Orientation o1 = TriangulationUtil.Orient2d(edge.Q, node.Prev.Point, edge.P);
         if (o1 == Orientation.CW)
         {
             FillLeftBelowEdgeEvent(tcx, edge, node);
         }
         else
         {
             node = node.Prev;
         }
     }
 }
开发者ID:Werkheisera2,项目名称:RaginRovers,代码行数:16,代码来源:DTSweep.cs

示例3: FillLeftBelowEdgeEvent

 private static void FillLeftBelowEdgeEvent(DTSweepContext tcx, DTSweepConstraint edge, AdvancingFrontNode node)
 {
     if (node.Point.X > edge.P.X)
     {
         if (TriangulationUtil.Orient2d(node.Point, node.Prev.Point, node.Prev.Prev.Point) == Orientation.CW)
         {
             // Concave 
             FillLeftConcaveEdgeEvent(tcx, edge, node);
         }
         else
         {
             // Convex
             FillLeftConvexEdgeEvent(tcx, edge, node);
             // Retry this one
             FillLeftBelowEdgeEvent(tcx, edge, node);
         }
     }
 }
开发者ID:Werkheisera2,项目名称:RaginRovers,代码行数:18,代码来源:DTSweep.cs

示例4: FillLeftConcaveEdgeEvent

 private static void FillLeftConcaveEdgeEvent(DTSweepContext tcx, DTSweepConstraint edge, AdvancingFrontNode node)
 {
     Fill(tcx, node.Prev);
     if (node.Prev.Point != edge.P)
     {
         // Next above or below edge?
         if (TriangulationUtil.Orient2d(edge.Q, node.Prev.Point, edge.P) == Orientation.CW)
         {
             // Below
             if (TriangulationUtil.Orient2d(node.Point, node.Prev.Point, node.Prev.Prev.Point) == Orientation.CW)
             {
                 // Next is concave
                 FillLeftConcaveEdgeEvent(tcx, edge, node);
             }
             else
             {
                 // Next is convex
             }
         }
     }
 }
开发者ID:Werkheisera2,项目名称:RaginRovers,代码行数:21,代码来源:DTSweep.cs

示例5: FillRightConvexEdgeEvent

 private static void FillRightConvexEdgeEvent(DTSweepContext tcx, DTSweepConstraint edge, AdvancingFrontNode node)
 {
     // Next concave or convex?
     if (TriangulationUtil.Orient2d(node.Next.Point, node.Next.Next.Point, node.Next.Next.Next.Point) ==
         Orientation.CCW)
     {
         // Concave
         FillRightConcaveEdgeEvent(tcx, edge, node.Next);
     }
     else
     {
         // Convex
         // Next above or below edge?
         if (TriangulationUtil.Orient2d(edge.Q, node.Next.Next.Point, edge.P) == Orientation.CCW)
         {
             // Below
             FillRightConvexEdgeEvent(tcx, edge, node.Next);
         }
         else
         {
             // Above
         }
     }
 }
开发者ID:Werkheisera2,项目名称:RaginRovers,代码行数:24,代码来源:DTSweep.cs

示例6: FillEdgeEvent

 private static void FillEdgeEvent(DTSweepContext tcx, DTSweepConstraint edge, AdvancingFrontNode node)
 {
     if (tcx.EdgeEvent.Right)
     {
         FillRightAboveEdgeEvent(tcx, edge, node);
     }
     else
     {
         FillLeftAboveEdgeEvent(tcx, edge, node);
     }
 }
开发者ID:Werkheisera2,项目名称:RaginRovers,代码行数:11,代码来源:DTSweep.cs

示例7: EdgeEvent

        private static void EdgeEvent(DTSweepContext tcx, DTSweepConstraint edge, AdvancingFrontNode node)
        {
            try
            {
                tcx.EdgeEvent.ConstrainedEdge = edge;
                tcx.EdgeEvent.Right = edge.P.X > edge.Q.X;

                if (IsEdgeSideOfTriangle(node.Triangle, edge.P, edge.Q))
                {
                    return;
                }

                // For now we will do all needed filling
                // TODO: integrate with flip process might give some better performance 
                //       but for now this avoid the issue with cases that needs both flips and fills
                FillEdgeEvent(tcx, edge, node);

                EdgeEvent(tcx, edge.P, edge.Q, node.Triangle, edge.Q);
            }
            catch (PointOnEdgeException e)
            {
                Debug.WriteLine(String.Format("Skipping Edge: {0}", e.Message));
            }
        }
开发者ID:Werkheisera2,项目名称:RaginRovers,代码行数:24,代码来源:DTSweep.cs

示例8: FillRightBelowEdgeEvent

 private static void FillRightBelowEdgeEvent(DTSweepContext tcx, DTSweepConstraint edge, AdvancingFrontNode node)
 {
     if (node.Point.x < edge.P.x) // needed?
     {
         if (TriangulationUtil.Orient2d(node.Point, node.Next.Point, node.Next.Next.Point) == Orientation.CCW)
         {
             // Concave
             FillRightConcaveEdgeEvent(tcx, edge, node);
         }
         else
         {
             // Convex
             FillRightConvexEdgeEvent(tcx, edge, node);
             // Retry this one
             FillRightBelowEdgeEvent(tcx, edge, node);
         }
     }
 }
开发者ID:kyallbarrows,项目名称:Cinch_4-3,代码行数:18,代码来源:DTSweep.cs

示例9: MarkConstrainedEdge

 public void MarkConstrainedEdge(DTSweepConstraint edge)
 {
     MarkConstrainedEdge(edge.P, edge.Q);
 }
开发者ID:Ratel13,项目名称:cocos2d-xna,代码行数:4,代码来源:DelaunayTriangle.cs

示例10: Contains

 public bool Contains(DTSweepConstraint e)
 {
     return (Contains(e.P) && Contains(e.Q));
 }
开发者ID:Ratel13,项目名称:cocos2d-xna,代码行数:4,代码来源:DelaunayTriangle.cs


注:本文中的Poly2Tri.Triangulation.Delaunay.Sweep.DTSweepConstraint类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。