public int addStructure(StructureData i_StructData) { i_StructData.ID = stage.curID; stage.StageData.Add(fromStructureData(i_StructData)); return(stage.curID++); }
public static Structure fromStructureData(StructureData i_struct) { int LocalID = 0; Structure S = new Structure(); S.Composite = i_struct.Composite; foreach (object obj in i_struct.pointSet) { S.WireFrame.Add(LocalID++, obj); } S.updateCenterPoint(); return(S); } //converts structure data to structure
public static Structure fromStructureData(StructureData i_struct) { int LocalID = 0; Structure S = new Structure(); S.WireFrame = new List <Triangle>(); S.StructureColor = new List <System.Drawing.Color>(); for (int i = 0; i < i_struct.wireframeData.Count(); i++) { S.WireFrame.Add(i_struct.wireframeData[i]); S.StructureColor.Add(i_struct.StructureColor[i]); } S.ID = LocalID++; S.updateCenterPoint(); return(S); } //converts structure data to structure