예제 #1
0
        public void Init()
        {
            Node monkey = (Node)(AssetManager.Load(AssetManager.GetAppPath() + "\\models\\debug_shapes\\monkey.obj"));
            monkey.GetChild(0).SetLocalRotation(new ApexEngine.Math.Quaternion().SetFromAxis(ApexEngine.Math.Vector3f.UnitY, 180));
            mtlPreview = new MtlViewerGame();
            mtlPreview.Camera.Enabled = false;
            mtlPreview.Camera.Width = 256;
            mtlPreview.Camera.Height = 256;

            // mtlPreview.Camera = new ApexEngine.Rendering.Cameras.OrthoCamera(-2, 2, -2, 2, -2, 2);
            mtlPreview.Camera.Translation = new ApexEngine.Math.Vector3f(0, 0, -3);
            mtlPreview.RootNode.AddChild(monkey.GetChild(0));
            ApexEngineControl mtlViewer = new ApexEngineControl(mtlPreview);
            mtlViewer.Framerate = 50;
            mtlViewer.Dock = DockStyle.Fill;
            pnlMtl.Controls.Add(mtlViewer);
        }
예제 #2
0
        public void Init()
        {
            Node monkey = (Node)(AssetManager.Load(AssetManager.GetAppPath() + "\\models\\debug_shapes\\monkey.obj"));

            monkey.GetChild(0).SetLocalRotation(new ApexEngine.Math.Quaternion().SetFromAxis(ApexEngine.Math.Vector3f.UnitY, 180));
            mtlPreview = new MtlViewerGame();
            mtlPreview.Camera.Enabled = false;
            mtlPreview.Camera.Width   = 256;
            mtlPreview.Camera.Height  = 256;

            // mtlPreview.Camera = new ApexEngine.Rendering.Cameras.OrthoCamera(-2, 2, -2, 2, -2, 2);
            mtlPreview.Camera.Translation = new ApexEngine.Math.Vector3f(0, 0, -3);
            mtlPreview.RootNode.AddChild(monkey.GetChild(0));
            ApexEngineControl mtlViewer = new ApexEngineControl(mtlPreview);

            mtlViewer.Framerate = 50;
            mtlViewer.Dock      = DockStyle.Fill;
            pnlMtl.Controls.Add(mtlViewer);
        }