Пример #1
0
        protected override TriMesh.Vertex Merge(MergeArgs args)
        {
            EdgeContext ctx = TriMeshModify.Merge(args.Target, args.Pos);

            this.Logs.Add(ctx);
            return(ctx.Left);
        }
Пример #2
0
            private void SetValue(string key, string value)
            {
                switch (key)
                {
                case "ResolveConflictOn":
                    List <int> intVals = new List <int>();

                    foreach (string s in value.Split(','))
                    {
                        int i;
                        if (int.TryParse(s.Trim(), out i))
                        {
                            intVals.Add(i);
                        }
                    }

                    if (intVals.Count > 0 && MergeArgs != null)
                    {
                        MergeArgs.SetMergedExitCodes(intVals.ToArray());
                    }
                    break;
                }
            }
Пример #3
0
        public int Run(int preserveFace)
        {
            int count = 0;

            while (this.Mesh.Faces.Count > preserveFace)
            {
                MergeArgs args = this.GetMin();
                if (args == null)
                {
                    break;
                }

                this.BeforeMerge(args.Target);

                TriMesh.Vertex newVertex = this.Merge(args);

                this.AfterMerge(newVertex);

                count++;
            }

            return(count);
        }
Пример #4
0
 protected override TriMesh.Vertex Merge(MergeArgs args)
 {
     return(TriMeshModify.Merge(args.Target, args.Pos).Left);
 }
Пример #5
0
 public Concatenate(MergeArgs args) : base(args)
 {
     this.args = args;
 }
Пример #6
0
 public Add(MergeArgs args) : base(args)
 {
 }
Пример #7
0
 public Subtract(MergeArgs args) : base(args)
 {
 }
Пример #8
0
 protected abstract TriMesh.Vertex Merge(MergeArgs args);
Пример #9
0
 public Merge(MergeArgs args) : base(args)
 {
 }
Пример #10
0
 protected override HalfEdgeMesh.Vertex Merge(MergeArgs args)
 {
     return(TriMeshModify.Instance.MergeEdge(args.Target, args.Pos));
 }