internal void CopyInto(PlanktonHalfEdgeList clone) { int min = Math.Min(this._list.Count, clone._list.Count); for (int i = 0; i < min; i++) { clone._list[i].NextHalfedge = this._list[i].NextHalfedge; clone._list[i].PrevHalfedge = this._list[i].PrevHalfedge; clone._list[i].AdjacentFace = this._list[i].AdjacentFace; clone._list[i].StartVertex = this._list[i].StartVertex; } if (clone._list.Count < this._list.Count) { for (int i = min; i < this._list.Count; i++) { var e = new PlanktonHalfedge(); e.NextHalfedge = this._list[i].NextHalfedge; e.PrevHalfedge = this._list[i].PrevHalfedge; e.AdjacentFace = this._list[i].AdjacentFace; e.StartVertex = this._list[i].StartVertex; clone._list.Add(e); } } else if (clone._list.Count > this._list.Count) { int marker = this._list.Count; clone._list.RemoveRange(marker, clone._list.Count - marker); } }
/// <summary> /// Initializes a new (empty) instance of the <see cref="PlanktonMesh"/> class. /// </summary> public PlanktonMesh() { _vertices = new PlanktonVertexList(this); _halfedges = new PlanktonHalfEdgeList(this); _faces = new PlanktonFaceList(this); }