Ejemplo n.º 1
0
 public bool Forward()
 {
     if (this.index < this.method.Logs.Count)
     {
         EdgeContext    ctx   = this.method.Logs[this.index];
         TriMesh.Vertex left  = null;
         TriMesh.Vertex right = null;
         foreach (var v in this.Mesh.Vertices)
         {
             if (v.Index == ctx.Left)
             {
                 left = v;
             }
             else if (v.Index == ctx.Right)
             {
                 right = v;
             }
         }
         TriMesh.Edge edge = left.FindEdgeTo(right);
         MergeEdge.Merge(edge, ctx.MidPos);
         index++;
         return(true);
     }
     else
     {
         int r = this.method.Run(this.Mesh.Faces.Count - 1);
         index += r;
         return(false);
     }
 }
Ejemplo n.º 2
0
        protected override HalfEdgeMesh.Vertex Merge(MergeSimplicationBase <HalfEdgeMesh.Edge> .MergeArgs args)
        {
            EdgeContext ctx = MergeEdge.Merge(args.Target, args.Pos);

            this.Logs.Add(ctx);

            TriMesh.Vertex left = null;
            foreach (var v in this.Mesh.Vertices)
            {
                if (v.Index == ctx.Left)
                {
                    left = v;
                }
            }
            return(left);
        }