Пример #1
0
        protected override void Init()
        {
            this.heap   = new MinHeap <TriMesh.Face>(this.Mesh.Faces.Count);
            this.handle = new HeapNode <TriMesh.Face> [this.Mesh.Faces.Count];
            this.traits = new TriMeshTraits(this.Mesh);
            this.traits.Init();

            foreach (TriMesh.Face face in this.Mesh.Faces)
            {
                double value = this.GetValue(face);
                this.handle[face.Index] = heap.Add(value, face);
            }
        }
Пример #2
0
        protected override void Init()
        {
            this.heap   = new MinHeapTwo <TriMesh.Edge>(this.Mesh.Edges.Count);
            this.handle = new HeapNode <TriMesh.Edge> [this.Mesh.Edges.Count];
            this.traits = new TriMeshTraits(this.Mesh);
            this.traits.Init();

            foreach (var item in this.Mesh.Edges)
            {
                double value = this.GetValue(item);
                this.handle[item.Index] = this.heap.Add(value, item);
            }
        }