public override Attach Clone() { Dictionary <VertexAttribute, VertexSet> vertexSets = new(); foreach (KeyValuePair <VertexAttribute, VertexSet> t in VertexData) { vertexSets.Add(t.Key, t.Value.Clone()); } return(new GCAttach(vertexSets, OpaqueMeshes.ContentClone(), TransparentMeshes.ContentClone()) { Name = Name, MeshBounds = MeshBounds }); }
public void Load(byte[] file, int address, uint imageBase, int count, GeometryType geometry_type) { for (int i = 0; i < count; i++) { Mesh new_mesh = new Mesh(file, address, imageBase, cur_attributes); if (new_mesh.Parameters.Exists(x => x.ParameterType == ParameterType.IndexAttributeFlags)) { cur_attributes = (IndexAttributeParameter)new_mesh.Parameters.Find(x => x.ParameterType == ParameterType.IndexAttributeFlags); } if (geometry_type == GeometryType.Translucent) { TranslucentMeshes.Add(new_mesh); } else { OpaqueMeshes.Add(new_mesh); } address += 16; } }