Esempio n. 1
0
        public static void Main(string[] args)
        {
            System.Threading.Thread.CurrentThread.CurrentUICulture = new System.Globalization.CultureInfo("en-US");
            System.Threading.Thread.CurrentThread.CurrentCulture   = new System.Globalization.CultureInfo("en-US");

            Console.WriteLine("Mode?\np - preprocessing\nr - rendu\n");
            string c = Console.ReadLine();

            Console.WriteLine("Nom scene:\n");
            string scn = Console.ReadLine();

            Console.WriteLine("Taille découpe:\n");
            string size = Console.ReadLine();

            pathToModels += scn;
            splitSize     = Convert.ToInt32(size);
            if (c[0] == 'p')
            {
                ObjLoader.objToZs(pathToModels + ".obj", pathToModels + ".zs", splitSize);
                Console.WriteLine("Parsing completed in " + pathToModels + ".zs");
            }
            else
            {
                using (Program p = new Program())
                {
                    p.Run();
                }
            }
        }
        public static void objToZs(string input, string output, int taille)
        {
            Scene3D s = new Scene3D();

            ObjLoader.parseObj(Program.pathToModels + ".obj", Program.pathToModels + ".mtl", s);
            s.ZoneScene(taille);
            ObjLoader.writeObj(Program.pathToModels + ".zs", s);
        }