Пример #1
0
 public BaseNode[] createVrmlFromString(string vrmlSyntax) {
     Vrml97Tokenizer tokenizer = new Vrml97Tokenizer(new StringReader(vrmlSyntax));
     VrmlParser parser = new VrmlParser(tokenizer);
     MFNode node = new MFNode();
     parser.Parse(node);
     return null;
 }
 private VrmlScene LoadScene(string name) {
     using (var stream = GetType().Assembly.GetManifestResourceStream(this.GetType(), name)) {
         var tokenizer = new Vrml97Tokenizer(stream);
         var parser = new VrmlParser(tokenizer);
         var scene = new VrmlScene();
         parser.Parse(scene);
         return scene;
     }
 }
Пример #3
0
 public Scene3D Convert(string vrmlPath)
 {
     try {
         var tokenizer = new Vrml97Tokenizer(File.Open(vrmlPath, FileMode.Open));
         var parser = new VrmlParser(tokenizer);
         var scene = new VrmlScene();
         parser.Parse(scene);
         return Convert(scene);
     } catch (Exception exc) {
         return null;
     }
 }