@@ -20,7 +20,7 @@ namespace ModelViewer
20
20
[ SuppressMessage ( "StyleCop.CSharp.DocumentationRules" , "SA1600:ElementsMustBeDocumented" , Justification = "Reviewed. Suppression is OK here." ) ]
21
21
public class MainViewModel : Observable
22
22
{
23
- private const string OpenFileFilter = "3D model files (*.3ds;*.obj;*.lwo;*.stl;*.ply;)|*.3ds;*.obj;*.objz;*.lwo;*.stl;*.ply;" ;
23
+ private const string OpenFileFilter = "3D model files (*.3ds;*.obj;*.off;*. lwo;*.stl;*.ply;)|*.3ds;*.obj;*.objz;*.off ;*.lwo;*.stl;*.ply;" ;
24
24
25
25
private const string TitleFormatString = "3D model viewer - {0}" ;
26
26
@@ -60,6 +60,14 @@ public MainViewModel(IFileDialogService fds, HelixViewport3D viewport)
60
60
{
61
61
this . Elements . Add ( new VisualViewModel ( c ) ) ;
62
62
}
63
+
64
+ // defaults: just to make sure it works
65
+ var modelImporter = new ModelImporter ( ) ;
66
+ //this.CurrentModel = modelImporter.Load("pack://application:,,,/ExampleBrowser;component/Resources/simple3dModel.obj");
67
+ //this.CurrentModel = modelImporter.Load("pack://application:,,,/ExampleBrowser;component/Resources/simple3dModel.objz");
68
+ //this.CurrentModel = modelImporter.Load("pack://application:,,,/ExampleBrowser;component/Resources/simple3dModel.off");
69
+ //this.CurrentModel = modelImporter.Load("pack://application:,,,/ExampleBrowser;component/Resources/simple3dModel.ply");
70
+ this . CurrentModel = modelImporter . Load ( "pack://application:,,,/ExampleBrowser;component/Resources/simple3dModel.stl" ) ;
63
71
}
64
72
65
73
public string CurrentModelPath
0 commit comments