Example #1
0
        static void OnCameraChanged(DependencyObject depObj, DependencyPropertyChangedEventArgs e)
        {
            Panel3D panel3D = depObj as Panel3D;
            Camera  camera  = e.NewValue as Camera;

            if (panel3D._viewport.Camera != camera)
            {
                panel3D._viewport.Camera = camera;
            }
        }
Example #2
0
        static void OnAllowTransparencyChanged(DependencyObject depObj, DependencyPropertyChangedEventArgs e)
        {
            Panel3D panel3D = depObj as Panel3D;

            if (panel3D != null)
            {
                var frontModel = panel3D._viewport.FrontModel;
                panel3D._viewport.AllowTransparency = (bool)e.NewValue;

                if (frontModel != null)
                {
                    panel3D.BuildScene(frontModel);
                }
            }
        }