예제 #1
0
        /// <summary>
        /// 增加模型
        /// </summary>
        /// <param name="name"></param>
        /// <param name="modelname"></param>
        /// <param name="group"></param>
        /// <returns></returns>
        public void AddModel(string name, string modelname, string group, float scale)
        {
            switch (group)
            {
            case "植物":
            {
                ModelStruct temp = new ModelStruct();
                temp.Name      = name;
                temp.ModelName = modelname;
                temp.Scale     = scale;
                物.Add(temp);
            }
            break;

            case "室内元素":
            {
                ModelStruct temp = new ModelStruct();
                temp.Name      = name;
                temp.ModelName = modelname;
                temp.Scale     = scale;
                室内元素.Add(temp);
            }
            break;

            case "建筑物":
            {
                ModelStruct temp = new ModelStruct();
                temp.Name      = name;
                temp.ModelName = modelname;
                temp.Scale     = scale;
                建筑物.Add(temp);
            }
            break;

            default:
            {
                ModelStruct temp = new ModelStruct();
                temp.Name      = name;
                temp.ModelName = modelname;
                temp.Scale     = scale;
                杂项.Add(temp);
            }
            break;
            }
        }
예제 #2
0
 /// <summary>
 /// 增加模型
 /// </summary>
 /// <param name="name"></param>
 /// <param name="modelname"></param>
 /// <param name="group"></param>
 /// <returns></returns>
 public void AddModel(string name, string modelname, string group, float scale)
 {
     switch (group)
     {
         case "植物":
             {
                 ModelStruct temp = new ModelStruct();
                 temp.Name = name;
                 temp.ModelName = modelname;
                 temp.Scale = scale;
                 植物.Add(temp);
             }
             break;
         case "室内元素":
             {
                 ModelStruct temp = new ModelStruct();
                 temp.Name = name;
                 temp.ModelName = modelname;
                 temp.Scale = scale;
                 室内元素.Add(temp);
             }
             break;
         case "建筑物":
             {
                 ModelStruct temp = new ModelStruct();
                 temp.Name = name;
                 temp.ModelName = modelname;
                 temp.Scale = scale;
                 建筑物.Add(temp);
             }
             break;
         default:
             {
                 ModelStruct temp = new ModelStruct();
                 temp.Name = name;
                 temp.ModelName = modelname;
                 temp.Scale = scale;
                 杂项.Add(temp);
             }
             break;
     }
 }