Example #1
0
        private void OnLoaded(object sender, EventArgs e)
        {
            // setup trackball for moving the model around
            _trackball = new Trackball();
            _trackball.Attach(this);
            _trackball.Servants.Add(myViewport3D);
            _trackball.Enabled = true;

            // Get the mesh objects for changing the material
            var mv3D = myViewport3D.Children[0] as ModelVisual3D;
            var m3DgBase = mv3D.Content as Model3DGroup;

            var m3Dg = m3DgBase.Children[0] as Model3DGroup;
            _topPlane = m3Dg.Children[2] as GeometryModel3D;
            _bottomPlane = m3Dg.Children[3] as GeometryModel3D;

            m3Dg = m3DgBase.Children[1] as Model3DGroup;
            _frontSpinPlane = m3Dg.Children[0] as GeometryModel3D;
            _backSpinPlane = m3Dg.Children[1] as GeometryModel3D;

            AnimateToNextPicture();
        }
Example #2
0
        private void OnLoaded(object sender, EventArgs e)
        {
            // setup trackball for moving the model around
            _trackball = new Trackball();
            _trackball.Attach(this);
            _trackball.Servants.Add(myViewport3D);
            _trackball.Enabled = true;

            // Get the mesh objects for changing the material
            var mv3D     = myViewport3D.Children[0] as ModelVisual3D;
            var m3DgBase = mv3D.Content as Model3DGroup;

            var m3Dg = m3DgBase.Children[0] as Model3DGroup;

            _topPlane    = m3Dg.Children[2] as GeometryModel3D;
            _bottomPlane = m3Dg.Children[3] as GeometryModel3D;

            m3Dg            = m3DgBase.Children[1] as Model3DGroup;
            _frontSpinPlane = m3Dg.Children[0] as GeometryModel3D;
            _backSpinPlane  = m3Dg.Children[1] as GeometryModel3D;

            AnimateToNextPicture();
        }