Exemplo n.º 1
0
        public Document(Parser parser, ImporterSettings settings)
        {
            this.settings = settings;
            this.parser = parser;

            for(int i=0; i<7 ; i++)
            {
                creationTimeStamp[i] = 0;
            }

            ReadHeader();
            ReadPropertyTemplates();
            ReadGlobalSettings();
            ReadObjects();
            ReadConnections();
        }
Exemplo n.º 2
0
 public void LoadFile()
 {
     var file = "../../models-nonbsd/FBX/2013_ASCII/Cinema4D.fbx";
     byte[] input;
     using (var stream = new FileStream(file, FileMode.Open))
     {
         input = new byte[stream.Length];
         stream.Read(input, 0, (int)stream.Length);
     }
     bool isBinary = false;
     List<Token> tokens;
     if (Encoding.ASCII.GetString(input, 0, 18) == "Kaydara FBX Binary")
     {
         isBinary = true;
         BinaryTokenizer.TokenizeBinary(out tokens, input, input.Length);
     }
     else
     {
         Tokenizer.Tokenize(out tokens, input);
     }
     Parser parser = new Parser(tokens, isBinary);
     ImporterSettings settings = new ImporterSettings();
     this.Document = new Document(parser, settings);
 }