Exemple #1
0
        private void AddAxisToScene(Wpf.Controls.Workshop3DX workshop3DX)
        {
            var axis = new XyzAxis();

            axis.Length = 3.0f;
            workshop3DX.Scene.AddModel(axis);
            workshop3DX.Scene.Initialize();
        }
Exemple #2
0
        private void AddConicalToScene(
            Wpf.Controls.Workshop3DX workshop3DX,
            float scaleFactor,
            float r, float g, float b)
        {
            var conical = GetConical(scaleFactor, r, g, b);

            workshop3DX.Scene.AddModel(conical);
            workshop3DX.Scene.Initialize();
        }
Exemple #3
0
        private void AddBoxToScene(
            Wpf.Controls.Workshop3DX workshop3DX,
            float scaleFactor,
            float r, float g, float b)
        {
            var box = GetBox(scaleFactor, r, g, b);

            workshop3DX.Scene.AddModel(box);
            workshop3DX.Scene.Initialize();
        }
Exemple #4
0
        private void CreateScene(Wpf.Controls.Workshop3DX workshop3DX)
        {
            var camera = new PerspectiveCamera();

            camera.Position    = new Vector3(10.0f, 2.0f, 10.0f);
            camera.LookTarget  = new Vector3(0.0f, 1.0f, 0.0f);
            camera.FieldOfView = 25.0f;

            var scene = new Scene();

            scene.Camera = camera;

            workshop3DX.Scene = scene;
            workshop3DX.InvalidateProjection();
        }