示例#1
0
        private void BtnOpenUrl_Click(object sender, RoutedEventArgs e)
        {
            Controller.RunOnNextDraw.Add(() =>
            {
                var fileName = URL;
                var objFM    = new ObjFileModel(fileName);

                Controller.AddData(objFM.Indices, objFM.Vertices.Select(x => x.ToVec3()).ToArray(), objFM.Normals);
            });
        }
示例#2
0
        private void BtnOpen_Click(object sender, RoutedEventArgs e)
        {
            var ofDlg = new OpenFileDialog();

            // Set filter for file extension and default file extension
            ofDlg.DefaultExt = ".obj";
            ofDlg.Filter     = "OBJ WaveFront (.obj)|*.obj";
            var res = ofDlg.ShowDialog();

            if (res == true)
            {
                Controller.RunOnNextDraw.Add(() =>
                {
                    var fileName = ofDlg.FileName;
                    var objFM    = new ObjFileModel(fileName);

                    Controller.AddData(objFM.Indices, objFM.Vertices.Select(x => x.ToVec3()).ToArray(), objFM.Normals);
                });
            }
        }
示例#3
0
        private void BtnOpenUrl_Click(object sender, RoutedEventArgs e)
        {
            Controller.RunOnNextDraw.Add(() =>
            {
                var fileName = URL;
                var objFM = new ObjFileModel(fileName);

                Controller.AddData(objFM.Indices, objFM.Vertices.Select(x => x.ToVec3()).ToArray(), objFM.Normals);
            });
        }
示例#4
0
        private void BtnOpen_Click(object sender, RoutedEventArgs e)
        {
            var ofDlg = new OpenFileDialog();

            // Set filter for file extension and default file extension
            ofDlg.DefaultExt = ".obj";
            ofDlg.Filter = "OBJ WaveFront (.obj)|*.obj";
            var res = ofDlg.ShowDialog();
            if (res == true)
            {
                Controller.RunOnNextDraw.Add(() =>
                {
                    var fileName = ofDlg.FileName;
                    var objFM = new ObjFileModel(fileName);

                    Controller.AddData(objFM.Indices, objFM.Vertices.Select(x => x.ToVec3()).ToArray(), objFM.Normals);
                });
            }
        }
示例#5
0
        public void AddMonkey()
        {
            var objFM = new ObjFileModel("C:\\Users\\Jochem\\Desktop\\monkey.obj");

            AddData(objFM.Indices, objFM.Vertices.Select(x => x.ToVec3()).ToArray(), objFM.Normals);
        }
示例#6
0
        public void AddMonkey()
        {
            var objFM = new ObjFileModel("C:\\Users\\Jochem\\Desktop\\monkey.obj");

            AddData(objFM.Indices, objFM.Vertices.Select(x => x.ToVec3()).ToArray(), objFM.Normals);
        }