private void LoadX3DFile(X3DFile file, double scale)
 {
     file.Parse(scale);
     mView.ClearShapes();
     foreach (IndexedFaceSet ifs in file.IndexedFaces)
     {
         mView.AddShape(ifs);
     }
     mView.PreProcessShapes();
     //mView.SetPo(file.CameraPosition);
 }
 private void SetUpFileList(string directory, string selectFileName)
 {
     mFilesComboBox.Items.Clear();
     foreach (string fileName in Directory.GetFiles(directory, "*.x3d"))
     {
         X3DFile f = new X3DFile(fileName);
         mFilesComboBox.Items.Add(f);
         if (fileName == selectFileName)
         {
             mFilesComboBox.SelectedIndex = mFilesComboBox.Items.Count - 1;
         }
     }
 }