示例#1
0
        public int addStructure(StructureData i_StructData)
        {
            i_StructData.ID = stage.curID;
            stage.StageData.Add(fromStructureData(i_StructData));

            return(stage.curID++);
        }
示例#2
0
        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
示例#3
0
        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