/// <summary> /// Create a clone of this Object /// </summary> /// <returns>The clone</returns> public override object Clone() { IndexedMeshBuilderItems list = new IndexedMeshBuilderItems(); foreach (IndexedMeshBuilderItem item in this) { list.Add(item); } return(list); }
/// <summary> /// Unserializes a BinaryStream into the Attributes of this Instance /// </summary> /// <param name="reader">The Stream that contains the FileData</param> public override void Unserialize(System.IO.BinaryReader reader) { version = reader.ReadUInt32(); string name = reader.ReadString(); uint myid = reader.ReadUInt32(); gb.Unserialize(reader); gb.BlockID = myid; int count = reader.ReadInt32(); v1.Clear(); for (int i = 0; i < count; i++) { Vector3f o = new Vector3f(); o.Unserialize(reader); v1.Add(o); } count = reader.ReadInt32(); v2.Clear(); for (int i = 0; i < count; i++) { Vector3f o = new Vector3f(); o.Unserialize(reader); v2.Add(o); } count = reader.ReadInt32(); v3.Clear(); for (int i = 0; i < count; i++) { Vector2f o = new Vector2f(); o.Unserialize(reader); v3.Add(o); } zero1 = reader.ReadBytes(zero1.Length); refcount = reader.ReadInt32(); u1 = reader.ReadInt32(); zero2 = reader.ReadBytes(zero2.Length); count = reader.ReadInt32(); v4.Clear(); for (int i = 0; i < count; i++) { Vector2f o = new Vector2f(); o.Unserialize(reader); v4.Add(o); } count = reader.ReadInt32(); v5.Clear(); for (int i = 0; i < count; i++) { Vector2f o = new Vector2f(); o.Unserialize(reader); v5.Add(o); } count = reader.ReadInt32(); v6.Clear(); for (int i = 0; i < count; i++) { Vector2f o = new Vector2f(); o.Unserialize(reader); v6.Add(o); } for (int i = 0; i < u2.Length; i++) { u2[i] = reader.ReadSingle(); } count = reader.ReadInt32(); mbi.Clear(); for (int i = 0; i < count; i++) { IndexedMeshBuilderItem o = new IndexedMeshBuilderItem(); o.Unserialize(reader); mbi.Add(o); } u3 = reader.ReadInt32(); u4 = reader.ReadInt32(); count = reader.ReadInt32(); ia1.Clear(); for (int i = 0; i < count; i++) { ia1.Add(reader.ReadInt32()); } count = reader.ReadInt32(); ia2.Clear(); for (int i = 0; i < count; i++) { ia2.Add(reader.ReadInt32()); } count = reader.ReadInt32(); ia3.Clear(); for (int i = 0; i < count; i++) { ia3.Add(reader.ReadInt32()); } count = reader.ReadInt32(); ia4.Clear(); for (int i = 0; i < count; i++) { ia4.Add(reader.ReadInt32()); } u5 = reader.ReadInt32(); u6 = reader.ReadInt32(); u7 = reader.ReadInt32(); u8 = reader.ReadInt32(); u9 = reader.ReadInt32(); u10 = reader.ReadInt32(); s1 = reader.ReadString(); }