/// <summary> /// /// </summary> /// <param name="Indices"></param> public void RemoveAt(params int[] Indices) { var Items = new List <T>(); var j = 0; Indices.ForEach(i => { Items.Add(this[i]); base.Remove(Items[j]); j++; }); OnItemsRemoved(Items); OnItemsChanged(); }
/// <summary> /// Saves the file to the specified stream. /// </summary> /// <param name="stream">The stream to save to.</param> public override void Save(Stream stream) { BinaryWriter writer = new BinaryWriter(stream, Encoding.GetEncoding("EUC-KR")); writer.WriteString(FILE_IDENTIFIER_8); writer.Write((byte)0); writer.Write((int)format); writer.Write(BoundingBox.Minimum); writer.Write(BoundingBox.Maximum); writer.Write((short)BoneTable.Count); BoneTable.ForEach(bone => { writer.Write(bone); }); writer.Write((short)Vertices.Count); Vertices.ForEach(vertex => { writer.Write(vertex.Position); }); if (NormalsEnabled) { Vertices.ForEach(vertex => { writer.Write(vertex.Normal); }); } if (ColoursEnabled) { Vertices.ForEach(vertex => { writer.Write(vertex.Colour.Alpha); writer.Write(vertex.Colour.Red); writer.Write(vertex.Colour.Green); writer.Write(vertex.Colour.Blue); }); } if (BonesEnabled) { Vertices.ForEach(vertex => { writer.Write(vertex.BoneWeights); writer.Write(vertex.BoneIndices); }); } if (TangentsEnabled) { Vertices.ForEach(vertex => { writer.Write(vertex.Tangent); }); } if (TextureCoordinates1Enabled) { Vertices.ForEach(vertex => { writer.Write(vertex.TextureCoordinates[0]); }); } if (TextureCoordinates2Enabled) { Vertices.ForEach(vertex => { writer.Write(vertex.TextureCoordinates[1]); }); } if (TextureCoordinates3Enabled) { Vertices.ForEach(vertex => { writer.Write(vertex.TextureCoordinates[2]); }); } if (TextureCoordinates4Enabled) { Vertices.ForEach(vertex => { writer.Write(vertex.TextureCoordinates[3]); }); } writer.Write((short)Indices.Count); Indices.ForEach(index => { writer.Write(index); }); writer.Write((short)Materials.Count); Materials.ForEach(material => { writer.Write(material); }); writer.Write((short)Strips.Count); Strips.ForEach(strip => { writer.Write(strip); }); writer.Write((short)Pool); }