Esempio n. 1
0
        public _3DModel[] Parse(List <List <string> > model)/////селать вызов mtl/ отличный от вызова из this, будет правильнее
        {
            int start;

            string[] buff = { "" };
            if (model[0].Count != 0)
            {
                buff = model[0][0].Split(' ');
            }
            if (buff[0] == "mtllib")
            {
                models = new _3DModel[model.Count - 1];
                start  = 1;
            }
            else
            {
                models = new _3DModel[model.Count];
                start  = 0;
            }
            int index = 0;

            for (int i = start; i < model.Count; i++)
            {
                points        = PointsParce(model[i]);
                normals       = NormalsParce(model[i]);
                texturePoints = TexturePointsParce(model[i]);
                models[index] = new _3DModel();
                models[index].AddTriangles(TriangleParce(model[i]));
                models[index].AddPoints(points);
                index++;
            }

            return(models);
        }
Esempio n. 2
0
 public UpdateModel3DCommand(_3DModel parameters) : base("update", parameters)
 {
 }
Esempio n. 3
0
 public Model3DCommand(string type, _3DModel parameters) : base(type, parameters)
 {
 }