/* * /// <summary> * /// Add the visual to the left view, and create a clone for the right view * /// </summary> * /// <param name="visual"></param> * public void Add(Visual3D visual) * { * if (LeftViewport != null) * LeftViewport.Children.Add(visual); * if (RightViewport != null) * { * // todo: Visual geometry is not created yet * * // var clone = new ClonedVisual3D(visual); * var clone = StereoHelper.CreateClone(visual); * if (clone != null) * { * var el = clone as UIElement3D; * if (el != null) * el.InvalidateModel(); * * RightViewport.Children.Add(clone); * } * } * } */ // todo: does not work properly yet public void SynchronizeStereoModel() { LeftViewport.Children.Clear(); if (RightViewport != null) { RightViewport.Children.Clear(); } foreach (Visual3D v in Children) { LeftViewport.Children.Add(v); if (RightViewport != null) { Visual3D clone = StereoHelper.CreateClone(v); if (clone != null) { RightViewport.Children.Add(clone); } } } }
public void UpdateCameras() { StereoHelper.UpdateStereoCameras(Camera, LeftCamera, RightCamera, StereoBase, CrossViewing, CopyUpVector, CopyDirectionVector); }