Ejemplo n.º 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;
            }
        }
Ejemplo n.º 2
0
        static void OnAllowTransparencyChanged(DependencyObject depObj, DependencyPropertyChangedEventArgs e)
        {
            Panel3D panel3D    = depObj as Panel3D;
            var     frontModel = panel3D._viewport.FrontModel;

            panel3D._viewport.AllowTransparency = (bool)e.NewValue;

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