예제 #1
0
        internal void CopyInto(PlanktonFaceList clone)
        {
            int min = Math.Min(this._list.Count, clone._list.Count);

            for (int i = 0; i < min; i++)
            {
                clone._list[i].FirstHalfedge = this._list[i].FirstHalfedge;
            }
            if (clone._list.Count < this._list.Count)
            {
                for (int i = min; i < this._list.Count; i++)
                {
                    var f = new PlanktonFace(this._list[i].FirstHalfedge);
                    clone._list.Add(f);
                }
            }
            else if (clone._list.Count > this._list.Count)
            {
                int marker = this._list.Count;
                clone._list.RemoveRange(marker, clone._list.Count - marker);
            }
        }
예제 #2
0
 /// <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);
 }