Ejemplo n.º 1
0
        static void Main(string[] args)
        {
            Reader pcfReader = new Reader("bagel_event_fx.pcf");
            PCF    pcf       = pcfReader.Read();

            //pcf.GetParticleNames();

            //List<string> materialNames = pcf.GetMaterialNames();

            //foreach (string material in materialNames)
            //{
            //    Console.WriteLine("Material: " + material);
            //}

            //List<string> modelNames = pcf.GetModelNames();

            //foreach (string model in modelNames)
            //{
            //    Console.WriteLine("Model: " + model);
            //}

            pcf.PrintFileStructure();

            Console.ReadLine();
        }
Ejemplo n.º 2
0
        public PCF Read()
        {
            FileStream pcf = null;

            try
            {
                pcf = new FileStream(file, FileMode.Open);
            }
            catch (FileNotFoundException e)
            {
                Console.WriteLine("Error!: " + e.Message);
                Utils.Exit();
            }

            _binaryReader = new BinaryReader(pcf);

            this.pcf = new PCF();

            ReadHeader();
            ReadStringDict();
            ReadElementDict();
            ReadData();

            _binaryReader.Close();

            return(this.pcf);
        }