private void CopyModelIndicies(ModelComponent myIncomingComponent) { ModelIDToIndices = new uint[myIncomingComponent.ModelIDToIndices.Length][]; Parallel.For(0, myIncomingComponent.ModelIDToIndices.Length, delegate(int i) { ModelIDToIndices[i] = new uint[myIncomingComponent.ModelIDToIndices[i].Length]; Array.Copy(myIncomingComponent.ModelIDToIndices[i], ModelIDToIndices[i], ModelIDToIndices[i].Length); }); }
public override void CopyFrom <T>(T aComponent) { ModelComponent myIncomingComponent = aComponent as ModelComponent; if (myIncomingComponent == null) { throw new INVALID_COMPONENT_COPY_ATTEMPT(typeof(T)); } //Materials = new Material[myIncomingComponent.Materials.Length]; //Array.Copy(myIncomingComponent.Materials, Materials, myIncomingComponent.Materials.Length); //Textures = new List<EmbeddedTexture>(myIncomingComponent.Textures); //Animations = new List<Animation>(myIncomingComponent.Animations); //Meshes = new List<Mesh>(myIncomingComponent.Meshes); CopyModelIndicies(myIncomingComponent); CopyModelVerticies(myIncomingComponent); }